guix_mirror_bot pushed a commit to branch python-team
in repository guix.

commit 27187346e14fef41eaed8feabdeaf73aec98d5b0
Author: Nguyễn Gia Phong <[email protected]>
AuthorDate: Mon Feb 23 12:27:56 2026 +0900

    gnu: python-msgspec: Update to 0.20.0.
    
    * gnu/packages/serialization.scm (python-msgspec): Update to 0.20.0.
      [source]<snippet>: Adjust the path to atof_consts.h.
      [arguments]<#:test-flags>: Adjust to disable all typing tests.
      [native-inputs]: Remove python-gcovr, python-versioneer, and python-wheel.
      [supported-systems]: Remove restrictions as no longer specified
      by upstream.
    
    Change-Id: Iab29b85cfd5c598db82f8753475d15ad97a564db
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/serialization.scm | 37 +++++++++++++------------------------
 1 file changed, 13 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm
index 3f1eebd17c..de9936876e 100644
--- a/gnu/packages/serialization.scm
+++ b/gnu/packages/serialization.scm
@@ -704,7 +704,7 @@ RPC system.  Think JSON, except binary.  Or think Protocol 
Buffers, except faste
 (define-public python-msgspec
   (package
     (name "python-msgspec")
-    (version "0.18.6")
+    (version "0.20.0")
     (source (origin
               ;; There are no tests in the PyPI tarball.
               (method git-fetch)
@@ -715,39 +715,32 @@ RPC system.  Think JSON, except binary.  Or think 
Protocol Buffers, except faste
               (modules '((guix build utils)))
               (snippet
                ;; Delete autogenerated file, regenerate in a phase.
-               '(begin
-                  (delete-file "msgspec/atof_consts.h")))
+               #~(begin
+                   (delete-file "src/msgspec/atof_consts.h")
+                   ;; https://github.com/jcrist/msgspec/pull/981
+                   (substitute* "scripts/generate_atof_consts.py"
+                     (("os.path.join\\(repo, " all)
+                      (string-append all "\"src\", ")))))
               (sha256
                (base32
-                "0akq8lc3547i0j67dpnq1si3dvdc51r4f66dka2h7mq6c4zxq3fn"))))
+                "1nbaqdyn71zcqj3wj33xw90spm9s93c7qmfkjwbnmmx85ffycq0d"))))
     (build-system pyproject-build-system)
     (arguments
      (list
-      ;; Disable only one failing test.
-      ;;
-      ;; AssertionError: msgspec/structs.pyi:7: error: Positional-only
-      ;; parameters are only supported in Python 3.8 and greater
-      #:test-flags #~(list "-k" "not test_mypy")
+      ;; .pytest.toml declares testpaths = ["tests/unit", "tests/typing"]
+      ;; so --ignore=tests/typing will not work.
+      #:test-flags #~(list "tests/unit")
       #:phases #~(modify-phases %standard-phases
-                   (add-after 'unpack 'versioneer
-                     (lambda _
-                       (invoke "versioneer" "install")
-                       (substitute* "setup.py"
-                         (("version=versioneer.get_version\\(),")
-                          (format #f "version=~s," #$version)))))
-                   (add-after 'versioneer 'atof-consts
+                   (add-after 'unpack 'atof-consts
                      (lambda _
                        (with-directory-excursion "scripts"
                          ;; Regenerate the autogenerated file.
                          (invoke "python" "generate_atof_consts.py")))))))
     (native-inputs (list python-attrs
-                         python-gcovr
                          python-msgpack
                          python-pytest
-                         python-setuptools-scm
-                         python-versioneer
                          python-setuptools
-                         python-wheel))
+                         python-setuptools-scm))
     (propagated-inputs (list python-pyyaml python-tomli python-tomli-w))
     (home-page "https://jcristharif.com/msgspec/";)
     (synopsis "Fast serialization/validation library")
@@ -761,10 +754,6 @@ includes the following features:
 @item Zero-cost schema validation using familiar Python type annotations.
 @item A speedy Struct type for representing structured data.
 @end itemize")
-    ;; XXX: It might support more architectures but GitHub Actions listed only
-    ;; two right now. Try to build for the rest supported by Guix.  See:
-    ;; https://github.com/jcrist/msgspec/blob/main/.github/workflows/ci.yml#L83
-    (supported-systems (list "x86_64-linux" "aarch64-linux"))
     (license license:bsd-3)))
 
 (define-public python-ruamel.yaml

Reply via email to