summaryrefslogtreecommitdiff
path: root/dev-python/greenlet
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-10-14 04:04:03 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-10-14 04:04:03 +0100
commit2916cf6049cf9d3092021e247d56c580df6029a7 (patch)
treec796a6fc8b6fd0e4fd5ac06b009000b438fed7d9 /dev-python/greenlet
parent7b5306e0d287565138e8b051e32f57e6af6ae0ed (diff)
gentoo auto-resync : 14:10:2024 - 04:04:03
Diffstat (limited to 'dev-python/greenlet')
-rw-r--r--dev-python/greenlet/Manifest5
-rw-r--r--dev-python/greenlet/files/greenlet-3.0.3-py313.patch225
-rw-r--r--dev-python/greenlet/greenlet-3.0.3-r1.ebuild53
-rw-r--r--dev-python/greenlet/greenlet-3.1.1.ebuild2
4 files changed, 2 insertions, 283 deletions
diff --git a/dev-python/greenlet/Manifest b/dev-python/greenlet/Manifest
index a61ee7f2ef59..664362905600 100644
--- a/dev-python/greenlet/Manifest
+++ b/dev-python/greenlet/Manifest
@@ -1,6 +1,3 @@
-AUX greenlet-3.0.3-py313.patch 8632 BLAKE2B 74d1119fdadd1f08a9a0e60398033be9e53797dbff466e896d8a935f4b9923e9ad399bb66ba07cabbbead296950a7e3fb7893f26c0f6b9057639f6db8b44f5e3 SHA512 b7c6185319426aa8a5e2808ad8d8e9d1db6c97e4fe4bb09f8a30af3f9e69426f6dd445d805c7ba3462dc47694dd912f94cc91834c04cc4fdc20d5cd6bb73491b
-DIST greenlet-3.0.3.tar.gz 182013 BLAKE2B 34ba9f13dd01f5bacedb69952b4d3d08e55eba82d94c5d95cf8bfeb0f1ce94dbde9d62f5e56c33cbf2467d82f6ffd8d05a37048d0292102b1dbb68c67e9398f4 SHA512 20d8818376a200332cbc2c85968317ddf828d2adf3fcc3c53623cd1504ec9a4e4e987e841bd2fe65e934e2b8a5e73a7205847526f0bd196e7afcdf3ae40e9d9b
DIST greenlet-3.1.1.tar.gz 186022 BLAKE2B 1d73f63d3bf881534bd64eca6510f32d1596261bd42176d396c7a0442494c73f8b03e57621bd11fc1bc67db550514c26a94926eaba8c53e08eecb3f999c9ba16 SHA512 915a6e22c20b235de472c61c7bc4cb60a08b79e29127c4fb817c362cee37f589bc362f12ed31bdc7dda91f49976d4e2784c8d13202bf598156a0aacacdb7f6fb
-EBUILD greenlet-3.0.3-r1.ebuild 1284 BLAKE2B c66f36eb0edbdd736aa22a678493c72c1b94ce5c7abf1dc30120d3ecd802eff1b06baec7bb83d434c2399c883f7c11dbb7cac39c34e77b95aca71a081d2ca473 SHA512 181257056ea9968a33d4332122886afdb53fbb0ecf4f6907e17f47b1c55a882ac8c22692fa54b3f7596b9764e72313428a6ad431a1317a00a8fc9e27afd1ffd1
-EBUILD greenlet-3.1.1.ebuild 1174 BLAKE2B db2cdf3f73c44ad464d02caf5eeda9b761b40d449cd4ec9d8ec883e410fdd296af8f90b279faeeab667336fc367ee27a45b3118517d381811af3f65c2dcada97 SHA512 ca93c6e9da6ed9ddf7ceda5bfa3d79b3500f183be108fb207cec0d89d79fe04d8726f77093f53d3095a37e07addb4184a5f081ecbe703b47e4eba990cd6644b1
+EBUILD greenlet-3.1.1.ebuild 1173 BLAKE2B 43ab15015a64d405004d70ffce68bfe57853ab2e9f9087bd6b41478206cc08fa7903ad5f161de286897915169231dedd81baf62545a7263977dc4c3bb6b096fd SHA512 43192ad994cf76d1564520bc32fc2ad61692eb9a171af0b02077533bc5825f454d5f1753ff57d19e2a6b5b21a46fc7587ce1503193c6cb730bcdd4b00bdb1588
MISC metadata.xml 388 BLAKE2B db0aba92c5c405fa5736f97c2db14319514e95296ad11aa9aac26e95bdb630961e2ae430cbfcdf2b72425c805b83556f3dda6983dde075be3cb0a3f7d0a45e8f SHA512 3b9003e181f15b46ddd5af3e4a6012f115ca42be0bf2f4e40c0fbb196231de8a5b1320d402de6d4105f61d7e4fd5d868131404796cea19a7547a53ee17c26ce1
diff --git a/dev-python/greenlet/files/greenlet-3.0.3-py313.patch b/dev-python/greenlet/files/greenlet-3.0.3-py313.patch
deleted file mode 100644
index 195acae3fa6d..000000000000
--- a/dev-python/greenlet/files/greenlet-3.0.3-py313.patch
+++ /dev/null
@@ -1,225 +0,0 @@
-diff --git a/src/greenlet/TPythonState.cpp b/src/greenlet/TPythonState.cpp
-index 465d4174..82eb34f0 100644
---- a/src/greenlet/TPythonState.cpp
-+++ b/src/greenlet/TPythonState.cpp
-@@ -18,7 +18,11 @@ PythonState::PythonState()
- #else
- ,recursion_depth(0)
- #endif
-+#if GREENLET_PY313
-+ ,delete_later(nullptr)
-+#else
- ,trash_delete_nesting(0)
-+#endif
- #if GREENLET_PY311
- ,current_frame(nullptr)
- ,datastack_chunk(nullptr)
-@@ -130,11 +134,15 @@ void PythonState::operator<<(const PyThreadState *const tstate) noexcept
- #if GREENLET_PY311
- #if GREENLET_PY312
- this->py_recursion_depth = tstate->py_recursion_limit - tstate->py_recursion_remaining;
-- this->c_recursion_depth = C_RECURSION_LIMIT - tstate->c_recursion_remaining;
-+ this->c_recursion_depth = Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining;
- #else // not 312
- this->recursion_depth = tstate->recursion_limit - tstate->recursion_remaining;
- #endif // GREENLET_PY312
-+ #if GREENLET_PY313
-+ this->current_frame = tstate->current_frame;
-+ #elif GREENLET_USE_CFRAME
- this->current_frame = tstate->cframe->current_frame;
-+ #endif
- this->datastack_chunk = tstate->datastack_chunk;
- this->datastack_top = tstate->datastack_top;
- this->datastack_limit = tstate->datastack_limit;
-@@ -143,7 +151,9 @@ void PythonState::operator<<(const PyThreadState *const tstate) noexcept
- Py_XDECREF(frame); // PyThreadState_GetFrame gives us a new
- // reference.
- this->_top_frame.steal(frame);
-- #if GREENLET_PY312
-+ #if GREENLET_PY313
-+ this->delete_later = Py_XNewRef(tstate->delete_later);
-+ #elif GREENLET_PY312
- this->trash_delete_nesting = tstate->trash.delete_nesting;
- #else // not 312
- this->trash_delete_nesting = tstate->trash_delete_nesting;
-@@ -199,17 +209,25 @@ void PythonState::operator>>(PyThreadState *const tstate) noexcept
- #if GREENLET_PY311
- #if GREENLET_PY312
- tstate->py_recursion_remaining = tstate->py_recursion_limit - this->py_recursion_depth;
-- tstate->c_recursion_remaining = C_RECURSION_LIMIT - this->c_recursion_depth;
-+ tstate->c_recursion_remaining = Py_C_RECURSION_LIMIT - this->c_recursion_depth;
- this->unexpose_frames();
- #else // \/ 3.11
- tstate->recursion_remaining = tstate->recursion_limit - this->recursion_depth;
- #endif // GREENLET_PY312
-+ #if GREENLET_PY313
-+ tstate->current_frame = this->current_frame;
-+ #elif GREENLET_USE_CFRAME
- tstate->cframe->current_frame = this->current_frame;
-+ #endif
- tstate->datastack_chunk = this->datastack_chunk;
- tstate->datastack_top = this->datastack_top;
- tstate->datastack_limit = this->datastack_limit;
- this->_top_frame.relinquish_ownership();
-- #if GREENLET_PY312
-+ #if GREENLET_PY313
-+ Py_XDECREF(tstate->delete_later);
-+ tstate->delete_later = this->delete_later;
-+ Py_CLEAR(this->delete_later);
-+ #elif GREENLET_PY312
- tstate->trash.delete_nesting = this->trash_delete_nesting;
- #else // not 3.12
- tstate->trash_delete_nesting = this->trash_delete_nesting;
-@@ -238,7 +256,7 @@ void PythonState::set_initial_state(const PyThreadState* const tstate) noexcept
- #if GREENLET_PY312
- this->py_recursion_depth = tstate->py_recursion_limit - tstate->py_recursion_remaining;
- // XXX: TODO: Comment from a reviewer:
-- // Should this be ``C_RECURSION_LIMIT - tstate->c_recursion_remaining``?
-+ // Should this be ``Py_C_RECURSION_LIMIT - tstate->c_recursion_remaining``?
- // But to me it looks more like that might not be the right
- // initialization either?
- this->c_recursion_depth = tstate->py_recursion_limit - tstate->py_recursion_remaining;
-diff --git a/src/greenlet/greenlet.cpp b/src/greenlet/greenlet.cpp
-index 5a9818e8..dfc748a8 100644
---- a/src/greenlet/greenlet.cpp
-+++ b/src/greenlet/greenlet.cpp
-@@ -1328,6 +1328,7 @@ mod_enable_optional_cleanup(PyObject* UNUSED(module), PyObject* flag)
- Py_RETURN_NONE;
- }
-
-+#if !GREENLET_PY313
- PyDoc_STRVAR(mod_get_tstate_trash_delete_nesting_doc,
- "get_tstate_trash_delete_nesting() -> Integer\n"
- "\n"
-@@ -1343,6 +1344,7 @@ mod_get_tstate_trash_delete_nesting(PyObject* UNUSED(module))
- return PyLong_FromLong(tstate->trash_delete_nesting);
- #endif
- }
-+#endif
-
- static PyMethodDef GreenMethods[] = {
- {"getcurrent",
-@@ -1356,7 +1358,9 @@ static PyMethodDef GreenMethods[] = {
- {"get_total_main_greenlets", (PyCFunction)mod_get_total_main_greenlets, METH_NOARGS, mod_get_total_main_greenlets_doc},
- {"get_clocks_used_doing_optional_cleanup", (PyCFunction)mod_get_clocks_used_doing_optional_cleanup, METH_NOARGS, mod_get_clocks_used_doing_optional_cleanup_doc},
- {"enable_optional_cleanup", (PyCFunction)mod_enable_optional_cleanup, METH_O, mod_enable_optional_cleanup_doc},
-+#if !GREENLET_PY313
- {"get_tstate_trash_delete_nesting", (PyCFunction)mod_get_tstate_trash_delete_nesting, METH_NOARGS, mod_get_tstate_trash_delete_nesting_doc},
-+#endif
- {NULL, NULL} /* Sentinel */
- };
-
-diff --git a/src/greenlet/greenlet_cpython_compat.hpp b/src/greenlet/greenlet_cpython_compat.hpp
-index cdc1617f..ce5fd882 100644
---- a/src/greenlet/greenlet_cpython_compat.hpp
-+++ b/src/greenlet/greenlet_cpython_compat.hpp
-@@ -12,19 +12,24 @@
-
- #if PY_VERSION_HEX >= 0x30A00B1
- # define GREENLET_PY310 1
-+#else
-+# define GREENLET_PY310 0
-+#endif
-+
- /*
- Python 3.10 beta 1 changed tstate->use_tracing to a nested cframe member.
- See https://github.com/python/cpython/pull/25276
- We have to save and restore this as well.
-+
-+Python 3.13 removed PyThreadState.cframe (GH-108035).
- */
-+#if GREENLET_PY310 && PY_VERSION_HEX < 0x30D0000
- # define GREENLET_USE_CFRAME 1
- #else
- # define GREENLET_USE_CFRAME 0
--# define GREENLET_PY310 0
- #endif
-
-
--
- #if PY_VERSION_HEX >= 0x30B00A4
- /*
- Greenlet won't compile on anything older than Python 3.11 alpha 4 (see
-@@ -50,6 +55,12 @@ Greenlet won't compile on anything older than Python 3.11 alpha 4 (see
- # define GREENLET_PY312 0
- #endif
-
-+#if PY_VERSION_HEX >= 0x30D0000
-+# define GREENLET_PY313 1
-+#else
-+# define GREENLET_PY313 0
-+#endif
-+
- #ifndef Py_SET_REFCNT
- /* Py_REFCNT and Py_SIZE macros are converted to functions
- https://bugs.python.org/issue39573 */
-@@ -124,4 +135,8 @@ static inline void PyThreadState_LeaveTracing(PyThreadState *tstate)
- }
- #endif
-
-+#if !defined(Py_C_RECURSION_LIMIT) && defined(C_RECURSION_LIMIT)
-+# define Py_C_RECURSION_LIMIT C_RECURSION_LIMIT
-+#endif
-+
- #endif /* GREENLET_CPYTHON_COMPAT_H */
-diff --git a/src/greenlet/greenlet_greenlet.hpp b/src/greenlet/greenlet_greenlet.hpp
-index d52ce1fd..fbfdfbfc 100644
---- a/src/greenlet/greenlet_greenlet.hpp
-+++ b/src/greenlet/greenlet_greenlet.hpp
-@@ -23,6 +23,7 @@ using greenlet::refs::BorrowedGreenlet;
- #endif
-
- #if GREENLET_PY312
-+# define Py_BUILD_CORE
- # include "internal/pycore_frame.h"
- #endif
-
-@@ -110,7 +111,11 @@ namespace greenlet
- #else
- int recursion_depth;
- #endif
-+#if GREENLET_PY313
-+ PyObject *delete_later;
-+#else
- int trash_delete_nesting;
-+#endif
- #if GREENLET_PY311
- _PyInterpreterFrame* current_frame;
- _PyStackChunk* datastack_chunk;
-diff --git a/src/greenlet/tests/test_greenlet.py b/src/greenlet/tests/test_greenlet.py
-index 51849cd6..259707ae 100644
---- a/src/greenlet/tests/test_greenlet.py
-+++ b/src/greenlet/tests/test_greenlet.py
-@@ -471,7 +471,9 @@ def creator():
- # Unfortunately, this doesn't actually clear the references, they're in the
- # fast local array.
- if not wait_for_cleanup:
-- result[0].gr_frame.f_locals.clear()
-+ # f_locals has no clear method in Python 3.13
-+ if hasattr(result[0].gr_frame.f_locals, 'clear'):
-+ result[0].gr_frame.f_locals.clear()
- else:
- self.assertIsNone(result[0].gr_frame)
-
-diff --git a/src/greenlet/tests/test_greenlet_trash.py b/src/greenlet/tests/test_greenlet_trash.py
-index 8d9716e9..2bce8fd0 100644
---- a/src/greenlet/tests/test_greenlet_trash.py
-+++ b/src/greenlet/tests/test_greenlet_trash.py
-@@ -29,8 +29,17 @@
-
- import unittest
-
-+try:
-+ from greenlet._greenlet import get_tstate_trash_delete_nesting
-+except ImportError:
-+ get_tstate_trash_delete_nesting = None
-+
-+
- class TestTrashCanReEnter(unittest.TestCase):
-
-+ # Python 3.13 has not "trash delete nesting" anymore (but "delete later")
-+ @unittest.skipIf(get_tstate_trash_delete_nesting is None,
-+ 'need get_tstate_trash_delete_nesting()')
- def test_it(self):
- # Try several times to trigger it, because it isn't 100%
- # reliable.
diff --git a/dev-python/greenlet/greenlet-3.0.3-r1.ebuild b/dev-python/greenlet/greenlet-3.0.3-r1.ebuild
deleted file mode 100644
index 85044130cc16..000000000000
--- a/dev-python/greenlet/greenlet-3.0.3-r1.ebuild
+++ /dev/null
@@ -1,53 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-# Note: greenlet is built-in in pypy
-PYTHON_COMPAT=( python3_{10..13} )
-
-inherit distutils-r1 pypi
-
-DESCRIPTION="Lightweight in-process concurrent programming"
-HOMEPAGE="
- https://greenlet.readthedocs.io/en/latest/
- https://github.com/python-greenlet/greenlet/
- https://pypi.org/project/greenlet/
-"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 -hppa ~m68k ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
-
-BDEPEND="
- test? (
- dev-python/objgraph[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- )
-"
-
-distutils_enable_sphinx docs \
- dev-python/furo
-distutils_enable_tests unittest
-
-src_prepare() {
- local PATCHES=(
- # https://github.com/python-greenlet/greenlet/pull/396
- "${FILESDIR}/${P}-py313.patch"
- )
-
- distutils-r1_src_prepare
-
- # patch cflag manipulations out
- sed -i -e 's:global_compile_args[.]append.*:pass:' setup.py || die
- # broken assertions on py3.12+
- # https://github.com/python-greenlet/greenlet/issues/368
- sed -e 's:test_trace_events_multiple_greenlets_switching:_&: ' \
- -i src/greenlet/tests/test_tracing.py || die
-}
-
-python_test() {
- eunittest greenlet.tests
-}
diff --git a/dev-python/greenlet/greenlet-3.1.1.ebuild b/dev-python/greenlet/greenlet-3.1.1.ebuild
index 805bbb305ceb..698e432d7b52 100644
--- a/dev-python/greenlet/greenlet-3.1.1.ebuild
+++ b/dev-python/greenlet/greenlet-3.1.1.ebuild
@@ -19,7 +19,7 @@ HOMEPAGE="
LICENSE="MIT"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 -hppa ~m68k ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
+KEYWORDS="~alpha amd64 arm arm64 -hppa ~m68k ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~x64-macos"
BDEPEND="
test? (