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

commit 373ab4b6f56498bae7272922b8d75797425bd484
Author: Nicolas Graves <[email protected]>
AuthorDate: Sun Jan 18 19:16:13 2026 +0100

    gnu: python-anyio: Improve style.
    
    * gnu/packages/python-xyz.scm (python-anyio)[arguments]
    <#:phases>: Migrate to <#test-flags>, improve style, use gexps, and
    string-join.
    
    Change-Id: I99b144390e5503b149d9b469bf71ad53c61ba829
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/python-xyz.scm | 86 ++++++++++++++++++++++-----------------------
 1 file changed, 42 insertions(+), 44 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ac32f1ca56..51484ce00b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28878,53 +28878,51 @@ register custom encoders and decoders.")
          "0ir3n40gdcm1kd7qyn4c46pgdyyp36h49a0pifyv6lh7vnrpnapp"))))
     (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (replace 'check
-           (lambda* (#:key tests? #:allow-other-keys)
-             (when tests?
-               (invoke
-                "pytest" "-vv" "-p" "no:asyncio"
-                "-m" "not network"
-                "-k"
-                (string-append
-                 "not test_is_block_device"
+     (list
+      #:test-flags
+      #~(list "-p" "no:asyncio"
+              "-m" "not network"
+              "-k"
+              (string-join
+               (list
+                "not test_is_block_device"
 
-                 ,@(cond
+                #$@(cond
                     ((or (target-aarch64?)
                          (target-riscv64?))
-                     '(" and not test_keyboardinterrupt_during_test"))
-                    (#t '()))
-
-                 ;; These fail because of network (or specifically IPv6
-                 ;; network) access (see:
-                 ;; https://github.com/agronholm/anyio/issues/417).
-                 " and not test_accept"
-                 " and not test_accept_after_close"
-                 " and not test_close_during_receive"
-                 " and not test_close_from_other_task"
-                 " and not test_concurrent_receive"
-                 " and not test_concurrent_send"
-                 " and not test_connect_tcp_with_tls"
-                 " and not test_connect_tcp_with_tls_cert_check_fail"
-                 " and not test_connection_refused"
-                 " and not test_extra_attributes"
-                 " and not test_getaddrinfo"
-                 " and not test_getnameinfo"
-                 " and not test_happy_eyeballs"
-                 " and not test_iterate"
-                 " and not test_receive_after_close"
-                 " and not test_receive_timeout"
-                 " and not test_reuse_port"
-                 " and not test_run_process"
-                 " and not test_send_after_close"
-                 " and not test_send_after_eof"
-                 " and not test_send_after_peer_closed"
-                 " and not test_send_eof"
-                 " and not test_send_large_buffer"
-                 " and not test_send_receive"
-                 " and not test_socket_options"
-                 " and not 
test_unretrieved_future_exception_server_crash"))))))))
+                     #~("test_keyboardinterrupt_during_test"))
+                    (#t #~()))
+
+                ;; These fail because of network (or specifically IPv6
+                ;; network) access (see:
+                ;; https://github.com/agronholm/anyio/issues/417).
+                "test_accept"
+                "test_accept_after_close"
+                "test_close_during_receive"
+                "test_close_from_other_task"
+                "test_concurrent_receive"
+                "test_concurrent_send"
+                "test_connect_tcp_with_tls"
+                "test_connect_tcp_with_tls_cert_check_fail"
+                "test_connection_refused"
+                "test_extra_attributes"
+                "test_getaddrinfo"
+                "test_getnameinfo"
+                "test_happy_eyeballs"
+                "test_iterate"
+                "test_receive_after_close"
+                "test_receive_timeout"
+                "test_reuse_port"
+                "test_run_process"
+                "test_send_after_close"
+                "test_send_after_eof"
+                "test_send_after_peer_closed"
+                "test_send_eof"
+                "test_send_large_buffer"
+                "test_send_receive"
+                "test_socket_options"
+                "test_unretrieved_future_exception_server_crash")
+               " and not "))))
     (propagated-inputs
      (list python-idna
            python-sniffio))

Reply via email to