Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
python-urllib3
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debian Python Team
packages
python-urllib3
Commits
383e158d
Commit
383e158d
authored
1 month ago
by
Colin Watson
Browse files
Options
Downloads
Patches
Plain Diff
Ensure compatibility with httpx>=0.28
Closes: #1099277
parent
9c8ca0db
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
debian/changelog
+6
-0
6 additions, 0 deletions
debian/changelog
debian/patches/httpx-0.28.patch
+55
-0
55 additions, 0 deletions
debian/patches/httpx-0.28.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
62 additions
and
0 deletions
debian/changelog
+
6
−
0
View file @
383e158d
python-urllib3 (2.3.0-2) UNRELEASED; urgency=medium
* Ensure compatibility with httpx>=0.28 (closes: #1099277).
-- Colin Watson <cjwatson@debian.org> Wed, 12 Mar 2025 11:16:20 +0000
python-urllib3 (2.3.0-1) unstable; urgency=medium
* Team upload.
...
...
This diff is collapsed.
Click to expand it.
debian/patches/httpx-0.28.patch
0 → 100644
+
55
−
0
View file @
383e158d
From: Carl Smedstad <carl.smedstad@protonmail.com>
Date: Mon, 30 Dec 2024 16:04:28 +0100
Subject: Ensure compatibility with httpx>=0.28
Version 0.28 of httpx removed support for supplying a path (of string
type) to verify, only a bool or an SSL context is now supported.
See: https://github.com/encode/httpx/releases/tag/0.28.0
Running the test suite with httpx 0.28 will break the dummy server and a
such number of tests in test/with_dummyserver/.
To resolve this, create an SSL context in the ProxyApp init function and
supply that to AsyncClient, instead of a raw string. This change is
backwards compatible, i.e. the test suite will still succeed against
the currently pinned version of httpx, 0.25.2.
Origin: https://github.com/urllib3/urllib3/pull/3545
Bug-Debian: https://bugs.debian.org/1099277
Last-Update: 2025-03-12
---
dummyserver/asgi_proxy.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dummyserver/asgi_proxy.py b/dummyserver/asgi_proxy.py
index 107c5e0..00c0a1b 100755
--- a/dummyserver/asgi_proxy.py
+++ b/dummyserver/asgi_proxy.py
@@ -1,5 +1,6 @@
from __future__ import annotations
+import ssl
import typing
import httpx
@@ -29,7 +30,10 @@
async def _read_body(receive: ASGIReceiveCallable) -> bytes:
class ProxyApp:
def __init__(self, upstream_ca_certs: str | None = None):
- self.upstream_ca_certs = upstream_ca_certs
+ self.ssl_context = None
+ if upstream_ca_certs:
+ self.ssl_context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
+ self.ssl_context.load_verify_locations(cafile=upstream_ca_certs)
async def __call__(
self, scope: Scope, receive: ASGIReceiveCallable, send: ASGISendCallable
@@ -48,7 +52,7 @@
class ProxyApp:
receive: ASGIReceiveCallable,
send: ASGISendCallable,
) -> None:
- async with httpx.AsyncClient(verify=self.upstream_ca_certs or True) as client:
+ async with httpx.AsyncClient(verify=self.ssl_context or True) as client:
client_response = await client.request(
method=scope["method"],
url=scope["path"],
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
383e158d
test_http2_probe_blocked_per_thread-requires_network.patch
openssl-3.4.0.patch
httpx-0.28.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment