diff --git a/sdk_container/src/third_party/portage-stable/dev-python/cython/Manifest b/sdk_container/src/third_party/portage-stable/dev-python/cython/Manifest index 78e39a3ba5..780b68fddd 100644 --- a/sdk_container/src/third_party/portage-stable/dev-python/cython/Manifest +++ b/sdk_container/src/third_party/portage-stable/dev-python/cython/Manifest @@ -1,2 +1,2 @@ DIST cython-3.0.12.tar.gz 2757617 BLAKE2B 064549e36e03424065eab081b60e2761d198490cfd4d7836ea236b833ada3962e6ed42ba1710b33418f8a31ac282cdc156ceb544ee21be80ee34b7a3d3f6c7fb SHA512 c4e85596eeea444fae983d32ce8731cc5d0d612d1f96b998db3aa7946e8be151a7ea62c6df163d875111e306c870656b82a8468dd873cacf84c7bd5671a39bc3 -DIST cython-3.1.0b1.tar.gz 3192916 BLAKE2B 13a8fa48319d9c4c8cc634d3cf5af599b867466d5de4cf3a24dd342b7812a392e854d9a6152309c6ef84a2925ebfa2257792d0f4e0c8fa36580d7138a663105a SHA512 ced9d57536d3bacd274b5edc4137d400a6182b4b7a89a28cf358f843dcbb0e0e7171fb0842441a81e1d2ac12acb6fd6a3df7018fe2a8708cb188a96cb184d799 +DIST cython-3.1.0rc1.tar.gz 3158411 BLAKE2B 44540e95b8b060956654a0d92fc4b8417088816a1e3f8fc17c8575a1cbd4b71a76cc69209d58c731281a310a9f6a7e2e711f88dc6855bc487d08056203cb04d8 SHA512 b0cefe1d4e248e6044af373088902475839ae06b5855b5b3bffdce5159a0f6e54802c24715a6f6e3242a250841c2ff1e56435b7ed3e304964af01a162f8a851a diff --git a/sdk_container/src/third_party/portage-stable/dev-python/cython/cython-3.1.0_rc1-r1.ebuild b/sdk_container/src/third_party/portage-stable/dev-python/cython/cython-3.1.0_rc1-r1.ebuild new file mode 100644 index 0000000000..561a1b8a07 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-python/cython/cython-3.1.0_rc1-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_TESTED=( python3_{10..12} ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 pypy3_11 python3_13{,t} ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 multiprocessing pypi toolchain-funcs + +DESCRIPTION="A Python to C compiler" +HOMEPAGE=" + https://cython.org/ + https://github.com/cython/cython/ + https://pypi.org/project/Cython/ +" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + ${RDEPEND} + test? ( + $(python_gen_cond_dep ' + -Date: Sun, 6 Apr 2025 08:43:34 +0100 -Subject: [PATCH] Fix __Pyx_Owned_Py_None usage as actual function (GH-6782) - -In the tracing code, we are using it like a function (i.e. casting to void to mark it unused) so it has to be a function, not just a macro. - -Fixes https://github.com/cython/cython/issues/6781 ---- - Cython/Utility/TypeConversion.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c -index b86125699c7..e085fae8eb3 100644 ---- a/Cython/Utility/TypeConversion.c -+++ b/Cython/Utility/TypeConversion.c -@@ -103,7 +103,7 @@ static CYTHON_INLINE PyObject *__Pyx_XNewRef(PyObject *obj) { - #endif - } - --#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) -+static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b); - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); - static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); - static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); -@@ -420,6 +420,10 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { - } - } - -+static CYTHON_INLINE PyObject *__Pyx_Owned_Py_None(int b) { -+ CYTHON_UNUSED_VAR(b); -+ return __Pyx_NewRef(Py_None); -+} - - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); diff --git a/sdk_container/src/third_party/portage-stable/dev-python/cython/files/cython-3.1.0_rc1-rdma-core-hang.patch b/sdk_container/src/third_party/portage-stable/dev-python/cython/files/cython-3.1.0_rc1-rdma-core-hang.patch new file mode 100644 index 0000000000..3561870b04 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-python/cython/files/cython-3.1.0_rc1-rdma-core-hang.patch @@ -0,0 +1,54 @@ +From a0794ffb47c9f44be94b3cd8fe6c639766cbda26 Mon Sep 17 00:00:00 2001 +From: Stefan Behnel +Date: Sun, 4 May 2025 21:48:27 +0200 +Subject: [PATCH] Prevent infinite loop in type inference when a variable is + named like the type of its value (e.g. list += []). + +Closes https://github.com/cython/cython/issues/6835 +--- + Cython/Compiler/ExprNodes.py | 2 +- + tests/run/type_inference.pyx | 24 ++++++++++++++++++++++++ + 2 files changed, 25 insertions(+), 1 deletion(-) + +diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py +index a0413ab8d62..b02154a0b30 100644 +--- a/Cython/Compiler/ExprNodes.py ++++ b/Cython/Compiler/ExprNodes.py +@@ -2042,7 +2042,7 @@ def infer_type(self, env): + return self.inferred_type + return py_object_type + elif (self.entry.type.is_extension_type or self.entry.type.is_builtin_type) and \ +- self.name == self.entry.type.name: ++ not self.is_target and self.name == self.entry.type.name: + # Unfortunately the type attribute of type objects + # is used for the pointer to the type they represent. + return type_type +diff --git a/tests/run/type_inference.pyx b/tests/run/type_inference.pyx +index b746d05d9f3..226455dae0d 100644 +--- a/tests/run/type_inference.pyx ++++ b/tests/run/type_inference.pyx +@@ -883,3 +886,24 @@ def test_builtin_max(): + a = max(self.a, self.a) + assert typeof(a) == "Python object", typeof(a) + C().get_max() ++ ++ ++def variable_with_name_of_type(): ++ """ ++ >>> variable_with_name_of_type() ++ ([], 'abc') ++ """ ++ # Names like 'list.append' refer to the type and must be inferred as such, ++ # but a simple variable called 'list' is not the same and used to break type inference. ++ # See https://github.com/cython/cython/issues/6835 ++ rest_list = [] ++ list = [] # note: same name as type of value ++ list += rest_list ++ assert typeof(list) == 'list object', typeof(list) ++ ++ rest_str = "abc" ++ str = "" ++ str += rest_str ++ assert typeof(str) == 'str object', typeof(str) ++ ++ return list, str