From a4844310eddd4e431c50adc6d55e5f8d8ce91e89 Mon Sep 17 00:00:00 2001 From: cono Date: Wed, 22 Nov 2023 10:55:15 +0200 Subject: [PATCH 1/5] Fix bug with async socks proxy and tracing. --- httpcore/_async/socks_proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httpcore/_async/socks_proxy.py b/httpcore/_async/socks_proxy.py index 08a065d6..f839603f 100644 --- a/httpcore/_async/socks_proxy.py +++ b/httpcore/_async/socks_proxy.py @@ -228,7 +228,7 @@ async def handle_async_request(self, request: Request) -> Response: "port": self._proxy_origin.port, "timeout": timeout, } - with Trace("connect_tcp", logger, request, kwargs) as trace: + async with Trace("connect_tcp", logger, request, kwargs) as trace: stream = await self._network_backend.connect_tcp(**kwargs) trace.return_value = stream @@ -239,7 +239,7 @@ async def handle_async_request(self, request: Request) -> Response: "port": self._remote_origin.port, "auth": self._proxy_auth, } - with Trace( + async with Trace( "setup_socks5_connection", logger, request, kwargs ) as trace: await _init_socks5_connection(**kwargs) From fd7c33331f857c09671a86a379fc5ff37d20368e Mon Sep 17 00:00:00 2001 From: cono Date: Wed, 22 Nov 2023 17:09:32 +0200 Subject: [PATCH 2/5] Add Changelog and change version. --- CHANGELOG.md | 6 +++++- httpcore/__init__.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de62ceea..86d09934 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,11 @@ 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 (November 22th, 2023) + +- Fix copy paste bug with socks proxy and tracing. (#849) + +## 1.0.2 (November 10th, 2023) - Fix `float("inf")` timeouts in `Event.wait` function. (#846) diff --git a/httpcore/__init__.py b/httpcore/__init__.py index eb3e5771..3709fc40 100644 --- a/httpcore/__init__.py +++ b/httpcore/__init__.py @@ -130,7 +130,7 @@ def __init__(self, *args, **kwargs): # type: ignore "WriteError", ] -__version__ = "1.0.2" +__version__ = "1.0.3" __locals = locals() From 6cd4cac6f5697edfd4b8c4acf9312a046214d4c6 Mon Sep 17 00:00:00 2001 From: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com> Date: Thu, 23 Nov 2023 09:24:41 +0400 Subject: [PATCH 3/5] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86d09934..5e7b0810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ 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.3 (November 22th, 2023) +## Unreleased - Fix copy paste bug with socks proxy and tracing. (#849) From 9cd82f6c4c3935fbb72e2f567bd3b45c88f5e7ed Mon Sep 17 00:00:00 2001 From: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com> Date: Thu, 23 Nov 2023 09:25:00 +0400 Subject: [PATCH 4/5] Update httpcore/__init__.py --- httpcore/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpcore/__init__.py b/httpcore/__init__.py index 3709fc40..eb3e5771 100644 --- a/httpcore/__init__.py +++ b/httpcore/__init__.py @@ -130,7 +130,7 @@ def __init__(self, *args, **kwargs): # type: ignore "WriteError", ] -__version__ = "1.0.3" +__version__ = "1.0.2" __locals = locals() From 45320539d66e0a1f05780908cf05ab25b743fe91 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Thu, 23 Nov 2023 10:05:32 +0000 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e7b0810..d42bc585 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## Unreleased -- Fix copy paste bug with socks proxy and tracing. (#849) +- Fix trace extension when used with socks proxy. (#849) ## 1.0.2 (November 10th, 2023)