From 908778078736bd36f7a60a2d576d415cb8e000fa Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 22 May 2021 07:31:18 +0100 Subject: gentoo resync : 22.05.2021 --- dev-python/cython/Manifest | 4 +- dev-python/cython/cython-0.29.23.ebuild | 6 +- .../cython-0.29.23-test_exceptions-py310.patch | 14 ++ .../files/cython-0.29.23-tracing-py310.patch | 213 +++++++++++++++++++++ 4 files changed, 234 insertions(+), 3 deletions(-) create mode 100644 dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch create mode 100644 dev-python/cython/files/cython-0.29.23-tracing-py310.patch (limited to 'dev-python/cython') diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest index d5826230c769..77a51ddcec5c 100644 --- a/dev-python/cython/Manifest +++ b/dev-python/cython/Manifest @@ -2,11 +2,13 @@ AUX 50cython-gentoo.el 388 BLAKE2B 5bc38190b467efa9e7be1a5831022534dbfdc02206fca AUX cython-0.29.14-sphinx-update.patch 377 BLAKE2B 32ba9ccc6c093fb9e575686c9a3b707a10a2488979d0a1dcc0863022d48255455216d11c1968bc5d49a8b583a340113c090ec103ae233dcac2164beb1765f9cc SHA512 3714019a1659b69243bf5f76d1557e3e4e507fa6b15bf4259001f961d1127e18e01e3d17fe04706c882e264651ea5699c6295f33c66af7577ab6e0906c0d3273 AUX cython-0.29.21-spawn-multiprocessing.patch 1096 BLAKE2B f31e9e8bdc86ab1098bfa115e60470410f41fdf4be558c6a11d0c3ea61b8a8009f6242a96e2574f525e53b6125de78c5f8dbd8f7499d8debd368e80a6d383e47 SHA512 71f2349dfee2504bffe2ce378a00b2033ad229f99c597382eafa54107fbdc56fc177e4412e6314794b5ce22d9713e535467b0ed3e36ae657a5deb9c3325eb242 AUX cython-0.29.22-spawn-multiprocessing.patch 963 BLAKE2B ebbc3f6f4fa88e7e082326bccbad328724a4ff5645f0b2aa28f21419044b17bed8495618bb980b23a99310c2b6ef275331e1b9aa6d734017eb33646c92a07a73 SHA512 3f5c6b4108b87cf3014416386095c07ac91762152bbd87e8bd589177d40b933c11e19610bea06720c5c70f76b5b9b70d27e5c3cfa20eed30deaaf7d122910bd3 +AUX cython-0.29.23-test_exceptions-py310.patch 656 BLAKE2B 6c650c85d01b8bf367528d144cd967fa9def94634e35763e2e7a1c3e5afa2b01d0c84694024dde6e45577eee223f6464b5f88ab971d207d35892edf347a0c08f SHA512 d8f7f770a0b3303552deec0e7d3f9258de1edcd384f4b2c3881634fd21ce847a3d974e9142d1ed2fbe3a549e65292c6690be3a36ab4de52d0593d9831dc2f7ce +AUX cython-0.29.23-tracing-py310.patch 13401 BLAKE2B e2359644ef2dd2c2f9eadc41eac6634d8bcde77edc4f7c11b8c6c3ae2f037965291c3cf9907ac5e07f3f97505adf9c2040f30e7830c9216bd7d51aeca68b5286 SHA512 e0fbd24224da1e848fc37dc8652738086c43297432627599ec8d43cf75c6f7a9cd1ff360d156f778e13749f339767608e631336f988f6f17d6f3f40b654275f8 DIST cython-0.29.21.gh.tar.gz 2088511 BLAKE2B 7a4ddabb65a519d3c71454ac8417438a3a9c46b47489c18e7c7e82ffcb5d5f2f0c5246d0b364f8317d374c53f0c83844c73c7d2ef6b9f75f10707aaf2931ce41 SHA512 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679 DIST cython-0.29.22.gh.tar.gz 2091955 BLAKE2B 8225fa6073d43de1e44e8cd22d52f9bde5d3b6e6e766c74d5ef18d77b57c0e1b22a21cae5b133b0b22f7207aa51dc0e76f1073db977190d42c2b55cc2d7e148e SHA512 b7f22112678f159bf1d0ad5fe4f7c103e96f240bab4d9dc07edd7c2f66a9887b9af72b32f1d5886361b48d428bc2b9499d3c5b59ce5af1068f20a26549783dd6 DIST cython-0.29.23.gh.tar.gz 2093463 BLAKE2B c710b9bc9e05e0030dff3098857b349564fd167f7d9c47e2ef4e8897e072f67497b8ed3994f45135c21f8b2bf3a2cff016fec9a808b2bbe9712174dd0a6b1a3e SHA512 093b7a1d5c68f6e2d2b9b8adb9ac99e8967ddd0a66c0513a78e88bd55d96533dd8352b2478554fb53bf32a72d730967fb08ccb2eaa462da68f86891dceb4925a EBUILD cython-0.29.21-r1.ebuild 1792 BLAKE2B 03fbab5e328ff2dba249e6a5bf17abdb4fe69217f3527a89c4920d78129bc4a40b267ac58f8eb70deddd432ea34538a44254e1a71931f7263fae8d3761b9c1a2 SHA512 7b0240e6ff14f2cf12e54deaf025cbb4c72984a351541b646234091159c0a4e2305339cd6a58f64b756a9f99aa39fee3e9b326127e5bcf98ccca5de26d9bdf3a EBUILD cython-0.29.21.ebuild 1987 BLAKE2B 1df83b6ef7f839622cd73c07384ccf0a6e722fe5ae9f42374ff9df2995e5b624e78a534c078534c341d034f984f73fc5c3abe954166ba8ef0f3fcc6aff2fbf06 SHA512 aa85e5d5ea9a1413686d8903af4c2c310f504ba0fc1ca469253010dae7a2abbb434b5d2e59f18b1a22f1149cfaade4b942466973e9559b913146abdf3b191155 EBUILD cython-0.29.22.ebuild 1845 BLAKE2B fcace04a858c1fbbb291c7ac9c961c8fa2cfd9b222298082bb183cd0608015965110d0c809daf6cfc206c0f9db709d5689ac71711f8bf5c06cad0d974c09ce60 SHA512 c93468b1e423be8ddbc42bb507070d33a88454b85ddeae6eafbcaf3d50f6658f1732bb8f45381b714af3d141fb05ae76d294a8149a2cbb3cd7cf53893e1edab7 -EBUILD cython-0.29.23.ebuild 1852 BLAKE2B 343b0e6d7115144ff2bf5491d07b38e1a829c04831b890725edb611dfdbf00c3a001285970fe3a3dea4961efc6e878dee6ec28ab6726df78a25b2f772fe05eac SHA512 7570f675c7de77c7c1189e327851b8896ddcf475278edb14ba86dfdcb6cd641ce50b0dbd9624de653d2395f7da4c894aa8238a05174b7149441205a86a6a2170 +EBUILD cython-0.29.23.ebuild 1953 BLAKE2B b7a6d286d13161035966badbfe62af11b8a9abb5df9b67516740b9c6295118032b3e6be38167f816cb30dd1938391eaddd40064fd2252b99896b89234e4824a8 SHA512 dc00e398f42d8604a980d2344532f0741f8c446a5d28b3fa6f641874e0a0e961bdb6aaa255a3b6076f361282246dbd5e71ad3956e154e9d43d27606a89557d1a MISC metadata.xml 605 BLAKE2B 900f2ffaa501d7ce5bef46115f7fdbda0966bf4ae048b4c27ac4be06e1b23de17c674e27f97627aed8d1d65b52bea01532d8a698bdbcd20b7c9fab4bad278b16 SHA512 66176bb6e00f70b610a41bfbc973bae2b4b8b9aeeeb6bdc9e14c2832d513d5452aec6509f8225daffb7e169d93311a4ccb026c935ead80ffeb35d91f1ae558fe diff --git a/dev-python/cython/cython-0.29.23.ebuild b/dev-python/cython/cython-0.29.23.ebuild index d2fe1b9af4ef..c202aeb4126f 100644 --- a/dev-python/cython/cython-0.29.23.ebuild +++ b/dev-python/cython/cython-0.29.23.ebuild @@ -4,7 +4,7 @@ EAPI=7 DISTUTILS_USE_SETUPTOOLS=rdepend -PYTHON_COMPAT=( python3_{7..9} pypy3 ) +PYTHON_COMPAT=( python3_{7..10} pypy3 ) PYTHON_REQ_USE="threads(+)" inherit distutils-r1 toolchain-funcs elisp-common @@ -16,7 +16,7 @@ SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris" IUSE="emacs test" RESTRICT="!test? ( test )" @@ -32,6 +32,8 @@ BDEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/${PN}-0.29.14-sphinx-update.patch" "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch" + "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch" + "${FILESDIR}/${PN}-0.29.23-tracing-py310.patch" ) SITEFILE=50cython-gentoo.el diff --git a/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch b/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch new file mode 100644 index 000000000000..0c9fb2c9ea56 --- /dev/null +++ b/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch @@ -0,0 +1,14 @@ +--- a/tests/run/test_exceptions.pyx ++++ b/tests/run/test_exceptions.pyx +@@ -188,7 +188,10 @@ + + # should not apply to subclasses, see issue #31161 + s = '''if True:\nprint "No indent"''' +- ckmsg(s, "expected an indented block", IndentationError) ++ if sys.version_info >= (3, 10): ++ ckmsg(s, "expected an indented block after 'if' statement on line 1", IndentationError) ++ else: ++ ckmsg(s, "expected an indented block", IndentationError) + + s = '''if True:\n print()\n\texec "mixed tabs and spaces"''' + ckmsg(s, "inconsistent use of tabs and spaces in indentation", TabError) diff --git a/dev-python/cython/files/cython-0.29.23-tracing-py310.patch b/dev-python/cython/files/cython-0.29.23-tracing-py310.patch new file mode 100644 index 000000000000..ff0e45a646dc --- /dev/null +++ b/dev-python/cython/files/cython-0.29.23-tracing-py310.patch @@ -0,0 +1,213 @@ +From c9cccfeaf3f0e20c2bb14fc234e86f4fc8e4fe81 Mon Sep 17 00:00:00 2001 +From: Stefan Behnel +Date: Fri, 14 May 2021 19:39:58 +0200 +Subject: [PATCH] Adapt tracing code to Py3.10 beta 1. + +--- + Cython/Utility/Profile.c | 79 +++++++++++++++++++++++++--------------- + 1 file changed, 49 insertions(+), 30 deletions(-) + +diff --git a/Cython/Utility/Profile.c b/Cython/Utility/Profile.c +index 15ceb41cc2..2cd9af9da7 100644 +--- a/Cython/Utility/Profile.c ++++ b/Cython/Utility/Profile.c +@@ -47,13 +47,32 @@ + #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) + #endif + +- #define __Pyx_TraceDeclarations \ +- static PyCodeObject *$frame_code_cname = NULL; \ +- CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \ +- int __Pyx_use_tracing = 0; ++ #define __Pyx_TraceDeclarations \ ++ static PyCodeObject *$frame_code_cname = NULL; \ ++ CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \ ++ int __Pyx_use_tracing = 0; + +- #define __Pyx_TraceFrameInit(codeobj) \ +- if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj; ++ #define __Pyx_TraceFrameInit(codeobj) \ ++ if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj; ++ ++#if PY_VERSION_HEX >= 0x030a00b1 ++ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ ++ (unlikely(tstate->cframe->use_tracing) && \ ++ (!(check_tracing) || !tstate->tracing) && \ ++ (!(check_funcs) || tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) ++ ++ #define __Pyx_SetTracing(tstate, enable) \ ++ (tstate)->cframe->use_tracing = (enable) ++ ++#else ++ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ ++ (unlikely(tstate->use_tracing) && \ ++ (!(check_tracing) || !tstate->tracing) && \ ++ (!(check_funcs) || tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) ++ ++ #define __Pyx_SetTracing(tstate, enable) \ ++ (tstate)->use_tracing = (enable) ++#endif + + #ifdef WITH_THREAD + #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \ +@@ -62,8 +81,7 @@ + PyThreadState *tstate; \ + PyGILState_STATE state = PyGILState_Ensure(); \ + tstate = __Pyx_PyThreadState_Current; \ +- if (unlikely(tstate->use_tracing) && !tstate->tracing && \ +- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \ ++ if (__Pyx_IsTracing(tstate, 1, 1)) { \ + __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ + } \ + PyGILState_Release(state); \ +@@ -71,8 +89,7 @@ + } \ + } else { \ + PyThreadState* tstate = PyThreadState_GET(); \ +- if (unlikely(tstate->use_tracing) && !tstate->tracing && \ +- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \ ++ if (__Pyx_IsTracing(tstate, 1, 1)) { \ + __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ + if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ + } \ +@@ -80,8 +97,7 @@ + #else + #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \ + { PyThreadState* tstate = PyThreadState_GET(); \ +- if (unlikely(tstate->use_tracing) && !tstate->tracing && \ +- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \ ++ if (__Pyx_IsTracing(tstate, 1, 1)) { \ + __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ + if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ + } \ +@@ -91,10 +107,9 @@ + #define __Pyx_TraceException() \ + if (likely(!__Pyx_use_tracing)); else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ +- if (tstate->use_tracing && \ +- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \ ++ if (__Pyx_IsTracing(tstate, 0, 1)) { \ + tstate->tracing++; \ +- tstate->use_tracing = 0; \ ++ __Pyx_SetTracing(tstate, 0); \ + PyObject *exc_info = __Pyx_GetExceptionTuple(tstate); \ + if (exc_info) { \ + if (CYTHON_TRACE && tstate->c_tracefunc) \ +@@ -104,7 +119,7 @@ + tstate->c_profileobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \ + Py_DECREF(exc_info); \ + } \ +- tstate->use_tracing = 1; \ ++ __Pyx_SetTracing(tstate, 1); \ + tstate->tracing--; \ + } \ + } +@@ -113,13 +128,13 @@ + PyObject *type, *value, *traceback; + __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); + tstate->tracing++; +- tstate->use_tracing = 0; ++ __Pyx_SetTracing(tstate, 0); + if (CYTHON_TRACE && tstate->c_tracefunc) + tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); + if (tstate->c_profilefunc) + tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); + CYTHON_FRAME_DEL(frame); +- tstate->use_tracing = 1; ++ __Pyx_SetTracing(tstate, 1); + tstate->tracing--; + __Pyx_ErrRestoreInState(tstate, type, value, traceback); + } +@@ -132,14 +147,14 @@ + PyThreadState *tstate; \ + PyGILState_STATE state = PyGILState_Ensure(); \ + tstate = __Pyx_PyThreadState_Current; \ +- if (tstate->use_tracing) { \ ++ if (__Pyx_IsTracing(tstate, 0, 0)) { \ + __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ + } \ + PyGILState_Release(state); \ + } \ + } else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ +- if (tstate->use_tracing) { \ ++ if (__Pyx_IsTracing(tstate, 0, 0)) { \ + __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ + } \ + } \ +@@ -148,7 +163,7 @@ + #define __Pyx_TraceReturn(result, nogil) \ + if (likely(!__Pyx_use_tracing)); else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ +- if (tstate->use_tracing) { \ ++ if (__Pyx_IsTracing(tstate, 0, 0)) { \ + __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ + } \ + } +@@ -176,9 +191,11 @@ + __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); + __Pyx_PyFrame_SetLineNumber(frame, lineno); + tstate->tracing++; +- tstate->use_tracing = 0; ++ __Pyx_SetTracing(tstate, 0); ++ + ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); +- tstate->use_tracing = 1; ++ ++ __Pyx_SetTracing(tstate, 1); + tstate->tracing--; + if (likely(!ret)) { + __Pyx_ErrRestoreInState(tstate, type, value, traceback); +@@ -199,7 +216,7 @@ + PyThreadState *tstate; \ + PyGILState_STATE state = __Pyx_PyGILState_Ensure(); \ + tstate = __Pyx_PyThreadState_Current; \ +- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \ ++ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ + ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ + } \ + __Pyx_PyGILState_Release(state); \ +@@ -207,7 +224,7 @@ + } \ + } else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ +- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \ ++ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ + int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ + if (unlikely(ret)) goto_error; \ + } \ +@@ -217,7 +234,7 @@ + #define __Pyx_TraceLine(lineno, nogil, goto_error) \ + if (likely(!__Pyx_use_tracing)); else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ +- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \ ++ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ + int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ + if (unlikely(ret)) goto_error; \ + } \ +@@ -263,19 +280,21 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, + (*frame)->f_tstate = tstate; + #endif + } +- __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); ++ __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); ++ + retval = 1; + tstate->tracing++; +- tstate->use_tracing = 0; ++ __Pyx_SetTracing(tstate, 0); + __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); ++ + #if CYTHON_TRACE + if (tstate->c_tracefunc) + retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; + if (retval && tstate->c_profilefunc) + #endif + retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; +- tstate->use_tracing = (tstate->c_profilefunc || +- (CYTHON_TRACE && tstate->c_tracefunc)); ++ ++ __Pyx_SetTracing(tstate, (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))); + tstate->tracing--; + if (retval) { + __Pyx_ErrRestoreInState(tstate, type, value, traceback); -- cgit v1.2.3