From 918aacb6a49e7561b0ddf1cc741a0d967f75450c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Mar 2026 16:21:05 +0000 Subject: [PATCH 1/4] python3Packages.confection: 0.1.5 -> 1.2.2 Changelog: https://github.com/explosion/confection/releases/tag/v1.2.2 --- .../python-modules/confection/default.nix | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/confection/default.nix b/pkgs/development/python-modules/confection/default.nix index c3950d749d17..14dc49f4b260 100644 --- a/pkgs/development/python-modules/confection/default.nix +++ b/pkgs/development/python-modules/confection/default.nix @@ -2,37 +2,61 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system + setuptools, + + # tests + catalogue, + hypothesis, + numpy, pydantic, pytestCheckHook, - srsly, + + # passthru + nix-update-script, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "confection"; - version = "0.1.5"; - format = "setuptools"; + version = "1.2.2"; + pyproject = true; src = fetchFromGitHub { owner = "explosion"; repo = "confection"; - tag = "v${version}"; - hash = "sha256-1XIo9Hg4whYS1AkFeX8nVnpv+IvnpmyydHYdVYS0xZc="; + tag = "release-v${finalAttrs.version}"; + hash = "sha256-C7TAfr7Xq4C+JJI7/XWX1mTf2IvvOQT+q/nnGojhbFU="; }; - propagatedBuildInputs = [ - pydantic - srsly + build-system = [ + setuptools ]; - nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "confection" ]; + nativeCheckInputs = [ + catalogue + hypothesis + numpy + pydantic + pytestCheckHook + ]; + + passthru = { + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "release-v(.*)" + ]; + }; + }; + meta = { description = "Library that offers a configuration system"; homepage = "https://github.com/explosion/confection"; - changelog = "https://github.com/explosion/confection/releases/tag/v${version}"; + changelog = "https://github.com/explosion/confection/releases/tag/${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; }; -} +}) From 1b50444fcd74bf5c8b97ddc835ad00892d341d1a Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Mar 2026 16:16:28 +0000 Subject: [PATCH 2/4] python3Packages.weasel: 0.4.3 -> 1.0.0 Changelog: https://github.com/explosion/weasel/releases/tag/release-v1.0.0 --- .../python-modules/weasel/default.nix | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/weasel/default.nix b/pkgs/development/python-modules/weasel/default.nix index fb4b108a66bf..08ec267adb12 100644 --- a/pkgs/development/python-modules/weasel/default.nix +++ b/pkgs/development/python-modules/weasel/default.nix @@ -9,9 +9,8 @@ # dependencies cloudpathlib, confection, - packaging, + httpx, pydantic, - requests, smart-open, srsly, typer, @@ -19,33 +18,30 @@ # tests pytestCheckHook, + + # passthru + nix-update-script, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "weasel"; - version = "0.4.3"; + version = "1.0.0"; pyproject = true; src = fetchFromGitHub { owner = "explosion"; repo = "weasel"; - tag = "release-v${version}"; - hash = "sha256-Xd7cJlUi/a8gwtnuO9wqZiHT1xVMbp6V6Ha+Kyr4tFE="; + tag = "release-v${finalAttrs.version}"; + hash = "sha256-yiLoLdnDfKby1Ez1hKGL9DxazQto57Zn0DlRmGLurOs="; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace-fail "typer-slim" "typer" - ''; - build-system = [ setuptools ]; dependencies = [ cloudpathlib confection - packaging + httpx pydantic - requests smart-open srsly typer @@ -65,12 +61,21 @@ buildPythonPackage rec { "test_project_git_file_asset" ]; + passthru = { + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "release-v(.*)" + ]; + }; + }; + meta = { description = "Small and easy workflow system"; homepage = "https://github.com/explosion/weasel/"; - changelog = "https://github.com/explosion/weasel/releases/tag/${src.tag}"; + changelog = "https://github.com/explosion/weasel/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ GaetanLepage ]; mainProgram = "weasel"; }; -} +}) From f1dc23578e991a12c3ce62dc77ba2d16e8b2e0eb Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Mar 2026 16:49:13 +0000 Subject: [PATCH 3/4] python3Packages.thinc: 8.3.6 -> 8.3.12 Changelog: https://github.com/explosion/thinc/releases/tag/release-v8.3.12 --- .../python-modules/thinc/default.nix | 63 +++++++++++++------ .../thinc/fix-blas-ctypedefs.patch | 49 +++++++++++++++ 2 files changed, 94 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/thinc/fix-blas-ctypedefs.patch diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 8da83f9766fb..0663dd68023d 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -1,33 +1,44 @@ { 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 ]; + # avoid local paths, relative imports wont resolve correctly preCheck = '' - # avoid local paths, relative imports wont resolve correctly 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 = [ ]; }; -} +}) diff --git a/pkgs/development/python-modules/thinc/fix-blas-ctypedefs.patch b/pkgs/development/python-modules/thinc/fix-blas-ctypedefs.patch new file mode 100644 index 000000000000..03dd549002d3 --- /dev/null +++ b/pkgs/development/python-modules/thinc/fix-blas-ctypedefs.patch @@ -0,0 +1,49 @@ +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) + + From e1be7722b39258c20031f259ab83085cd2228edc Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Mar 2026 18:11:37 +0000 Subject: [PATCH 4/4] python3Packages.docling-core: 2.64.0 -> 2.70.2 Diff: https://github.com/docling-project/docling-core/compare/v2.64.0...v2.70.2 Changelog: https://github.com/docling-project/docling-core/blob/v2.70.2/CHANGELOG.md --- .../python-modules/docling-core/default.nix | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/docling-core/default.nix b/pkgs/development/python-modules/docling-core/default.nix index e19e098dcbde..48d380bf8c01 100644 --- a/pkgs/development/python-modules/docling-core/default.nix +++ b/pkgs/development/python-modules/docling-core/default.nix @@ -8,6 +8,7 @@ setuptools, # dependencies + defusedxml, jsonref, jsonschema, latex2mathml, @@ -31,14 +32,14 @@ buildPythonPackage (finalAttrs: { pname = "docling-core"; - version = "2.64.0"; + version = "2.70.2"; pyproject = true; src = fetchFromGitHub { owner = "docling-project"; repo = "docling-core"; tag = "v${finalAttrs.version}"; - hash = "sha256-22UJuHKUKyaIXcFOJvBWZibxBpibENZqVVFmZalWGx0="; + hash = "sha256-YRvvizPwc3sJ6FgZfhadixDayMIGS1zTo+bnHBS7FMg="; }; build-system = [ @@ -46,7 +47,13 @@ buildPythonPackage (finalAttrs: { setuptools ]; + pythonRelaxDeps = [ + "defusedxml" + "pillow" + "typer" + ]; dependencies = [ + defusedxml jsonref jsonschema latex2mathml @@ -62,14 +69,7 @@ buildPythonPackage (finalAttrs: { typing-extensions ]; - pythonRelaxDeps = [ - "pillow" - "typer" - ]; - - pythonImportsCheck = [ - "docling_core" - ]; + pythonImportsCheck = [ "docling_core" ]; nativeCheckInputs = [ gitpython @@ -83,6 +83,7 @@ buildPythonPackage (finalAttrs: { "test/test_code_chunker.py" "test/test_code_chunking_strategy.py" "test/test_hybrid_chunker.py" + "test/test_line_chunker.py" ]; meta = {