public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Karolina Surma <ksurma@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-yarl] f44: Fix compatibility with Python 3.15
Date: Wed, 23 Sep 2026 10:55:33 GMT [thread overview]
Message-ID: <179016093321.1.2235507631453353252.rpms-python-yarl-f7de81d58d0e@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-yarl
Branch : f44
Commit : f7de81d58d0e1b4353a4630355aa74238d24946d
Author : Karolina Surma <ksurma@redhat.com>
Date : 2026-04-10T09:31:51+02:00
Stats : +35/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-yarl/c/f7de81d58d0e1b4353a4630355aa74238d24946d?branch=f44
Log:
Fix compatibility with Python 3.15
---
diff --git a/Fix-pickling-with-Python-3.15.patch b/Fix-pickling-with-Python-3.15.patch
new file mode 100644
index 0000000..3322966
--- /dev/null
+++ b/Fix-pickling-with-Python-3.15.patch
@@ -0,0 +1,32 @@
+From 4dc81a3d1fcb801e0e75bd18dff756964c6c3e71 Mon Sep 17 00:00:00 2001
+From: Karolina Surma <ksurma@redhat.com>
+Date: Tue, 10 Mar 2026 14:39:28 +0100
+Subject: [PATCH 1/2] Fix pickling URLs with Python 3.15.0a6+ (Fixes #1632)
+
+In Python 3.15 urllib.parse.SplitResult gained a new __getstate__
+method which fails when called on instances created via tuple.__new__:
+https://github.com/python/cpython/commit/c5cfcdf1
+Returning self._val directly instead of creating a new SplitResult
+instance avoids the problematic code path, and is backwards compatible.
+---
+ yarl/_url.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/yarl/_url.py b/yarl/_url.py
+index 527a576..90f3dce 100644
+--- a/yarl/_url.py
++++ b/yarl/_url.py
+@@ -556,8 +556,8 @@ class URL:
+ def __bool__(self) -> bool:
+ return bool(self._netloc or self._path or self._query or self._fragment)
+
+- def __getstate__(self) -> tuple[SplitResult]:
+- return (tuple.__new__(SplitResult, self._val),)
++ def __getstate__(self) -> tuple[SplitURLType]:
++ return (self._val,)
+
+ def __setstate__(
+ self, state: Union[tuple[SplitURLType], tuple[None, _InternalURLCache]]
+--
+2.53.0
+
diff --git a/python-yarl.spec b/python-yarl.spec
index d384d60..f8590d5 100644
--- a/python-yarl.spec
+++ b/python-yarl.spec
@@ -9,6 +9,9 @@ Summary: Python module to handle URLs
License: Apache-2.0
URL: https://yarl.readthedocs.io
Source0: https://github.com/aio-libs/yarl/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
+# Compatibility with Python 3.15
+# Adapted from: https://github.com/aio-libs/yarl/pull/1642
+Patch: Fix-pickling-with-Python-3.15.patch
BuildRequires: gcc
BuildRequires: python3-devel
reply other threads:[~2026-09-23 10:55 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=179016093321.1.2235507631453353252.rpms-python-yarl-f7de81d58d0e@fedoraproject.org \
--to=ksurma@redhat.com \
--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