Commit f1dc2357 authored by Gaetan Lepage's avatar Gaetan Lepage
Browse files

python3Packages.thinc: 8.3.6 -> 8.3.12

parent 1b50444f
Loading
Loading
Loading
Loading
+45 −18
Original line number Diff line number Diff line
{
  lib,
  blas,
  blis,
  buildPythonPackage,
  catalogue,
  confection,
  fetchFromGitHub,

  # build-system
  blis,
  cymem,
  cython,
  fetchPypi,
  hypothesis,
  mock,
  murmurhash,
  numpy,
  preshed,
  pydantic,
  pytestCheckHook,
  setuptools,

  # buildInputs
  blas,

  # dependencies
  catalogue,
  confection,
  pydantic,
  srsly,
  wasabi,

  # tests
  coverage,
  hypothesis,
  mock,
  pytestCheckHook,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "thinc";
  version = "8.3.6";
  version = "8.3.12";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-SZg/m33cQ0OpUyaUqRGN0hbXpgBSCiGEmkO2wmjsbK0=";
  src = fetchFromGitHub {
    owner = "explosion";
    repo = "thinc";
    tag = "release-v${finalAttrs.version}";
    hash = "sha256-8nf+AWAD7Fy50XRJDINmyk42F7KMDhGgATwqbln3r04=";
  };

  build-system = [
@@ -57,25 +68,41 @@ buildPythonPackage rec {
    wasabi
  ];

  pythonImportsCheck = [ "thinc" ];

  nativeCheckInputs = [
    coverage
    hypothesis
    mock
    pytestCheckHook
  ];

  preCheck = ''
  # avoid local paths, relative imports wont resolve correctly
  preCheck = ''
    mv thinc/tests tests
    rm -r thinc
  '';

  pythonImportsCheck = [ "thinc" ];
  pytestFlags = [
    # UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater.
    "-Wignore::UserWarning"
  ];

  disabledTestPaths = [
    # pydantic.v1.error_wrappers.ValidationError: 1 validation error for DefaultsSchema
    "tests/test_config.py"
  ];

  disabledTests = [
    # RecursionError: Stack overflow (used 8148 kB)
    "test_pickle_with_flatten"
  ];

  meta = {
    description = "Library for NLP machine learning";
    homepage = "https://github.com/explosion/thinc";
    changelog = "https://github.com/explosion/thinc/releases/tag/v${version}";
    changelog = "https://github.com/explosion/thinc/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = [ ];
  };
}
})
+49 −0
Original line number Diff line number Diff line
diff --git a/thinc/backends/cblas.pxd b/thinc/backends/cblas.pxd
index c608d87..1ae1281 100644
--- a/thinc/backends/cblas.pxd
+++ b/thinc/backends/cblas.pxd
@@ -2,21 +2,21 @@ from libcpp.memory cimport shared_ptr
 
 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) noexcept nogil
 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) noexcept nogil
 
 
 ctypedef void (*saxpy_ptr)(int N, float alpha, const float* X, int incX,
-                           float *Y, int incY) nogil
+                           float *Y, int incY) noexcept nogil
 
 
 ctypedef void (*daxpy_ptr)(int N, double alpha, const double* X, int incX,
-                           double *Y, int incY) nogil
+                           double *Y, int incY) noexcept nogil
 
-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
+ctypedef void (*sscal_ptr)(int N, float alpha, float* X, int incX) noexcept nogil
+ctypedef void (*dscal_ptr)(int N, double alpha, double* X, int incX) noexcept nogil
 
 # Forward-declaration of the BlasFuncs struct. This struct must be opaque, so
 # that consumers of the CBlas class cannot become dependent on its size or
diff --git a/thinc/backends/cblas.pyx b/thinc/backends/cblas.pyx
index 896b604..9a9e63e 100644
--- a/thinc/backends/cblas.pyx
+++ b/thinc/backends/cblas.pyx
@@ -5,10 +5,10 @@ from libcpp.memory cimport make_shared
 
 
 # Single- and double-precision wrappers for `blis.cy.scalv`
-cdef void blis_sscal(int N, float alpha, float* X, int incX) nogil:
+cdef void blis_sscal(int N, float alpha, float* X, int incX) noexcept nogil:
     blis.cy.scalv(blis.cy.NO_CONJUGATE, N, alpha, X, incX)
 
-cdef void blis_dscal(int N, double alpha, double* X, int incX) nogil:
+cdef void blis_dscal(int N, double alpha, double* X, int incX) noexcept nogil:
     blis.cy.scalv(blis.cy.NO_CONJUGATE, N, alpha, X, incX)