public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-treq] rawhide: Fix compatibility with Sphinx 9.1.0
@ 2026-06-16 18:26 Charalampos Stratakis
  0 siblings, 0 replies; only message in thread
From: Charalampos Stratakis @ 2026-06-16 18:26 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/python-treq
            Branch : rawhide
            Commit : 7e2f9b8a180b8755e53b09f6bc96e49d1e05b6ec
            Author : Charalampos Stratakis <cstratak@redhat.com>
            Date   : 2026-06-16T19:38:36+02:00
            Stats  : +81/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-treq/c/7e2f9b8a180b8755e53b09f6bc96e49d1e05b6ec?branch=rawhide

            Log:
            Fix compatibility with Sphinx 9.1.0

Resolves: rhbz#2440191

---
diff --git a/python-treq.spec b/python-treq.spec
index 839537f..7104a54 100644
--- a/python-treq.spec
+++ b/python-treq.spec
@@ -4,7 +4,7 @@
 
 Name:           python-%{pypi_name}
 Version:        25.5.0
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        A requests-like API built on top of twisted.web's Agent
 
 License:        MIT
@@ -12,6 +12,9 @@ URL:            https://github.com/twisted/treq
 Source0:        https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
 BuildArch:      noarch
 
+# Fix build with sphinx 9.1.0
+# Resolved upstream: https://github.com/twisted/treq/issues/423
+Patch:          sphinx-9.1.0-compat.patch
 
 BuildRequires:  python3-devel
 # For tests
@@ -41,7 +44,7 @@ Documentation for treq
 %endif
 
 %prep
-%autosetup -n %{pypi_name}-%{version}
+%autosetup -n %{pypi_name}-%{version} -p1
 
 %generate_buildrequires
 %pyproject_buildrequires %{?with_doc:-x docs}
@@ -74,6 +77,10 @@ rm -rf html/.{doctrees,buildinfo}
 %endif
 
 %changelog
+* Tue Jun 16 2026 Charalampos Stratakis <cstratak@redhat.com> - 25.5.0-5
+- Fix compatibility with Sphinx 9.1.0
+Resolves: rhbz#2440191
+
 * Thu Jun 04 2026 Python Maint <python-maint@redhat.com> - 25.5.0-4
 - Rebuilt for Python 3.15
 

diff --git a/sphinx-9.1.0-compat.patch b/sphinx-9.1.0-compat.patch
new file mode 100644
index 0000000..a38ac3d
--- /dev/null
+++ b/sphinx-9.1.0-compat.patch
@@ -0,0 +1,72 @@
+From 9c460a91a8f67defc9f954e2ab29f394a0ba864b Mon Sep 17 00:00:00 2001
+From: Teemu Hukkanen <tjhukkan@iki.fi>
+Date: Fri, 22 May 2026 14:55:19 +0300
+Subject: [PATCH] Fix missing sphinx default role
+
+Use appropriate :class:`twisted.web.resource.IResource` instead of
+`IResource`.
+
+Use double backticks to mark allow_redirects=False as a code example.
+
+Use double backticks for basic python types, as used elsewhere in the
+same documentation.
+
+Fixes: #423
+---
+ changelog.d/423.bugfix.rst | 1 +
+ docs/howto.rst             | 6 +++---
+ docs/testing.rst           | 2 +-
+ 3 files changed, 5 insertions(+), 4 deletions(-)
+ create mode 100644 changelog.d/423.bugfix.rst
+
+diff --git a/changelog.d/423.bugfix.rst b/changelog.d/423.bugfix.rst
+new file mode 100644
+index 00000000..81a08c4d
+--- /dev/null
++++ b/changelog.d/423.bugfix.rst
+@@ -0,0 +1 @@
++Fix building documentation with Sphinx 9.1.0.
+diff --git a/docs/howto.rst b/docs/howto.rst
+index 32da368c..bef3a60b 100644
+--- a/docs/howto.rst
++++ b/docs/howto.rst
+@@ -51,7 +51,7 @@ The ``params`` argument may be either a ``dict`` or a ``list`` of
+ ``(key, value)`` tuples.
+ 
+ If it is a ``dict`` then the values in the dict may either be scalar values or a ``list`` or ``tuple`` thereof.
+-Scalar values means `str`, `bytes`, or anything else — even ``None`` — which will be coerced to `str`.
++Scalar values means ``str``, ``bytes``, or anything else — even ``None`` — which will be coerced to ``str``.
+ Strings are UTF-8 encoded.
+ 
+ .. literalinclude:: examples/query_params.py
+@@ -104,7 +104,7 @@ The following will print a 200 OK response.
+ 
+ Full example: :download:`redirects.py <examples/redirects.py>`
+ 
+-You can easily disable redirects by simply passing `allow_redirects=False` to
++You can easily disable redirects by simply passing ``allow_redirects=False`` to
+ any of the request methods.
+ 
+ .. literalinclude:: examples/disable_redirects.py
+@@ -126,7 +126,7 @@ Full example: :download:`response_history.py <examples/response_history.py>`
+ Cookies
+ -------
+ 
+-Cookies can be set by passing a `dict` or :py:class:`http.cookiejar.CookieJar` instance via the *cookies* keyword argument.
++Cookies can be set by passing a ``dict`` or :py:class:`http.cookiejar.CookieJar` instance via the *cookies* keyword argument.
+ Any cookies set by the server can be retrieved using the :py:meth:`~treq.response._Response.cookies()` response method, which returns a :py:class:`~http.cookiejar.CookieJar`.
+ 
+ Use :py:func:`treq.cookies.search()` to extract cookies from the jar:
+diff --git a/docs/testing.rst b/docs/testing.rst
+index 855bc69c..f724d339 100644
+--- a/docs/testing.rst
++++ b/docs/testing.rst
+@@ -9,7 +9,7 @@ Writing tests for HTTP clients
+ The :class:`~treq.testing.StubTreq` class implements the :mod:`treq` module interface (:func:`treq.get()`, :func:`treq.post()`, etc.) but runs all I/O via a :class:`~twisted.internet.testing.MemoryReactor`.
+ It wraps a :class:`twisted.web.resource.IResource` provider which handles each request.
+ 
+-You can wrap a pre-existing `IResource` provider, or write your own.
++You can wrap a pre-existing :class:`twisted.web.resource.IResource` provider, or write your own.
+ For example, the :class:`twisted.web.resource.ErrorPage` resource can produce an arbitrary HTTP status code.
+ :class:`twisted.web.static.File` can serve files or directories.
+ And you can easily achieve custom responses by writing trivial resources yourself:

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-16 18:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-16 18:26 [rpms/python-treq] rawhide: Fix compatibility with Sphinx 9.1.0 Charalampos Stratakis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox