File tree 2 files changed +5
-5
lines changed 2 files changed +5
-5
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"
5
5
readme = " README.md"
6
6
license = {file = " LICENSE" }
7
7
authors = [{
name =
" Shantanu Jain" }, {
email =
" [email protected] " }]
8
- dependencies = [" regex>=2022.1.18" , " requests>=2.26.0 " ]
8
+ dependencies = [" regex>=2022.1.18" ]
9
9
optional-dependencies = {blobfile = [" blobfile>=2" ]}
10
10
requires-python = " >=3.8"
11
11
Original file line number Diff line number Diff line change 8
8
import uuid
9
9
from typing import Optional
10
10
11
- import requests
11
+ import urllib . request
12
12
13
13
14
14
def read_file (blobpath : str ) -> bytes :
@@ -22,9 +22,9 @@ def read_file(blobpath: str) -> bytes:
22
22
with blobfile .BlobFile (blobpath , "rb" ) as f :
23
23
return f .read ()
24
24
# avoiding blobfile for public files helps avoid auth issues, like MFA prompts
25
- resp = requests . get (blobpath )
26
- resp . raise_for_status ()
27
- return resp . content
25
+ with urllib . request . urlopen (blobpath ) as response :
26
+ resp = response . read ()
27
+ return resp
28
28
29
29
30
30
def check_hash (data : bytes , expected_hash : str ) -> bool :
You can’t perform that action at this time.
0 commit comments