Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

Metadata

Release files for tealet-greenlet 0.1.0rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tealet-greenlet 0.1.0rc1
File Size Uploaded
tealet_greenlet-0.1.0rc1.tar.gz 10.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tealet-greenlet 0.1.0rc1
File Interpreter ABI Platform
tealet_greenlet-0.1.0rc1-py3-none-any.whl Python 3 none any Details

Total release size: 21.4 kB

Release files / tealet_greenlet-0.1.0rc1.tar.gz

Download URL tealet_greenlet-0.1.0rc1.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e39b2ad79a78993cde91e535a9b5e4a9d8f5c0873f94c6c517e0ee71668f705d
BLAKE2b-256 checksum
How to use checksums
7591584d996570391a32bc06f69e23e24cd6085468793b253253f93990cfdc16
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release files / tealet_greenlet-0.1.0rc1-py3-none-any.whl

Download URL tealet_greenlet-0.1.0rc1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb4a335cb61b608158221fcfbaafc3720a3fc2776dc20374a94ebf9a293b995a
BLAKE2b-256 checksum
How to use checksums
0cc65d43dc6bae2e4c9d59dc18c00fd4aa9a0d9fdb829b7439cfbfead05b4acc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0rc1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page