BSD Ports

devel/py-greenlet 3.5.5 NetBSD

Lightweight in-process concurrent programming

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
Last update
Commit
2781072caa
License
mit
Categories
devel, python
Package size
243.8 KiB, 1355.6 KiB installed

Description

The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called "tasklets". Tasklets run pseudo-concurrently (typically in a single or a few OS-level threads) and are synchronized with data exchanges on "channels".

A "greenlet", on the other hand, is a still more primitive notion of micro-thread with no implicit scheduling; coroutines, in other words. This is useful when you want to control exactly when your code runs. You can build custom scheduled micro-threads on top of greenlet; however, it seems that greenlets are useful on their own as a way to make advanced control flow structures. For example, we can recreate generators; the difference with Python's own generators is that our generators can call nested functions and the nested functions can yield values too. Additionally, you don't need a "yield" keyword. See the example in tests/test_generator.py.

Greenlets are provided as a C extension module for the regular unmodified interpreter.

Greenlets are lightweight coroutines for in-process concurrent programming.

In the other systems

SystemPortVersion
NetBSDdevel/py-greenlet3.5.5
FreeBSDdevel/py-greenlet3.5.6
OpenBSDdevel/py-greenlet3.5.6
DragonFlydevel/py-greenlet3.1.1
MidnightBSDdevel/py-greenlet3.3.0_1
HardenedBSDdevel/py-greenlet3.5.6
GhostBSDdevel/py-greenlet3.5.6

Install

Binary package:

pkgin install py311-greenlet

From pkgsrc:

cd /usr/pkgsrc/devel/py-greenlet && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_643.5.5
NetBSD 10.1 aarch643.5.1
SmartOS / illumos x86_643.5.6
macOS 15 arm643.5.6

Dependencies

Run dependencies 1

Configuration

No options to configure.

Service scripts
none
Flavors
py312-greenlet-3.5.5, py313-greenlet-3.5.5, py314-greenlet-3.5.5

Commit history 3

DateCommitCreditsLog message
2781072caa adam py-greenlet: updated to 3.5.6
3.5.6 (2026-09-14) - Correct a race condition that could lead to garbage collection unintentionally being disabled.
825a24229f adam py-greenlet: updated to 3.5.5
3.5.5 (2026-08-10) - Link the C++ runtime statically into the Windows wheels again, as the Appveyor builds did through 3.3.0. Since 3.3.1 ``_greenlet.pyd`` imported ``MSVCP140.dll``, which no Windows CPython distribution ships, so importing greenlet failed on machines without the Visual C++ redistributable.
b43dc638b9 adam py-greenlet: updated to 3.5.4
3.5.4 (2026-07-22) - Fix a crash (segfault) on free-threaded builds of Python 3.14 and later when the garbage collector runs while a greenlet that was started from a non-empty C-stack-reference state is active. See `issue 515 <https://github.com/python-greenlet/greenlet/issues/515>`_. Thanks to ddorian and Kumar Aditya. - Fix a potential use-after-free on free-threaded builds of Python 3.14 and later when the garbage collector runs while a greenlet is suspended holding a ``_PyCStackRef`` (for example, mid attribute resolution). See `issue 515 <https://github.com/python-greenlet/greenlet/issues/515>`_. Thanks to ddorian and Kumar Aditya. - Fix a deadlock on free-threaded builds when a greenlet switch happened …