From ef5beda91c592e14bee1f2aee6bf333d3df1a2de Mon Sep 17 00:00:00 2001 From: Simon Kohlmeyer Date: Fri, 28 Oct 2022 17:42:13 +0200 Subject: [PATCH] python311Packages.cython: add patch for python3.11 compatibility --- .../python-modules/Cython/default.nix | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix index 4a6c14b5709b..3065e822f6be 100644 --- a/pkgs/development/python-modules/Cython/default.nix +++ b/pkgs/development/python-modules/Cython/default.nix @@ -48,8 +48,20 @@ in buildPythonPackage rec { # trashcan support is needed to avoid stack overflows during object deallocation in sage (https://trac.sagemath.org/ticket/27267) (fetchpatch { name = "trashcan.patch"; - url = "https://git.sagemath.org/sage.git/plain/build/pkgs/cython/patches/trashcan.patch?id=4569a839f070a1a38d5dbce2a4d19233d25aeed2"; - sha256 = "sha256-+pOF1XNTEtNseLpqPzrc1Jfwt5hGx7doUoccIhNneYY="; + url = "https://github.com/cython/cython/commit/f781880b6780117660b2026caadf4a6d7905722f.patch"; + sha256 = "sha256-SnjaJdBZxm3O5gJ5Dxut6+eeVtZv+ygUUNwAwgoiFxg="; + }) + # The above commit introduces custom trashcan macros, as well as + # compiler changes to use them in Cython-emitted code. The latter + # change is still useful, but the former has been upstreamed as of + # Python 3.8, and the patch below makes Cython use the upstream + # trashcan macros whenever available. This is needed for Python + # 3.11 support, because the API used in Cython's implementation + # changed: https://github.com/cython/cython/pull/4475 + (fetchpatch { + name = "disable-trashcan.patch"; + url = "https://github.com/cython/cython/commit/e337825cdcf5e94d38ba06a0cb0188e99ce0cc92.patch"; + sha256 = "sha256-q0f63eetKrDpmP5Z4v8EuGxg26heSyp/62OYqhRoSso="; }) ];