Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: encode/httpcore
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.0.2
Choose a base ref
...
head repository: encode/httpcore
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.0.3
Choose a head ref

Commits on Nov 23, 2023

  1. Fix bug with async socks proxy and tracing. (#849)

    * Fix bug with async socks proxy and tracing.
    
    * Add Changelog and change version.
    
    * Update CHANGELOG.md
    
    * Update httpcore/__init__.py
    
    * Update CHANGELOG.md
    
    ---------
    
    Co-authored-by: cono <cono@chartbeat.com>
    Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
    Co-authored-by: Tom Christie <tom@tomchristie.com>
    4 people authored Nov 23, 2023
    Copy the full SHA
    825e7e3 View commit details

Commits on Dec 1, 2023

  1. Bump coverage[toml] from 7.3.0 to 7.3.2 (#854)

    Bumps [coverage[toml]](https://github.com/nedbat/coveragepy) from 7.3.0 to 7.3.2.
    - [Release notes](https://github.com/nedbat/coveragepy/releases)
    - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
    - [Commits](nedbat/coveragepy@7.3.0...7.3.2)
    
    ---
    updated-dependencies:
    - dependency-name: coverage[toml]
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 1, 2023
    Copy the full SHA
    e5ef264 View commit details
  2. Bump mypy from 1.5.1 to 1.7.1 (#851)

    Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.7.1.
    - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
    - [Commits](python/mypy@v1.5.1...v1.7.1)
    
    ---
    updated-dependencies:
    - dependency-name: mypy
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
    dependabot[bot] and karpetrosyan authored Dec 1, 2023
    Copy the full SHA
    632e2d2 View commit details
  3. Bump mkdocs-material from 9.4.7 to 9.4.14 (#853)

    Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.4.7 to 9.4.14.
    - [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
    - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
    - [Commits](squidfunk/mkdocs-material@9.4.7...9.4.14)
    
    ---
    updated-dependencies:
    - dependency-name: mkdocs-material
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Tom Christie <tom@tomchristie.com>
    dependabot[bot] and tomchristie authored Dec 1, 2023
    Copy the full SHA
    a0d5440 View commit details
  4. Bump black from 23.10.1 to 23.11.0 (#852)

    Bumps [black](https://github.com/psf/black) from 23.10.1 to 23.11.0.
    - [Release notes](https://github.com/psf/black/releases)
    - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
    - [Commits](psf/black@23.10.1...23.11.0)
    
    ---
    updated-dependencies:
    - dependency-name: black
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 1, 2023
    Copy the full SHA
    ebd3b65 View commit details

Commits on Dec 3, 2023

  1. Bump mkdocstrings[python-legacy] from 0.22.0 to 0.24.0 (#850)

    Bumps [mkdocstrings[python-legacy]](https://github.com/mkdocstrings/mkdocstrings) from 0.22.0 to 0.24.0.
    - [Release notes](https://github.com/mkdocstrings/mkdocstrings/releases)
    - [Changelog](https://github.com/mkdocstrings/mkdocstrings/blob/main/CHANGELOG.md)
    - [Commits](mkdocstrings/mkdocstrings@0.22.0...0.24.0)
    
    ---
    updated-dependencies:
    - dependency-name: mkdocstrings[python-legacy]
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Tom Christie <tom@tomchristie.com>
    dependabot[bot] and tomchristie authored Dec 3, 2023
    Copy the full SHA
    ef610e2 View commit details

Commits on Dec 4, 2023

  1. Use ruff format (#831)

    * Use ruff format instead of black
    
    * Update scripts/check
    
    * Keep the 120 line limit
    
    * Simplify ruff format
    
    * Update scripts/lint
    
    * Update pyproject.toml
    
    Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
    
    * Revert "Update pyproject.toml"
    
    This reverts commit fd0ef87.
    
    ---------
    
    Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
    karpetrosyan and T-256 authored Dec 4, 2023
    Copy the full SHA
    6633b9f View commit details

Commits on Dec 7, 2023

  1. Remove expensive run time type casting (#856)

    * Guard casting type subscripting with TYPE_CHECKING
    
    * lint
    
    * lint
    
    * lint
    
    * lint
    
    * lint
    
    * lint
    
    * lint
    
    * Adjust to use ignore instead
    
    * Adjust to use ignore instead
    bdraco authored Dec 7, 2023
    Copy the full SHA
    2fcd062 View commit details

Commits on Jan 8, 2024

  1. Bump ruff from 0.1.3 to 0.1.9 (#867)

    Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.3 to 0.1.9.
    - [Release notes](https://github.com/astral-sh/ruff/releases)
    - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
    - [Commits](astral-sh/ruff@v0.1.3...v0.1.9)
    
    ---
    updated-dependencies:
    - dependency-name: ruff
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 8, 2024
    Copy the full SHA
    62c72af View commit details
  2. Bump trio-typing from 0.9.0 to 0.10.0 (#866)

    Bumps [trio-typing](https://github.com/python-trio/trio-typing) from 0.9.0 to 0.10.0.
    - [Commits](python-trio/trio-typing@v0.9.0...v0.10.0)
    
    ---
    updated-dependencies:
    - dependency-name: trio-typing
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
    dependabot[bot] and karpetrosyan authored Jan 8, 2024
    Copy the full SHA
    be5b618 View commit details
  3. Bump mkdocs-material-extensions from 1.3 to 1.3.1 (#864)

    Bumps [mkdocs-material-extensions](https://github.com/facelessuser/mkdocs-material-extensions) from 1.3 to 1.3.1.
    - [Release notes](https://github.com/facelessuser/mkdocs-material-extensions/releases)
    - [Changelog](https://github.com/facelessuser/mkdocs-material-extensions/blob/master/changelog.md)
    - [Commits](facelessuser/mkdocs-material-extensions@1.3...1.3.1)
    
    ---
    updated-dependencies:
    - dependency-name: mkdocs-material-extensions
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
    dependabot[bot] and karpetrosyan authored Jan 8, 2024
    Copy the full SHA
    a80b994 View commit details
  4. Bump mypy from 1.7.1 to 1.8.0 (#863)

    Bumps [mypy](https://github.com/python/mypy) from 1.7.1 to 1.8.0.
    - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
    - [Commits](python/mypy@v1.7.1...v1.8.0)
    
    ---
    updated-dependencies:
    - dependency-name: mypy
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 8, 2024
    Copy the full SHA
    ad1ddcf View commit details
  5. Update trio requirement from <0.23.0,>=0.22.0 to >=0.22.0,<0.24.0 (#865)

    Updates the requirements on [trio](https://github.com/python-trio/trio) to permit the latest version.
    - [Release notes](https://github.com/python-trio/trio/releases)
    - [Commits](python-trio/trio@v0.22.0...v0.23.2)
    
    ---
    updated-dependencies:
    - dependency-name: trio
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 8, 2024
    Copy the full SHA
    f60e99b View commit details

Commits on Jan 9, 2024

  1. Use SSL context for "wss" scheme (#869)

    * Add failing tests
    
    * Use SSL context for "wss" scheme
    
    * Update CHANGELOG.md
    
    * Update CHANGELOG.md
    
    ---------
    
    Co-authored-by: Tom Christie <tom@tomchristie.com>
    MtkN1 and tomchristie authored Jan 9, 2024
    Copy the full SHA
    b2de19e View commit details

Commits on Jan 11, 2024

  1. Bump jinja2 from 3.1.2 to 3.1.3 (#870)

    Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.2 to 3.1.3.
    - [Release notes](https://github.com/pallets/jinja/releases)
    - [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
    - [Commits](pallets/jinja@3.1.2...3.1.3)
    
    ---
    updated-dependencies:
    - dependency-name: jinja2
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Jan 11, 2024
    Copy the full SHA
    1a14acd View commit details

Commits on Feb 3, 2024

  1. Bump pytest from 7.4.3 to 8.0.0 (#876)

    Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.3 to 8.0.0.
    - [Release notes](https://github.com/pytest-dev/pytest/releases)
    - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
    - [Commits](pytest-dev/pytest@7.4.3...8.0.0)
    
    ---
    updated-dependencies:
    - dependency-name: pytest
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 3, 2024
    Copy the full SHA
    5cffb40 View commit details
  2. Bump coverage[toml] from 7.3.2 to 7.4.1 (#877)

    Bumps [coverage[toml]](https://github.com/nedbat/coveragepy) from 7.3.2 to 7.4.1.
    - [Release notes](https://github.com/nedbat/coveragepy/releases)
    - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
    - [Commits](nedbat/coveragepy@7.3.2...7.4.1)
    
    ---
    updated-dependencies:
    - dependency-name: coverage[toml]
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
    dependabot[bot] and karpetrosyan authored Feb 3, 2024
    Copy the full SHA
    9f82244 View commit details

Commits on Feb 7, 2024

  1. Bump mkdocs-material from 9.4.14 to 9.5.7 (#878)

    Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.4.14 to 9.5.7.
    - [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
    - [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
    - [Commits](squidfunk/mkdocs-material@9.4.14...9.5.7)
    
    ---
    updated-dependencies:
    - dependency-name: mkdocs-material
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 7, 2024
    Copy the full SHA
    416b89c View commit details
  2. Bump ruff from 0.1.9 to 0.2.1 (#881)

    Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.9 to 0.2.1.
    - [Release notes](https://github.com/astral-sh/ruff/releases)
    - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
    - [Commits](astral-sh/ruff@v0.1.9...v0.2.1)
    
    ---
    updated-dependencies:
    - dependency-name: ruff
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Feb 7, 2024
    Copy the full SHA
    79fa6bf View commit details

Commits on Feb 12, 2024

  1. Safe async cancellations. (#880)

    * Connection pool work
    
    * Connection pool work
    
    * Connection pool work
    
    * Connection pool work
    
    * Comments
    
    * Comments
    
    * Connection pool work
    
    * Reraise
    
    * Lookin sharp
    
    * nocover directive
    
    * Safe cancellations
    
    * Update CHANGELOG
    tomchristie authored Feb 12, 2024
    Copy the full SHA
    7b04cda View commit details

Commits on Feb 13, 2024

  1. Version 1.0.3 (#883)

    tomchristie authored Feb 13, 2024
    Copy the full SHA
    908013c View commit details
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## 1.0.2 (November 10th, 2023)
## 1.0.3 (February 13th, 2024)

- Fix support for async cancellations. (#880)
- Fix trace extension when used with socks proxy. (#849)
- Fix SSL context for connections using the "wss" scheme (#869)

## 1.0.2 (November 10th, 2023)

- Fix `float("inf")` timeouts in `Event.wait` function. (#846)

2 changes: 1 addition & 1 deletion httpcore/__init__.py
Original file line number Diff line number Diff line change
@@ -130,7 +130,7 @@ def __init__(self, *args, **kwargs): # type: ignore
"WriteError",
]

__version__ = "1.0.2"
__version__ = "1.0.3"


__locals = locals()
18 changes: 8 additions & 10 deletions httpcore/_async/connection.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

from .._backends.auto import AutoBackend
from .._backends.base import SOCKET_OPTION, AsyncNetworkBackend, AsyncNetworkStream
from .._exceptions import ConnectError, ConnectionNotAvailable, ConnectTimeout
from .._exceptions import ConnectError, ConnectTimeout
from .._models import Origin, Request, Response
from .._ssl import default_ssl_context
from .._synchronization import AsyncLock
@@ -70,9 +70,9 @@ async def handle_async_request(self, request: Request) -> Response:
f"Attempted to send request to {request.url.origin} on connection to {self._origin}"
)

async with self._request_lock:
if self._connection is None:
try:
try:
async with self._request_lock:
if self._connection is None:
stream = await self._connect(request)

ssl_object = stream.get_extra_info("ssl_object")
@@ -94,11 +94,9 @@ async def handle_async_request(self, request: Request) -> Response:
stream=stream,
keepalive_expiry=self._keepalive_expiry,
)
except Exception as exc:
self._connect_failed = True
raise exc
elif not self._connection.is_available():
raise ConnectionNotAvailable()
except BaseException as exc:
self._connect_failed = True
raise exc

return await self._connection.handle_async_request(request)

@@ -137,7 +135,7 @@ async def _connect(self, request: Request) -> AsyncNetworkStream:
)
trace.return_value = stream

if self._origin.scheme == b"https":
if self._origin.scheme in (b"https", b"wss"):
ssl_context = (
default_ssl_context()
if self._ssl_context is None
Loading