diff options
| author | root <root@alpha.trunkmasters.com> | 2026-09-17 22:25:09 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-09-17 22:25:09 -0500 |
| commit | 79477d9c98f30c3ebedd8b75721260b257822d65 (patch) | |
| tree | 6382d7f3017e7fe54b0858648589f42075c9ca2e /dev-python/pycurl | |
| parent | e354c0374d2aa19224b635b0ce38bd0e6a6b5fc3 (diff) | |
| download | baldeagleos-repo-79477d9c98f30c3ebedd8b75721260b257822d65.tar.gz baldeagleos-repo-79477d9c98f30c3ebedd8b75721260b257822d65.tar.xz baldeagleos-repo-79477d9c98f30c3ebedd8b75721260b257822d65.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pycurl')
| -rw-r--r-- | dev-python/pycurl/files/pycurl-7.47.0-except.patch | 51 | ||||
| -rw-r--r-- | dev-python/pycurl/pycurl-7.47.0.ebuild | 11 | ||||
| -rw-r--r-- | dev-python/pycurl/pycurl-7.48.0.ebuild | 12 |
3 files changed, 67 insertions, 7 deletions
diff --git a/dev-python/pycurl/files/pycurl-7.47.0-except.patch b/dev-python/pycurl/files/pycurl-7.47.0-except.patch new file mode 100644 index 000000000000..d969055ab33a --- /dev/null +++ b/dev-python/pycurl/files/pycurl-7.47.0-except.patch @@ -0,0 +1,51 @@ +From 1d028bbb1a1811e976efa8262d713485b70dc437 Mon Sep 17 00:00:00 2001 +From: Scott Talbert <swt@techie.net> +Date: Thu, 17 Sep 2026 11:18:02 -0400 +Subject: [PATCH 2/3] Preserve pending exception across CurlMulti dealloc + cleanup + +do_multi_dealloc() can run while an exception is already propagating, +e.g. when a CurlMulti subclass's __init__ rejects its arguments: the +freshly constructed object's refcount drops to zero and it is torn +down immediately, before the TypeError finishes unwinding. The +cleanup in util_multi_detach_easies() calls back into Python (via +PySequence_List() on easy_object_refs, and close() on any attached +easy handles), which must not run with that exception still set. + +On a Python interpreter built with assertions enabled, this trips +_Py_CheckSlotResult and aborts the process (fixes #1071). Save and +restore the pending exception around the dealloc cleanup, matching +the existing pattern in easycb.c. +--- + src/multi.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/multi.c b/src/multi.c +index 170bfa098..ae4564116 100644 +--- a/src/multi.c ++++ b/src/multi.c +@@ -216,6 +216,15 @@ util_multi_detach_easies(CurlMultiObject *self, int close_handles, int swallow_e + PYCURL_INTERNAL void + do_multi_dealloc(CurlMultiObject *self) + { ++ /* tp_dealloc can run while an exception is propagating (e.g. when ++ * __init__ of a subclass rejects our arguments and the freshly ++ * constructed object is immediately discarded). The cleanup below ++ * calls back into Python (iterating easy_object_refs, calling the ++ * easy objects' close() method), which must not observe that ++ * exception, so stash it for the duration. */ ++ PyObject *exc_type, *exc_val, *exc_tb; ++ PyErr_Fetch(&exc_type, &exc_val, &exc_tb); ++ + PyObject_GC_UnTrack(self); + Py_TRASHCAN_BEGIN(self, do_multi_dealloc); + +@@ -235,6 +244,8 @@ do_multi_dealloc(CurlMultiObject *self) + + CurlMulti_Type.tp_free(self); + Py_TRASHCAN_END ++ ++ PyErr_Restore(exc_type, exc_val, exc_tb); + } + + diff --git a/dev-python/pycurl/pycurl-7.47.0.ebuild b/dev-python/pycurl/pycurl-7.47.0.ebuild index b05557df4350..df64dd7b9e70 100644 --- a/dev-python/pycurl/pycurl-7.47.0.ebuild +++ b/dev-python/pycurl/pycurl-7.47.0.ebuild @@ -6,7 +6,6 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_USE_PEP517=setuptools PYPI_VERIFY_REPO=https://github.com/pycurl/pycurl -# broken assertions with py3.12 PYTHON_COMPAT=( python3_{13..14} ) inherit distutils-r1 pypi toolchain-funcs @@ -52,13 +51,19 @@ BDEPEND=" EPYTEST_PLUGINS=( flaky ) : ${EPYTEST_TIMEOUT:=120} +EPYTEST_XDIST=1 distutils_enable_tests pytest python_prepare_all() { - # docs installed into the wrong directory - sed -e "/setup_args\['data_files'\] = /d" -i setup.py || die + local PATCHES=( + # https://github.com/pycurl/pycurl/pull/1072 + "${FILESDIR}/${PN}-7.47.0-except.patch" + ) distutils-r1_python_prepare_all + + # docs installed into the wrong directory + sed -e "/setup_args\['data_files'\] = /d" -i setup.py || die } python_configure_all() { diff --git a/dev-python/pycurl/pycurl-7.48.0.ebuild b/dev-python/pycurl/pycurl-7.48.0.ebuild index b71b7b57bf61..a904ea3f5926 100644 --- a/dev-python/pycurl/pycurl-7.48.0.ebuild +++ b/dev-python/pycurl/pycurl-7.48.0.ebuild @@ -6,8 +6,6 @@ EAPI=8 DISTUTILS_EXT=1 DISTUTILS_USE_PEP517=setuptools PYPI_VERIFY_REPO=https://github.com/pycurl/pycurl -# broken assertions with py3.12 -# https://github.com/pycurl/pycurl/issues/1071 PYTHON_COMPAT=( python3_{13..14} ) inherit distutils-r1 pypi toolchain-funcs @@ -53,13 +51,19 @@ BDEPEND=" EPYTEST_PLUGINS=( flaky ) : ${EPYTEST_TIMEOUT:=120} +EPYTEST_XDIST=1 distutils_enable_tests pytest python_prepare_all() { - # docs installed into the wrong directory - sed -e "/setup_args\['data_files'\] = /d" -i setup.py || die + local PATCHES=( + # https://github.com/pycurl/pycurl/pull/1072 + "${FILESDIR}/${PN}-7.47.0-except.patch" + ) distutils-r1_python_prepare_all + + # docs installed into the wrong directory + sed -e "/setup_args\['data_files'\] = /d" -i setup.py || die } python_configure_all() { |
