Greenlet compatibility layer built on tealet
Project description
tealet-greenlet
tealet-greenlet: greenlet compatibility on top of tealet.
tealet-greenlet packages the greenlet-compatible layer separately from the
core tealet runtime. The core package provides stack-slicing primitives;
this package carries the larger greenlet compatibility surface, including
parent/child switching, tracing hooks, context handling, and upstream-style
compatibility tests.
Rationale
tealet-greenlet is an experimental replacement library for greenlet based on
the tealet engine. It is currently intended as a proof of concept: how much of
greenlet's behaviour can we express by keeping the low-level stack engine small,
portable, and focused, while putting the greenlet business logic in a separate
layer?
That split is the point. tealet benefits from a simple core API and the
portability work already done in libtealet and Stackman. tealet-greenlet then
adds the compatibility policy on top: parent selection, error translation,
context handling, tracing hooks, cleanup behaviour, and test-facing
implementation probes.
Future development may keep improving the Python implementation, or move hot
paths and tricky compatibility edges into a C-accelerated core if that turns out
to be worthwhile. For now, the package gives us a concrete compatibility target
without making the core tealet wheel carry all of greenlet's semantic cargo.
Installation
python -m pip install tealet-greenlet
The canonical import is tealet_greenlet:
from tealet_greenlet import greenlet, getcurrent
Need drop-in import greenlet compatibility? Install the shim into
sys.modules before importing code that expects upstream greenlet:
import tealet_greenlet
tealet_greenlet.install()
import greenlet
For transition from the old in-core location, tealet.greenlet remains as a
thin wrapper when this package is installed.
Status
tealet-greenlet is pre-1.0 software. It is useful for experimentation,
tracking compatibility, and testing the architecture, but it does not claim full
upstream greenlet parity yet.
Documentation
The historical 2014-era greenlet_legacy.py shim is kept under tests/ as a
comparison fixture. It is not part of the installable package API.
Tests
Run the package-local tests from the repository root:
uv run --active python -m pytest packages/tealet-greenlet/tests -q
The upstream compatibility tests are opt-in:
PYTEALET_RUN_UPSTREAM_GREENLET_TESTS=1 \
uv run --active python -m pytest packages/tealet-greenlet/tests/compat_greenlet -q
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tealet_greenlet-0.1.0rc1.tar.gz.
File metadata
- Download URL: tealet_greenlet-0.1.0rc1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e39b2ad79a78993cde91e535a9b5e4a9d8f5c0873f94c6c517e0ee71668f705d
|
|
| MD5 |
1eb7ae6000417fa1d62a74733ae17d12
|
|
| BLAKE2b-256 |
7591584d996570391a32bc06f69e23e24cd6085468793b253253f93990cfdc16
|
Provenance
The following attestation bundles were made for tealet_greenlet-0.1.0rc1.tar.gz:
Publisher:
tealet-greenlet-release-publish.yml on kristjanvalur/pytealet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tealet_greenlet-0.1.0rc1.tar.gz -
Subject digest:
e39b2ad79a78993cde91e535a9b5e4a9d8f5c0873f94c6c517e0ee71668f705d - Sigstore transparency entry: 1959415425
- Sigstore integration time:
-
Permalink:
kristjanvalur/pytealet@f2bbbce99242a27029b2617d797eea5bd4b6b2f9 -
Branch / Tag:
refs/tags/tealet-greenlet-v0.1.0rc1 - Owner: https://github.com/kristjanvalur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tealet-greenlet-release-publish.yml@f2bbbce99242a27029b2617d797eea5bd4b6b2f9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tealet_greenlet-0.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: tealet_greenlet-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb4a335cb61b608158221fcfbaafc3720a3fc2776dc20374a94ebf9a293b995a
|
|
| MD5 |
1ca80d89efdfe481225f76c73b0545ef
|
|
| BLAKE2b-256 |
0cc65d43dc6bae2e4c9d59dc18c00fd4aa9a0d9fdb829b7439cfbfead05b4acc
|
Provenance
The following attestation bundles were made for tealet_greenlet-0.1.0rc1-py3-none-any.whl:
Publisher:
tealet-greenlet-release-publish.yml on kristjanvalur/pytealet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tealet_greenlet-0.1.0rc1-py3-none-any.whl -
Subject digest:
bb4a335cb61b608158221fcfbaafc3720a3fc2776dc20374a94ebf9a293b995a - Sigstore transparency entry: 1959415610
- Sigstore integration time:
-
Permalink:
kristjanvalur/pytealet@f2bbbce99242a27029b2617d797eea5bd4b6b2f9 -
Branch / Tag:
refs/tags/tealet-greenlet-v0.1.0rc1 - Owner: https://github.com/kristjanvalur
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
tealet-greenlet-release-publish.yml@f2bbbce99242a27029b2617d797eea5bd4b6b2f9 -
Trigger Event:
release
-
Statement type: