Skip to content

Commit 31c41cb

Browse files
committed
Use urllib3 instead of urllib
1 parent 9b7a361 commit 31c41cb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

completion.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
from functools import cache
33
from pathlib import Path
44
from tempfile import TemporaryDirectory
5-
from urllib.request import urlopen
65

76
import git
7+
import urllib3
88
from potodo import potodo
99

1010

1111
@cache
1212
def branches_from_peps() -> list[str]:
13-
with urlopen('https://peps.python.org/api/release-cycle.json') as in_file:
14-
data = json.loads(in_file.read().decode('utf-8'))
13+
resp = urllib3.request('GET', 'https://peps.python.org/api/release-cycle.json')
14+
data = json.loads(resp.data.decode('utf-8'))
1515
return [
1616
branch for branch in data if data[branch]['status'] in ('bugfix', 'security')
1717
]

0 commit comments

Comments
 (0)