File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ description = "tiktoken is a fast BPE tokeniser for use with OpenAI's models"
55readme = " README.md"
66license = { file = " LICENSE" }
77authors = [{
name =
" Shantanu Jain" }, {
email =
" [email protected] " }]
8- dependencies = [" regex>=2022.1.18" , " requests>=2.26.0 " ]
8+ dependencies = [" regex>=2022.1.18" ]
99optional-dependencies = { blobfile = [" blobfile>=2" ] }
1010requires-python = " >=3.9"
1111
Original file line number Diff line number Diff line change @@ -17,11 +17,10 @@ def read_file(blobpath: str) -> bytes:
1717 return f .read ()
1818
1919 # avoiding blobfile for public files helps avoid auth issues, like MFA prompts
20- import requests
21-
22- resp = requests .get (blobpath )
23- resp .raise_for_status ()
24- return resp .content
20+ import urllib .request
21+ with urllib .request .urlopen (blobpath ) as response :
22+ resp = response .read ()
23+ return resp
2524
2625
2726def check_hash (data : bytes , expected_hash : str ) -> bool :
You can’t perform that action at this time.
0 commit comments