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

commit a7b2990e2eb14a157a27c3d0e2753683399b59a7
Author: Nguyễn Gia Phong <[email protected]>
AuthorDate: Mon Jan 19 21:27:08 2026 +0900

    gnu: Add python-blockbuster.
    
    * gnu/packages/python-check.scm (python-blockbuster): Add variable.
    
    Change-Id: I7cbdea1d62f700d75d92b8fd98929dc716e038e0
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/python-check.scm | 36 ++++++++++++++++++++++++++++++++++++
 gnu/packages/python-xyz.scm   |  2 +-
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 4edb1dcf46..e5fc392032 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -481,6 +481,42 @@ all the files it generates a report.")
 written in pure Python.")
     (license license:expat)))
 
+(define-public python-blockbuster
+  (package
+    (name "python-blockbuster")
+    (version "1.5.26")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/cbornet/blockbuster";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "16ycwblivp6d7s78sxq97f9xb4vxcjfr5srxhpkpssv770lp37fs"))))
+    (build-system pyproject-build-system)
+    ;; test_ssl_socket wants to connects to the Internet.
+    (arguments (list #:test-flags #~'("-k" "not test_ssl_socket")))
+    (native-inputs (list python-hatchling
+                         python-pytest
+                         python-pytest-asyncio
+                         python-requests))
+    (propagated-inputs (list python-forbiddenfruit))
+    (home-page "https://github.com/cbornet/blockbuster";)
+    (synopsis "Utility to detect blocking calls in Python async event loop")
+    (description
+     "Blockbuster is a Python package designed to detect and prevent
+blocking calls within an asynchronous event loop.  It is particularly useful
+when executing tests to ensure that your asynchronous code
+does not inadvertently call blocking operations,
+which can lead to performance bottlenecks and unpredictable behavior.
+
+It does this by wrapping common blocking functions
+and raising an exception when they are called within an asynchronous context.
+Note that Blockbuster currently only detects @code{asyncio} event loops
+and is tested only with CPython.")
+    (license license:asl2.0)))
+
 (define-public python-codacy-coverage
   (package
     (name "python-codacy-coverage")
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index aebfa3e5c6..87277ca260 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -166,7 +166,7 @@
 ;;; Copyright © 2024 Markku Korkeala <[email protected]>
 ;;; Copyright © 2025 Jordan Moore <[email protected]>
 ;;; Copyright © 2025 Dariqq <[email protected]>
-;;; Copyright © 2025 Nguyễn Gia Phong <[email protected]>
+;;; Copyright © 2025-2026 Nguyễn Gia Phong <[email protected]>
 ;;; Copyright © 2025, Cayetano Santos <[email protected]>
 ;;; Copyright © 2025 Jake Forster <[email protected]>
 ;;; Copyright © 2025 Luis Felipe López Acevedo <[email protected]>

Reply via email to