devel/py-blockbuster 1.5.28 FreeBSD
Utility to detect blocking calls in the async event loop
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- Last update
- Commit
7284b839f1- License
- APACHE20
- Categories
- devel, python
- Package size
- 22.8 KiB, 106.5 KiB installed
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.
In Python, the asynchronous event loop allows for concurrent execution of tasks without the need for multiple threads or processes. This is achieved by running tasks cooperatively, where tasks yield control back to the event loop when they are waiting for I/O operations or other long-running tasks to complete.
However, blocking calls, such as file I/O operations or certain networking operations, can halt the entire event loop, preventing other tasks from running. This can lead to increased latency and reduced performance, defeating the purpose of using asynchronous programming.
The difficulty with blocking calls is that they are not always obvious, especially when working with third-party libraries or legacy code. This is where Blockbuster comes in: it helps you identify and eliminate blocking calls in your codebase during testing, ensuring that your asynchronous code runs smoothly and efficiently. It does this by wrapping common blocking functions and raising an exception when they are called within an asynchronous context.
Notes:
- Blockbuster currently only detects asyncio event loops.
- Blockbuster is tested only with CPython. It may work with other Python implementations if it's possible to monkey-patch the functions with setattr.
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | devel/py-blockbuster | 1.5.28 |
| OpenBSD | devel/py-blockbuster | 1.5.29 |
| NetBSD | devel/py-blockbuster | 1.5.27 |
| MidnightBSD | devel/py-blockbuster | 1.5.26 |
Install
Binary package:
pkg install py312-blockbuster
From the ports tree:
cd /usr/ports/devel/py-blockbuster/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= py312-blockbuster>0:devel/py-blockbuster
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 1.5.28 | 1.5.28 | - | 1.5.25 | 1.5.28 |
| FreeBSD:14:quarterly | 1.5.28 | 1.5.28 | n/a | 1.5.24 | 1.5.28 |
| FreeBSD:15:latest | 1.5.28 | 1.5.28 | n/a | 1.5.25 | 1.5.25 |
| FreeBSD:15:quarterly | 1.5.28 | 1.5.28 | n/a | n/a | n/a |
| FreeBSD:16:latest | 1.5.28 | 1.5.28 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 1
${PYTHON_PKGNAMEPREFIX}hatchling>=0: devel/py-hatchling
Runtime 1
${PYTHON_PKGNAMEPREFIX}forbiddenfruit>=0.1.4: devel/py-forbiddenfruit
The full lists below include those, and their dependencies in turn.
Build dependencies 19
- archivers/liblz4
- archivers/zstd
- devel/gettext-runtime
- devel/libffi
- devel/py-build
- devel/py-hatchling
- devel/py-installer
- devel/py-packaging
- devel/py-pathspec
- devel/py-pluggy
- devel/py-pyproject-hooks
- devel/py-trove-classifiers
- devel/readline
- lang/python312
- lang/python315
- math/mpdecimal
- print/indexinfo
- textproc/expat2
- textproc/py-tomlkit
Run dependencies 8
No port depends on this one.
Configuration
No options to configure.
- USES
- python
- Service scripts
- none
Files
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| blockbuster-1.5.28.tar.gz | 98235 | 5af2ed9de6c874339a76cc831d1d11db79800a974573580e52ad827a70803482 |
Master sites 1
- PYPI