Skip to content

Commit dbb0b3b

Browse files
authored
Fix for hishel 1.0.0 (#31)
2 parents 4ca29a0 + 48cc9f2 commit dbb0b3b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bpo_redirecter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from functools import cache
1515
from pathlib import Path
1616

17-
import hishel # pip install hishel
1817
import httpx # pip install httpx
18+
from hishel.httpx import SyncCacheClient # pip install hishel
1919
from termcolor import colored, cprint # pip install termcolor
2020

2121
try:
@@ -67,7 +67,7 @@ def do_file(filename: str, dry_run: bool = False) -> None:
6767

6868

6969
def do_lines(old_lines: list[str], filename: str) -> list[str]:
70-
with hishel.CacheClient() as client:
70+
with SyncCacheClient() as client:
7171
changes = 0
7272
new_lines = []
7373
for line in old_lines:

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
feedparser
22
ghapi
33
GitPython
4-
hishel
4+
hishel>=1
55
httpx
66
jsonlines
77
prettytable

0 commit comments

Comments
 (0)