Skip to content

build: bump httpx/respx dependencies #567

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [0.28.1] - 2025-02-26
- Pins `httpx` and `respx` to current major versions (<1.0.0)
- Removes `respx` dependency from `fastapi` install

## [0.28.0]
- **[Breaking] Updates pre-commit hooks to use `pre-commit`**
- Migration:
Expand Down
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ pytest-mock==3.14.0
pytest-rerunfailures==14.0
pyyaml==6.0.2
requests-mock==1.12.1
respx==0.21.1
respx>=0.13.0, <1.0.0
uvicorn==0.32.0
-e .
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# on changes in these frameworks
"fastapi": (
[
"respx==0.21.1",
"fastapi",
"uvicorn",
"python-dotenv==1.0.1",
Expand Down Expand Up @@ -83,7 +82,7 @@

setup(
name="supertokens_python",
version="0.28.0",
version="0.28.1",
author="SuperTokens",
license="Apache 2.0",
author_email="[email protected]",
Expand Down Expand Up @@ -116,7 +115,7 @@
# [crypto] ensures that it installs the `cryptography` library as well
# based on constraints specified in https://github.com/jpadilla/pyjwt/blob/master/setup.cfg#L50
"PyJWT[crypto]>=2.5.0,<3.0.0",
"httpx>=0.15.0,<=0.27.2",
"httpx>=0.15.0,<1.0.0",
"pycryptodome<3.21.0",
"tldextract<5.1.3",
"asgiref>=3.4.1,<4",
Expand Down
2 changes: 1 addition & 1 deletion supertokens_python/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from __future__ import annotations

SUPPORTED_CDI_VERSIONS = ["5.2"]
VERSION = "0.28.0"
VERSION = "0.28.1"
TELEMETRY = "/telemetry"
USER_COUNT = "/users/count"
USER_DELETE = "/user/remove"
Expand Down
11 changes: 6 additions & 5 deletions tests/test_querier.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
import asyncio
import json
from typing import Any, Dict, Optional

import httpx
Expand Down Expand Up @@ -84,9 +83,7 @@ def api2_side_effect(_: httpx.Request):
try:
await q.send_get_request(NormalisedURLPath("/api1"), None, None)
except Exception as e:
if "with status code: 429" in str(
e
) and 'message: {"status": "RATE_ERROR"}' in str(e):
if "with status code: 429" in str(e) and '"RATE_ERROR"' in str(e):
pass
else:
raise e
Expand Down Expand Up @@ -186,12 +183,16 @@ async def test_querier_text_and_headers():
)

res = await q.send_get_request(NormalisedURLPath("/json-api"), None, None)
assert "content-length" in res["_headers"]
# httpx 0.28.0 seems to have changed their `json.dumps` signature in https://github.com/encode/httpx/issues/3363
# Does not make sense to keep up to date with minor changes like this
# Dropping content-length checks to avoid flake here
res["_headers"].pop("content-length")
assert res == {
"bar": "baz",
"_headers": {
"greet": "hi",
"content-type": "application/json",
"content-length": str(len(json.dumps(body))),
},
}

Expand Down
Loading