diff --git a/CHANGELOG.md b/CHANGELOG.md index 73b99c6b..f0c89a1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,15 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased -### Added +### 0.25.1 (3rd November, 2023) * Add support for Python 3.12. (#2854) +* Add support for httpcore 1.0 (#2885) ### Fixed * Raise `ValueError` on `Response.encoding` being set after `Response.text` has been accessed. (#2852) -## 0.25.0 (11th Sep, 2023) +## 0.25.0 (11th September, 2023) ### Removed @@ -62,13 +63,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * The `rfc3986` dependancy has been removed. (#2252) -## 0.23.3 (4th Jan, 2023) +## 0.23.3 (4th January, 2023) ### Fixed * Version 0.23.2 accidentally included stricter type checking on query parameters. This shouldn've have been included in a minor version bump, and is now reverted. (#2523, #2539) -## 0.23.2 (2nd Jan, 2023) +## 0.23.2 (2nd January, 2023) ### Added @@ -80,7 +81,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * Raise `TypeError` if content is passed a dict-instance. (#2495) * Partially revert the API breaking change in 0.23.1, which removed `RawURL`. We continue to expose a `url.raw` property which is now a plain named-tuple. This API is still expected to be deprecated, but we will do so with a major version bump. (#2481) -## 0.23.1 (18th Nov, 2022) +## 0.23.1 (18th November, 2022) **Note**: The 0.23.1 release should have used a proper version bump, rather than a minor point release. There are API surface area changes that may affect some users. diff --git a/httpx/__version__.py b/httpx/__version__.py index bfa421ad..9f92ef99 100644 --- a/httpx/__version__.py +++ b/httpx/__version__.py @@ -1,3 +1,3 @@ __title__ = "httpx" __description__ = "A next generation HTTP client, for Python 3." -__version__ = "0.25.0" +__version__ = "0.25.1" diff --git a/httpx/_transports/default.py b/httpx/_transports/default.py index 7dba5b82..76c543ce 100644 --- a/httpx/_transports/default.py +++ b/httpx/_transports/default.py @@ -64,7 +64,7 @@ SOCKET_OPTION = typing.Union[ def map_httpcore_exceptions() -> typing.Iterator[None]: try: yield - except Exception as exc: # noqa: PIE-786 + except Exception as exc: mapped_exc = None for from_exc, to_exc in HTTPCORE_EXC_MAP.items(): diff --git a/pyproject.toml b/pyproject.toml index baa92e9a..75c5e7d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,8 @@ classifiers = [ ] dependencies = [ "certifi", - "httpcore>=0.18.0,<0.19.0", + "httpcore", + "anyio", "idna", "sniffio", ] @@ -95,7 +96,10 @@ replacement = 'src="https://raw.githubusercontent.com/encode/httpx/master/\1"' [tool.ruff] select = ["E", "F", "I", "B", "PIE"] ignore = ["B904", "B028"] -line-length = 120 +line-length = 88 + +[tool.ruff.pycodestyle] +max-line-length = 120 [tool.ruff.isort] combine-as-imports = true diff --git a/requirements.txt b/requirements.txt index e3217ab0..e859bfc6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,21 +12,20 @@ types-chardet==5.0.4.5 # Documentation mkdocs==1.5.3 mkautodoc==0.2.0 -mkdocs-material==9.4.2 +mkdocs-material==9.4.7 # Packaging -build==0.10.0 +build==1.0.3 twine==4.0.2 # Tests & Linting -black==23.9.1 coverage[toml]==7.3.0 cryptography==41.0.4 mypy==1.5.1 types-certifi==2021.10.8.2 -pytest==7.4.2 -ruff==0.0.291 +pytest==7.4.3 +ruff==0.1.3 trio==0.22.2 -trio-typing==0.8.0 +trio-typing==0.9.0 trustme==1.1.0 uvicorn==0.22.0 diff --git a/scripts/check b/scripts/check index ef7b064f..a4bce094 100755 --- a/scripts/check +++ b/scripts/check @@ -9,6 +9,6 @@ export SOURCE_FILES="httpx tests" set -x ./scripts/sync-version -${PREFIX}black --check --diff $SOURCE_FILES +${PREFIX}ruff format $SOURCE_FILES --diff ${PREFIX}mypy $SOURCE_FILES ${PREFIX}ruff check $SOURCE_FILES diff --git a/scripts/lint b/scripts/lint index 22d12cba..3d8685a0 100755 --- a/scripts/lint +++ b/scripts/lint @@ -9,4 +9,4 @@ export SOURCE_FILES="httpx tests" set -x ${PREFIX}ruff --fix $SOURCE_FILES -${PREFIX}black $SOURCE_FILES +${PREFIX}ruff format $SOURCE_FILES