public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-starlette] rawhide: Document and minimize the patch for testing with httpx vs. httpx2
Date: Sun, 31 May 2026 17:09:57 GMT	[thread overview]
Message-ID: <178024739795.1.8268820620261423069.rpms-python-starlette-9012e1b3abfe@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-starlette
            Branch : rawhide
            Commit : 9012e1b3abfe7c726df90133ae2aa4eeb2883eab
            Author : Benjamin A. Beasley <code@musicinmybrain.net>
            Date   : 2026-05-31T17:57:24+01:00
            Stats  : +6/-93 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-starlette/c/9012e1b3abfe7c726df90133ae2aa4eeb2883eab?branch=rawhide

            Log:
            Document and minimize the patch for testing with httpx vs. httpx2

This adds a comment to the spec file for context and upstream status:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_all_patches_should_have_an_upstream_bug_link_or_comment

Reverting only the lines that are absolutely necessary makes it clearer
what we are doing with the patch, and also makes it easier to carry it
in future releases without constant interactive rebasing.

---
diff --git a/python-starlette-1.2.0-PR3295-undo.patch b/python-starlette-1.2.0-PR3295-undo.patch
index edde3f0..44b7188 100644
--- a/python-starlette-1.2.0-PR3295-undo.patch
+++ b/python-starlette-1.2.0-PR3295-undo.patch
@@ -1,30 +1,3 @@
-diff -Naur python-starlette-1.2.0-orig/pyproject.toml python-starlette-1.2.0/pyproject.toml
---- python-starlette-1.2.0-orig/pyproject.toml	2026-05-28 07:36:57.000000000 -0400
-+++ python-starlette-1.2.0/pyproject.toml	2026-05-28 13:14:14.052233975 -0400
-@@ -48,7 +48,6 @@
- dev = [
-     # We add starlette[full] so `uv sync` considers the extras.
-     "starlette[full]",
--    "httpx2[zstd]>=2.0.0",
-     "coverage>=7.8.2",
-     "importlib-metadata==9.0.0",
-     "mypy==1.16.1",
-diff -Naur python-starlette-1.2.0-orig/starlette/testclient.py python-starlette-1.2.0/starlette/testclient.py
---- python-starlette-1.2.0-orig/starlette/testclient.py	2026-05-28 07:36:57.000000000 -0400
-+++ python-starlette-1.2.0/starlette/testclient.py	2026-05-28 13:13:35.417345613 -0400
-@@ -41,10 +41,10 @@
- else:
-     try:
-         import httpx2 as httpx
--    except ModuleNotFoundError:  # pragma: no cover
-+    except ModuleNotFoundError:
-         try:
-             import httpx
--        except ModuleNotFoundError:
-+        except ModuleNotFoundError:  # pragma: no cover
-             raise RuntimeError(
-                 "The starlette.testclient module requires the httpx2 package to be installed.\n"
-                 "You can install this with:\n"
 diff -Naur python-starlette-1.2.0-orig/tests/test_requests.py python-starlette-1.2.0/tests/test_requests.py
 --- python-starlette-1.2.0-orig/tests/test_requests.py	2026-05-28 07:36:57.000000000 -0400
 +++ python-starlette-1.2.0/tests/test_requests.py	2026-05-28 13:13:35.414490586 -0400
@@ -49,69 +22,3 @@ diff -Naur python-starlette-1.2.0-orig/tests/test_websockets.py python-starlette
              "connection": "upgrade",
              "host": "testserver",
              "user-agent": "testclient",
-diff -Naur python-starlette-1.2.0-orig/uv.lock python-starlette-1.2.0/uv.lock
---- python-starlette-1.2.0-orig/uv.lock	2026-05-28 07:36:57.000000000 -0400
-+++ python-starlette-1.2.0/uv.lock	2026-05-28 13:14:51.630697167 -0400
-@@ -468,19 +468,6 @@
- ]
- 
- [[package]]
--name = "httpcore2"
--version = "2.2.0"
--source = { registry = "https://pypi.org/simple" }
--dependencies = [
--    { name = "certifi" },
--    { name = "h11" },
--]
--sdist = { url = "https://files.pythonhosted.org/packages/1a/7e/8ab39aab1d392845b6512009a9be57d24a5bd4ec7a22d02e513d0645e7a8/httpcore2-2.2.0.tar.gz", hash = "sha256:10e0e142f1ecc1c1cb2a9ebbce82e57f16169f61d163ea336abf36799e89294b", size = 63533, upload-time = "2026-05-17T05:29:55.836Z" }
--wheels = [
--    { url = "https://files.pythonhosted.org/packages/39/22/64de17e7956e8c002f7558ed667d924c2a288344aeff4bd8ff5dc5fdb70b/httpcore2-2.2.0-py3-none-any.whl", hash = "sha256:ce859f268bf8d34fa2d7753e09e4dd5194f557e1b3038439b68a89b2999572fa", size = 79288, upload-time = "2026-05-17T05:29:52.56Z" },
--]
--
--[[package]]
- name = "httpx"
- version = "0.28.1"
- source = { registry = "https://pypi.org/simple" }
-@@ -496,26 +483,6 @@
- ]
- 
- [[package]]
--name = "httpx2"
--version = "2.2.0"
--source = { registry = "https://pypi.org/simple" }
--dependencies = [
--    { name = "anyio" },
--    { name = "certifi" },
--    { name = "httpcore2" },
--    { name = "idna" },
--]
--sdist = { url = "https://files.pythonhosted.org/packages/f4/aa/c3119de1aa7ad870a01aaddbf3bc3445ed9a681c31d45e3838fd8b7bc155/httpx2-2.2.0.tar.gz", hash = "sha256:f3428d59b1752b8f5629826277262fb4d65e3a683f48af8a5b16c4d012e0b801", size = 80477, upload-time = "2026-05-17T05:29:57.376Z" }
--wheels = [
--    { url = "https://files.pythonhosted.org/packages/be/e0/e0a52596c14194e428c20de4903f4abec38c0dfb5364d20f1d4a2b6266ef/httpx2-2.2.0-py3-none-any.whl", hash = "sha256:12347ebd2daeaefd50b529359778fff767082a09c5826752c963e71269722ff0", size = 74083, upload-time = "2026-05-17T05:29:54.543Z" },
--]
--
--[package.optional-dependencies]
--zstd = [
--    { name = "zstandard", marker = "python_full_version < '3.14'" },
--]
--
--[[package]]
- name = "id"
- version = "1.5.0"
- source = { registry = "https://pypi.org/simple" }
-@@ -1302,7 +1269,6 @@
- [package.dev-dependencies]
- dev = [
-     { name = "coverage" },
--    { name = "httpx2", extra = ["zstd"] },
-     { name = "importlib-metadata" },
-     { name = "mypy" },
-     { name = "pytest" },
-@@ -1334,7 +1300,6 @@
- [package.metadata.requires-dev]
- dev = [
-     { name = "coverage", specifier = ">=7.8.2" },
--    { name = "httpx2", extras = ["zstd"], specifier = ">=2.0.0" },
-     { name = "importlib-metadata", specifier = "==9.0.0" },
-     { name = "mypy", specifier = "==1.16.1" },
-     { name = "pytest", specifier = "==9.0.3" },

diff --git a/python-starlette.spec b/python-starlette.spec
index 4ca5e58..e554b8a 100644
--- a/python-starlette.spec
+++ b/python-starlette.spec
@@ -7,6 +7,12 @@ License:        BSD-3-Clause
 URL:            https://www.starlette.io/
 Source:         https://github.com/encode/starlette/archive/%{version}/starlette-%{version}.tar.gz
 
+# Since https://github.com/Kludex/starlette/pull/3291, Starlette prefers
+# httpx2, a maintained fork of httpx by the Pydantic people, when it is
+# available. Once we have a python-httpx2 package, we can update the
+# BuildRequires accordingly. Until then, we (downstream-only) revert the part
+# of https://github.com/Kludex/starlette/pull/3295 that adjusted test
+# expectations around the accept-encoding header to match httpx2.
 Patch:          python-starlette-1.2.0-PR3295-undo.patch
 
 BuildSystem:    pyproject

                 reply	other threads:[~2026-05-31 17:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178024739795.1.8268820620261423069.rpms-python-starlette-9012e1b3abfe@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox