···48 # trashcan support is needed to avoid stack overflows during object deallocation in sage (https://trac.sagemath.org/ticket/27267)
49 (fetchpatch {
50 name = "trashcan.patch";
51- url = "https://git.sagemath.org/sage.git/plain/build/pkgs/cython/patches/trashcan.patch?id=4569a839f070a1a38d5dbce2a4d19233d25aeed2";
52- sha256 = "sha256-+pOF1XNTEtNseLpqPzrc1Jfwt5hGx7doUoccIhNneYY=";
00000000000053 })
54 ];
55
···48 # trashcan support is needed to avoid stack overflows during object deallocation in sage (https://trac.sagemath.org/ticket/27267)
49 (fetchpatch {
50 name = "trashcan.patch";
51+ url = "https://github.com/cython/cython/commit/f781880b6780117660b2026caadf4a6d7905722f.patch";
52+ sha256 = "sha256-SnjaJdBZxm3O5gJ5Dxut6+eeVtZv+ygUUNwAwgoiFxg=";
53+ })
54+ # The above commit introduces custom trashcan macros, as well as
55+ # compiler changes to use them in Cython-emitted code. The latter
56+ # change is still useful, but the former has been upstreamed as of
57+ # Python 3.8, and the patch below makes Cython use the upstream
58+ # trashcan macros whenever available. This is needed for Python
59+ # 3.11 support, because the API used in Cython's implementation
60+ # changed: https://github.com/cython/cython/pull/4475
61+ (fetchpatch {
62+ name = "disable-trashcan.patch";
63+ url = "https://github.com/cython/cython/commit/e337825cdcf5e94d38ba06a0cb0188e99ce0cc92.patch";
64+ sha256 = "sha256-q0f63eetKrDpmP5Z4v8EuGxg26heSyp/62OYqhRoSso=";
65 })
66 ];
67