BSD Ports

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

SystemPortVersion
FreeBSDdevel/py-blockbuster1.5.28
OpenBSDdevel/py-blockbuster1.5.29
NetBSDdevel/py-blockbuster1.5.27
MidnightBSDdevel/py-blockbuster1.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.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest1.5.281.5.28-1.5.251.5.28
FreeBSD:14:quarterly1.5.281.5.28n/a1.5.241.5.28
FreeBSD:15:latest1.5.281.5.28n/a1.5.251.5.25
FreeBSD:15:quarterly1.5.281.5.28n/an/an/a
FreeBSD:16:latest1.5.281.5.28n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 1

Runtime 1

The full lists below include those, and their dependencies in turn.

Build dependencies 19
Run dependencies 8

No port depends on this one.

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
blockbuster-1.5.28.tar.gz982355af2ed9de6c874339a76cc831d1d11db79800a974573580e52ad827a70803482
Master sites 1
  • PYPI

Commit history 2

DateCommitCreditsLog message
7284b839f1 Po-Chuan Hsieh devel/py-blockbuster: Update to 1.5.28
Changes: https://github.com/cbornet/blockbuster/releases https://github.com/cbornet/blockbuster/commits/main
e8b38bd583 Po-Chuan Hsieh devel/py-blockbuster: Update to 1.5.27
Changes: https://github.com/cbornet/blockbuster/releases https://github.com/cbornet/blockbuster/commits/main