public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-pycurl] rawhide: Update to 7.47.0
@ 2026-07-09 15:24 Jacek Migacz
0 siblings, 0 replies; only message in thread
From: Jacek Migacz @ 2026-07-09 15:24 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-pycurl
Branch : rawhide
Commit : 9770c936b22f6116ea665fab062ba5706b0bf12d
Author : Jacek Migacz <jmigacz@redhat.com>
Date : 2026-07-09T11:16:09+00:00
Stats : +6/-187 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/python-pycurl/c/9770c936b22f6116ea665fab062ba5706b0bf12d?branch=rawhide
Log:
Update to 7.47.0
---
diff --git a/0002-harden-multi-socket-tests.patch b/0002-harden-multi-socket-tests.patch
deleted file mode 100644
index 6d6fd4c..0000000
--- a/0002-harden-multi-socket-tests.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From upstream PR #990 - Harden test_clear_assignment_inside_socket_callback_resets_socketp test
-
-The original tests test_multi_unassign_inside_socket_callback and
-test_clear_via_assign_none_inside_callback_resets_socketp are flaky because
-they rely on libcurl firing additional callbacks after unassign(), which is
-not guaranteed.
-
-This patch backports the fix from upstream commit that:
-1. Removes the flaky tests
-2. Replaces them with a more robust test that checks reference counting
- instead of callback timing
-3. Adds @flaky decorator acknowledging inherent timing issues
-
-Upstream: https://github.com/pycurl/pycurl/pull/990
-Fixes: test failures on i686 architecture
-
---- a/tests/multi_socket_test.py
-+++ b/tests/multi_socket_test.py
-@@ -1,15 +1,19 @@
- import gc
-+import logging
- import select
- import sys
- import time
- import weakref
- from io import BytesIO
-
-+import flaky
- import pycurl
- import pytest
-
- from . import util
-
-+logger = logging.getLogger(__name__)
-+
-
- @pytest.fixture
- def multi():
-@@ -261,40 +265,6 @@ def socket(event, sock_fd, multi_handle, data):
- )
-
-
--def test_multi_unassign_inside_socket_callback(app, multi):
-- class Marker:
-- pass
--
-- marker = Marker()
-- events = []
-- errors = []
-- unassigned = False
--
-- def socket(event, sock_fd, multi_handle, data):
-- nonlocal unassigned
-- events.append((sock_fd, event, data))
-- try:
-- if event != pycurl.POLL_REMOVE and data is None and not unassigned:
-- multi.assign(sock_fd, marker)
-- elif data is marker and not unassigned:
-- multi.unassign(sock_fd)
-- unassigned = True
-- except pycurl.error as e:
-- errors.append(e)
--
-- for _ in _chunks_transfer(app, multi, socket, "unassign in callback"):
-- pass
--
-- assert errors == []
-- assert unassigned, "did not reach unassign() in callback"
-- marker_seen = [i for i, (_, _, d) in enumerate(events) if d is marker]
-- assert marker_seen, "expected at least one callback with marker as socketp"
-- # After the last marker-bearing callback, libcurl's slot is cleared, so
-- # at least one subsequent callback should observe socketp as None again.
-- later_none = [d for _, _, d in events[marker_seen[-1] + 1 :] if d is None]
-- assert later_none, "expected socketp to be None again after unassign()"
--
--
- def test_socketp_starts_as_none(app, multi):
- seen_per_fd: dict[int, list] = {}
-
-@@ -311,31 +281,56 @@ def socket(event, sock_fd, multi_handle, data):
- )
-
-
--def test_clear_via_assign_none_inside_callback_resets_socketp(app, multi):
-+@flaky.flaky(max_runs=3)
-+@pytest.mark.parametrize(
-+ "clear",
-+ [
-+ lambda multi, sock: multi.unassign(sock),
-+ lambda multi, sock: multi.assign(sock, None),
-+ ],
-+ ids=["unassign", "assign_none"],
-+)
-+def test_clear_assignment_inside_socket_callback_releases_ref(app, multi, clear):
- class Marker:
- pass
-
- marker = Marker()
-- events = []
-- cleared = False
-+ # why: weakref keeps the closure from pinning marker and defeating the GC check below.
-+ marker_ref = weakref.ref(marker)
-+ errors = []
-+ cleared_fds = set()
-
- def socket(event, sock_fd, multi_handle, data):
-- nonlocal cleared
-- events.append((sock_fd, event, data))
-- if event != pycurl.POLL_REMOVE and data is None and not cleared:
-- multi.assign(sock_fd, marker)
-- elif data is marker and not cleared:
-- multi.assign(sock_fd, None)
-- cleared = True
-+ # why: log primitives only -- passing `data` would pin marker via LogRecord args.
-+ kind = (
-+ "None" if data is None else ("marker" if data is marker_ref() else "other")
-+ )
-+ logger.debug(
-+ "socket_cb event=%d fd=%d data=%s cleared_fds=%s",
-+ event,
-+ sock_fd,
-+ kind,
-+ sorted(cleared_fds),
-+ )
-+ try:
-+ if data is marker_ref():
-+ clear(multi, sock_fd)
-+ cleared_fds.add(sock_fd)
-+ elif data is None and not cleared_fds and event != pycurl.POLL_REMOVE:
-+ multi.assign(sock_fd, marker_ref())
-+ except pycurl.error as e:
-+ errors.append(e)
-
-- for _ in _chunks_transfer(app, multi, socket, "assign(None) in callback"):
-+ for _ in _chunks_transfer(app, multi, socket, "clear in callback"):
- pass
-
-- assert cleared, "did not reach assign(None) inside callback"
-- marker_idx = [i for i, (_, _, d) in enumerate(events) if d is marker]
-- assert marker_idx
-- later_none = [d for _, _, d in events[marker_idx[-1] + 1 :] if d is None]
-- assert later_none, "expected socketp to be None after assign(fd, None)"
-+ assert errors == [], errors
-+ assert cleared_fds, "did not reach clear inside callback"
-+ del marker
-+ gc.collect()
-+ assert marker_ref() is None, (
-+ "expected multi to drop strong ref to marker after clear"
-+ )
-
-
- def _assign_marker_then_close(app):
diff --git a/ea92e3ca230a3ff3d464cb6816102fa157177aca.patch b/ea92e3ca230a3ff3d464cb6816102fa157177aca.patch
deleted file mode 100644
index 294c1b6..0000000
--- a/ea92e3ca230a3ff3d464cb6816102fa157177aca.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From ea92e3ca230a3ff3d464cb6816102fa157177aca Mon Sep 17 00:00:00 2001
-From: Jacek Migacz <jmigacz@redhat.com>
-Date: Fri, 17 Oct 2025 13:55:48 +0200
-Subject: [PATCH] Skip Kerberos tests on libcurl >= 8.17.0
-
-CURLOPT_KRBLEVEL and CURLOPT_KRB4LEVEL were removed in libcurl
-8.17.0 and now return CURLE_NOT_BUILT_IN.
----
- tests/option_constants_test.py | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py
-index 1dd862c39..de1b08012 100644
---- a/tests/option_constants_test.py
-+++ b/tests/option_constants_test.py
-@@ -502,12 +502,14 @@ def test_ssl_sessionid_cache(self):
- curl.setopt(curl.SSL_SESSIONID_CACHE, True)
- curl.close()
-
-+ @util.removed_in_libcurl(8, 17, 0)
- @util.only_gssapi
- def test_krblevel(self):
- curl = pycurl.Curl()
- curl.setopt(curl.KRBLEVEL, 'clear')
- curl.close()
-
-+ @util.removed_in_libcurl(8, 17, 0)
- @util.only_gssapi
- def test_krb4level(self):
- curl = pycurl.Curl()
diff --git a/python-pycurl.spec b/python-pycurl.spec
index 2abd44b..466b4f4 100644
--- a/python-pycurl.spec
+++ b/python-pycurl.spec
@@ -8,8 +8,8 @@
%global modname pycurl
Name: python-%{modname}
-Version: 7.46.0
-Release: 3%{?dist}
+Version: 7.47.0
+Release: 1%{?dist}
Summary: A Python interface to libcurl
License: curl OR LGPL-2.1-or-later
@@ -18,8 +18,6 @@ Source0: %{pypi_source pycurl}
# drop link-time vs. run-time TLS backend check (#1446850)
Patch1: 0001-python-pycurl-7.45.1-tls-backend.patch
-# backport test hardening from upstream PR #990
-Patch2: 0002-harden-multi-socket-tests.patch
BuildRequires: gcc
BuildRequires: libcurl-devel
@@ -97,6 +95,9 @@ export PYTEST_ADDOPTS="--ignore examples -m 'not online'"
%doc ChangeLog README.rst examples doc
%changelog
+* Thu Jul 09 2026 Jacek Migacz <jmigacz@redhat.com> - 7.47.0-1
+- Update to 7.47.0 (#2494700)
+
* Fri Jun 12 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 7.46.0-3
- Rebuilt for openssl 4.0
diff --git a/sources b/sources
index 75be153..3422ddd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (pycurl-7.46.0.tar.gz) = b30f41513b30b0ec54c8f3994245c5e31af194176086081040862772f059907375a7711c7a941c08c5c3daddfd9aae2ded3f0ed7fd6baa480ac1610de6959f8c
+SHA512 (pycurl-7.47.0.tar.gz) = 4dbd60c60fe6cab898a1477f144d3e7e6618939be62cbd29d3c3d675c846c0b44d518364d0b63a0c3d3255db7a31b9cb86201ccafe4b39dae23a52902be68bca
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-09 15:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-09 15:24 [rpms/python-pycurl] rawhide: Update to 7.47.0 Jacek Migacz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox