1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
From bff17d04ef168d41c17de69fa4d19982ba45bb6d Mon Sep 17 00:00:00 2001
From: J08nY <johny@neuromancer.sk>
Date: Thu, 16 Jan 2025 12:15:33 +0100
Subject: [PATCH] Support Cython 3 (and also Python 3.13).
---
pyproject.toml | 2 +-
setup.cfg | 2 +-
thinc/backends/cblas.pxd | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,6 @@
[build-system]
requires = [
"setuptools",
- "cython>=0.25,<3.0",
"murmurhash>=1.0.2,<1.1.0",
"cymem>=2.0.2,<2.1.0",
"preshed>=3.0.2,<3.1.0",
--- a/setup.cfg
+++ b/setup.cfg
@@ -28,7 +28,7 @@
include_package_data = true
python_requires = >=3.9
setup_requires =
- cython>=0.25,<3.0
+ cython>=0.25
numpy>=2.0.0,<3.0.0
# We also need our Cython packages here to compile against
cymem>=2.0.2,<2.1.0
--- a/thinc/backends/cblas.pxd
+++ b/thinc/backends/cblas.pxd
@@ -2,18 +2,18 @@
ctypedef void (*sgemm_ptr)(bint transA, bint transB, int M, int N, int K,
float alpha, const float* A, int lda, const float* B,
- int ldb, float beta, float* C, int ldc) nogil
+ int ldb, float beta, float* C, int ldc) nogil noexcept
ctypedef void (*dgemm_ptr)(bint transA, bint transB, int M, int N, int K,
double alpha, const double* A, int lda, const double* B,
- int ldb, double beta, double* C, int ldc) nogil
+ int ldb, double beta, double* C, int ldc) nogil noexcept
ctypedef void (*saxpy_ptr)(int N, float alpha, const float* X, int incX,
- float *Y, int incY) nogil
+ float *Y, int incY) nogil noexcept
ctypedef void (*daxpy_ptr)(int N, double alpha, const double* X, int incX,
- double *Y, int incY) nogil
+ double *Y, int incY) nogil noexcept
ctypedef void (*sscal_ptr)(int N, float alpha, float* X, int incX) nogil
ctypedef void (*dscal_ptr)(int N, double alpha, double* X, int incX) nogil
--- a/requirements.txt
+++ b/requirements.txt
@@ -13,7 +13,6 @@
numpy>=2.0.0,<3.0.0
packaging>=20.0
# Development dependencies
-cython>=0.25.0,<3.0
hypothesis>=3.27.0,<6.72.2
pytest>=8.2.0
pytest-cov>=2.7.0,<5.0.0
|