Skip to content

Commit f18087e

Browse files
Merge pull request #208 from supertokens/fix/relax-asgiref-cryptography
fix: Relax dependency versions in setup.py
2 parents c65cca5 + db966ad commit f18087e

File tree

10 files changed

+24
-25
lines changed

10 files changed

+24
-25
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
### Bug fix:
2323

2424
- Clears cookies when `revoke_session` is called using the session container, even if the session did not exist from before: https://github.com/supertokens/supertokens-node/issues/343
25+
- Relax version requirements for `httpx`, `cryptography`, and `asgiref` to fix https://github.com/supertokens/supertokens-python/issues/207
2526

2627
### Breaking changes:
2728
- Change request arg type in session recipe functions from Any to BaseRequest.

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ test:
2222
dev-install:
2323
pip install -r dev-requirements.txt
2424

25-
dev-install-refresh:
26-
pip3 install -e .[dev]
27-
2825
freeze-dev-requirements:
2926
pip freeze > dev-requirements.txt
3027

dev-requirements.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
aiosmtplib==1.1.6
12
anyio==3.5.0
2-
asgiref==3.4.1
3+
asgiref==3.5.2
34
astroid==2.9.3
45
attrs==21.4.0
56
black==22.3.0
@@ -8,7 +9,7 @@ cffi==1.15.0
89
chardet==4.0.0
910
charset-normalizer==2.0.12
1011
click==8.1.3
11-
cryptography==35.0.0
12+
cryptography==36.0.2
1213
Deprecated==1.2.13
1314
Django==3.2.12
1415
django-cors-headers==3.11.0
@@ -18,9 +19,9 @@ fastapi==0.68.1
1819
filelock==3.6.0
1920
Flask==2.0.2
2021
Flask-Cors==3.0.10
21-
h11==0.9.0
22-
httpcore==0.11.1
23-
httpx==0.15.5
22+
h11==0.12.0
23+
httpcore==0.15.0
24+
httpx==0.23.0
2425
idna==2.10
2526
importlib-metadata==4.11.3
2627
iniconfig==1.1.1
@@ -38,6 +39,7 @@ mypy-extensions==0.4.3
3839
nest-asyncio==1.5.1
3940
nodeenv==1.6.0
4041
packaging==21.3
42+
pathspec==0.9.0
4143
pdoc3==0.10.0
4244
phonenumbers==8.12.48
4345
platformdirs==2.5.1
@@ -59,18 +61,18 @@ pytz==2022.1
5961
PyYAML==5.4.1
6062
requests==2.25.1
6163
requests-file==1.5.1
62-
respx==0.16.3
6364
requests-mock==1.9.3
64-
twilio==7.9.1
65+
respx==0.19.2
6566
rfc3986==1.5.0
6667
six==1.16.0
6768
sniffio==1.2.0
6869
sqlparse==0.4.2
6970
starlette==0.14.2
70-
-e git+https://github.com/supertokens/supertokens-python.git@445181dba8869f33b1a90c58778c7777d5ab560c#egg=supertokens_python
71+
-e git+https://github.com/supertokens/supertokens-python.git@e989cfd244dc5ed2437e49ab6b476f7e9bd16861#egg=supertokens_python
7172
tldextract==3.1.0
7273
toml==0.10.2
7374
tomli==2.0.1
75+
twilio==7.9.1
7476
types-pytz==2021.3.6
7577
types-PyYAML==6.0.5
7678
typing_extensions==4.1.1
@@ -80,4 +82,3 @@ uvicorn==0.18.2
8082
Werkzeug==2.0.3
8183
wrapt==1.13.3
8284
zipp==3.7.0
83-
aiosmtplib==1.1.6

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# on changes in these frameworks
1616
"fastapi": (
1717
[
18-
"respx==0.16.3",
18+
"respx==0.19.2",
1919
"Fastapi",
2020
"uvicorn==0.18.2",
2121
"python-dotenv==0.19.2",
@@ -100,14 +100,14 @@
100100
keywords="",
101101
install_requires=[
102102
"PyJWT>=2.0.0 ,<2.4.0",
103-
"httpx>=0.15.0 ,<0.23.0",
103+
"httpx>=0.15.0 ,<0.24.0",
104104
"pycryptodome==3.10.*",
105105
"jsonschema==3.2.0",
106106
"tldextract==3.1.0",
107-
"asgiref==3.4.1",
107+
"asgiref>=3.4.1,<4",
108108
"typing_extensions==4.1.1",
109109
"Deprecated==1.2.13",
110-
"cryptography==35.0",
110+
"cryptography>=35.0,<37.0",
111111
"phonenumbers==8.12.48",
112112
# flask depends on this and flask has > '2.0' for this. However, the version before 2.1.0 breaks our lib.
113113
"Werkzeug>=2.0 ,<2.1.0",

supertokens_python/querier.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ async def f(url: str) -> Response:
8181
if Querier.__api_key is not None:
8282
headers = {API_KEY_HEADER: Querier.__api_key}
8383
async with AsyncClient() as client:
84-
return await client.get(url, headers=headers)
84+
return await client.get(url, headers=headers) # type:ignore
8585

8686
response = await self.__send_request_helper(
8787
NormalisedURLPath(API_VERSION), "GET", f, len(self.__hosts)
@@ -133,7 +133,7 @@ async def send_get_request(
133133

134134
async def f(url: str) -> Response:
135135
async with AsyncClient() as client:
136-
return await client.get(
136+
return await client.get( # type:ignore
137137
url,
138138
params=params,
139139
headers=await self.__get_headers_with_api_version(path),
@@ -169,7 +169,7 @@ async def f(url: str) -> Response:
169169
async def send_delete_request(self, path: NormalisedURLPath):
170170
async def f(url: str) -> Response:
171171
async with AsyncClient() as client:
172-
return await client.delete(
172+
return await client.delete( # type:ignore
173173
url, headers=await self.__get_headers_with_api_version(path)
174174
)
175175

supertokens_python/recipe/thirdparty/providers/apple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ async def _fetch_apple_public_keys(self) -> List[RSAPublicKey]:
155155
self.APPLE_PUBLIC_KEYS
156156
) == 0:
157157
async with AsyncClient() as client:
158-
response = await client.get(self.APPLE_PUBLIC_KEY_URL)
158+
response = await client.get(self.APPLE_PUBLIC_KEY_URL) # type:ignore
159159
key_payload = response.json()
160160
for key in key_payload["keys"]:
161161
self.APPLE_PUBLIC_KEYS.append(RSAAlgorithm.from_jwk(key)) # type: ignore

supertokens_python/recipe/thirdparty/providers/discord.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async def get_profile_info(
5959
access_token: str = auth_code_response["access_token"]
6060
headers = {"Authorization": "Bearer " + access_token}
6161
async with AsyncClient() as client:
62-
response = await client.get(
62+
response = await client.get( # type:ignore
6363
url=self.base_url + "/api/users/@me", headers=headers
6464
)
6565
user_info = response.json()

supertokens_python/recipe/thirdparty/providers/facebook.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async def get_profile_info(
5454

5555
params = {"access_token": access_token, "fields": "id,email", "format": "json"}
5656
async with AsyncClient() as client:
57-
response = await client.get(
57+
response = await client.get( # type:ignore
5858
url="https://graph.facebook.com/me", params=params
5959
)
6060
user_info = response.json()

supertokens_python/recipe/thirdparty/providers/github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ async def get_profile_info(
6464
"Accept": "application/vnd.github.v3+json",
6565
}
6666
async with AsyncClient() as client:
67-
response_user = await client.get(
67+
response_user = await client.get( # type:ignore
6868
url="https://api.github.com/user", params=params, headers=headers
6969
)
70-
response_email = await client.get(
70+
response_email = await client.get( # type:ignore
7171
url="https://api.github.com/user/emails", params=params, headers=headers
7272
)
7373
user_info = response_user.json()

supertokens_python/recipe/thirdparty/providers/google.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async def get_profile_info(
5959
params = {"alt": "json"}
6060
headers = {"Authorization": "Bearer " + access_token}
6161
async with AsyncClient() as client:
62-
response = await client.get(
62+
response = await client.get( # type: ignore
6363
url="https://www.googleapis.com/oauth2/v1/userinfo",
6464
params=params,
6565
headers=headers,

0 commit comments

Comments
 (0)