Path to this page:
./
devel/py-greenlet,
Lightweight in-process concurrent programming
Branch: CURRENT,
Version: 3.1.1,
Package name: py312-greenlet-3.1.1,
Maintainer: kamel.derouicheThe 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.
Required to run:[
lang/python27]
Required to build:[
pkgtools/cwrappers]
Master sites:
Filesize: 181.662 KB
Version history: (Expand)
- (2024-10-01) Updated to version: py312-greenlet-3.1.1
- (2024-09-14) Updated to version: py312-greenlet-3.1.0
- (2024-01-12) Updated to version: py311-greenlet-3.0.3
- (2023-12-11) Updated to version: py311-greenlet-3.0.2
- (2023-10-29) Updated to version: py311-greenlet-3.0.1
- (2023-09-01) Updated to version: py311-greenlet-2.0.2
CVS history: (Expand)
2024-03-30 21:11:51 by Thomas Klausner | Files touched by this commit (2) |
Log message:
py-greenlet: add upstream bug report URL
|
2024-03-30 20:40:05 by Havard Eidnes | Files touched by this commit (2) |
Log message:
Re-add support for NetBSD/powerpc.
This time submitted upstream as well, ref.
https://github.com/python-greenlet/greenlet/pull/402
|
2024-01-12 14:19:13 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-greenlet: updated to 3.0.3
3.0.3 (2023-12-21)
- Python 3.12: Restore the full ability to walk the stack of a suspended
greenlet; previously only the innermost frame was exposed.
|
2023-12-11 13:22:06 by Adam Ciarcinski | Files touched by this commit (2) | |
Log message:
py-greenlet: updated to 3.0.2
3.0.2 (2023-12-08)
- Packaging: Add a minimal ``pyproject.toml`` to sdists.
- Packaging: Various updates to macOS wheels.
- Fix a test case on Arm32. Note that this is not a supported platform
(there is no CI for it) and support is best effort; there may be
other issues lurking.
|
2023-10-29 17:56:42 by Thomas Klausner | Files touched by this commit (4) | |
Log message:
py-greenlet: update to 3.0.1.
Switch to wheel.mk.
3.0.1 (2023-10-25)
==================
- Fix a potential crash on Python 3.8 at interpreter shutdown time.
This was a regression from earlier 3.0.x releases. Reported by Matt
Wozniski in `issue 376 \
<https://github.com/python-greenlet/greenlet/issues/376>`_.
3.0.0 (2023-10-02)
==================
- No changes from 3.0rc3 aside from the version number.
3.0.0rc3 (2023-09-12)
=====================
- Fix an intermittent error during process termination on some
platforms (GCC/Linux/libstdc++).
3.0.0rc2 (2023-09-09)
=====================
- Fix some potential bugs (assertion failures and memory leaks) in
previously-untested error handling code. In some cases, this means
that the process will execute a controlled ``abort()`` after severe
trouble when previously the process might have continued for some
time with a corrupt state. It is unlikely those errors occurred in
practice.
- Fix some assertion errors and potential bugs with re-entrant
switches.
- Fix a potential crash when certain compilers compile greenlet with
high levels of optimization. The symptom would be that switching to
a greenlet for the first time immediately crashes.
- Fix a potential crash when the callable object passed to the
greenlet constructor (or set as the ``greenlet.run`` attribute) has
a destructor attached to it that switches. Typically, triggering
this issue would require an unlikely subclass of
``greenlet.greenlet``.
- Python 3.11+: Fix rare switching errors that could occur when a
garbage collection was triggered during the middle of a switch, and
Python-level code in ``__del__`` or weakref callbacks switched to a
different greenlet and ultimately switched back to the original
greenlet. This often manifested as a ``SystemError``: "switch
returned NULL without an exception set."
For context on the fixes, see `gevent issue #1985
<https://github.com/gevent/gevent/issues/1985>`_.
3.0.0rc1 (2023-09-01)
=====================
- Windows wheels are linked statically to the C runtime in an effort
to prevent import errors on systems without the correct C runtime
installed. It's not clear if this will make the situation better or
worse, so please share your experiences in `issue 346
<https://github.com/python-greenlet/greenlet/issues/346>`_.
Note that this only applies to the binary wheels found on PyPI.
Building greenlet from source defaults to the shared library. Set
the environment variable ``GREENLET_STATIC_RUNTIME=1`` at build time
to change that.
- Build binary wheels for Python 3.12 on macOS.
- Fix compiling greenlet on a debug build of CPython 3.12. There is
`one known issue
<https://github.com/python-greenlet/greenlet/issues/368>`_ that
leads to an interpreter crash on debug builds.
- Python 3.12: Fix walking the frame stack of suspended greenlets.
Previously accessing ``glet.gr_frame.f_back`` would crash due to
`changes in CPython's undocumented internal frame handling \
<https://github.com/python/cpython/commit/1e197e63e21f77b102ff2601a549dda4b6439455>`_.
Platforms
---------
- Now, greenlet *may* compile and work on Windows ARM64 using
llvm-mingw, but this is untested and unsupported. See `PR
<https://github.com/python-greenlet/greenlet/pull/224>`_ by Adrian
Vladu.
- Now, greenlet *may* compile and work on LoongArch64 Linux systems,
but this is untested and unsupported. See `PR 257
<https://github.com/python-greenlet/greenlet/pull/257/files>`_ by merore.
Known Issues
------------
- There may be (very) subtle issues with tracing on Python 3.12, which
has redesigned the entire tracing infrastructure.
3.0.0a1 (2023-06-21)
====================
- Build binary wheels for S390x Linux. See `PR 358
<https://github.com/python-greenlet/greenlet/pull/358>`_ from Steven
Silvester.
- Fix a rare crash on shutdown seen in uWSGI deployments. See `issue
330 <https://github.com/python-greenlet/greenlet/issues/330>`_ and `PR 356
<https://github.com/python-greenlet/greenlet/pull/356>`_ from Andrew
Wason.
- Make the platform-specific low-level C/assembly snippets stop using
the ``register`` storage class. Newer versions of standards remove
this storage class, and it has been generally ignored by many
compilers for some time. See `PR 347
<https://github.com/python-greenlet/greenlet/pull/347>`_ from Khem
Raj.
- Add initial support for Python 3.12. See `issue
<https://github.com/python-greenlet/greenlet/issues/323>`_ and `PR
<https://github.com/python-greenlet/greenlet/pull/327>`_; thanks go
to (at least) Michael Droettboom, Andreas Motl, Thomas A Caswell,
raphaelauv, Hugo van Kemenade, Mark Shannon, and Petr Viktorin.
- Remove support for end-of-life Python versions, including Python
2.7, Python 3.5 and Python 3.6.
- Require a compiler that supports ``noinline`` directives. See
`issue 271
<https://github.com/python-greenlet/greenlet/issues/266>`_.
- Require a compiler that supports C++11.
|
2023-09-01 12:44:59 by Nia Alarie | Files touched by this commit (1) |
Log message:
py-greenlet: Convert to USE_CXX_FEATURES/FORCE_CXX_STD.
|
2023-07-09 17:01:40 by Nia Alarie | Files touched by this commit (1) |
Log message:
py-greenlet: Assumes compiler defaults to C++11.
|
2022-11-21 12:28:22 by Adam Ciarcinski | Files touched by this commit (3) | |
Log message:
py-greenlet: updated to 2.0.1
2.0.1 (2022-11-07)
==================
- Python 3.11: Fix a memory leak. See `issue 328
<https://github.com/python-greenlet/greenlet/issues/328>`_ and
`gevent issue 1924 <https://github.com/gevent/gevent/issues/1924>`_.
2.0.0.post0 (2022-11-03)
========================
- Add ``Programming Language :: Python :: 3.11`` to the PyPI
classifier metadata.
2.0.0 (2022-10-31)
==================
- Nothing changed yet.
2.0.0rc5 (2022-10-31)
=====================
- Linux: Fix another group of rare crashes that could occur when shutting down an
interpeter running multiple threads. See `issue 325 \
<https://github.com/python-greenlet/greenlet/issues/325>`_.
2.0.0rc4 (2022-10-30)
=====================
- Linux: Fix a rare crash that could occur when shutting down an
interpreter running multiple threads, when some of those threads are
in greenlets making calls to functions that release the GIL.
2.0.0rc3 (2022-10-29)
=====================
- Python 2: Fix a crash that could occur when raising an old-style
instance object.
2.0.0rc2 (2022-10-28)
=====================
- Workaround `a CPython 3.8 bug
<https://github.com/python/cpython/issues/81308>`_ that could cause
the interpreter to crash during an early phase of shutdown with the
message "Fatal Python error: Python memory allocator called without
holding the GI." This only impacted CPython 3.8a3 through CPython
3.9a5; the fix is only applied to CPython 3.8 releases (please don't
use an early alpha release of CPython 3.9).
2.0.0rc1 (2022-10-27)
=====================
- Deal gracefully with greenlet switches that occur while deferred
deallocation of objects is happening using CPython's "trash can"
mechanism. Previously, if a large nested container held items that
switched greenlets during delayed deallocation, and that second
greenlet also invoked the trash can, CPython's internal state could
become corrupt. This was visible as an assertion error in debug
builds. Now, the relevant internal state is saved and restored
during greenlet switches. See also `gevent issue 1909
<https://github.com/gevent/gevent/issues/1909>`_.
- Rename the C API function ``PyGreenlet_GET_PARENT`` to
``PyGreenlet_GetParent`` for consistency. The old name remains
available as a deprecated alias.
2.0.0a2 (2022-03-24)
====================
- Fix a crash on older versions of the Windows C runtime when an
unhandled C++ exception was thrown inside a greenlet by another
native extension. This is a bug in that extension, and the
interpreter will still abort, but at least it does so deliberately.
Thanks to Kirill Smelkov. See `PR 286
<https://github.com/python-greenlet/greenlet/pull/286>`_.
- Musllinux wheels for aarch64 are now built, tested, and uploaded to
PyPI. Thanks to Alexander Piskun.
- This version of greenlet is known to compile and pass tests on
CPython 3.11.0a6. Earlier 3.11 releases will not work; later
releases may or may not work. See `PR 294
<https://github.com/python-greenlet/greenlet/pull/294>`_. Special
thanks to Victor Stinner, Brandt Bucher and the CPython developers.
|