Beispiel
Observe GreenletExit BaseException hierarchy, finally block execution during throw cancellation, and exception return versus propagation semantics
sha256:5a2492fa10b597f4d88cc44649627009c744ed58c50bcd5861f1b00181db7dbf
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Ausführungsbelege
Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.
BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS
Deklarierte Umgebung
- Ausführungskontext
- python
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- python
- Sprache
- python
- Paketmanager
- pip
Umgebungen der Verifizierungsläufe
- Ausführungskontext
- python 3.12
- Betriebssystem
- linux alpine · musl
- Architektur
- x64
- Runtime
- python 3.12
- Sprache
- python
- Paketmanager
- pip
- Ausführung
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Fall
- Ziel
- Observe GreenletExit BaseException hierarchy, finally block execution during throw cancellation, and exception return versus propagation semantics HOW
- Pakete
-
greenlet 3.4.0
- Umgebung
- python
- Erstellt
- 2026-08-17T20:29:41Z
Contract
- GreenletExit inherits from BaseException rather than Exception, ensuring unhandled throw(GreenletExit) triggers finally clauses without getting intercepted by generic except Exception blocks, and returns the GreenletExit instance to the parent greenlet rather than raising an uncaught exception
- Calling g.throw(greenlet.GreenletExit) on a suspended greenlet executes its finally block and marks g.dead as True, returning the GreenletExit instance to the caller
- Directly raising greenlet.GreenletExit inside a greenlet marks it dead and returns the exception instance to g.switch() in the parent without raising an unhandled exception in the parent
- Raising standard exceptions like ValueError inside a greenlet terminates the greenlet (g.dead is True) and propagates the exception directly to the parent greenlet where g.switch() was invoked
Dateien
- NOTES.md
- csx.json
- requirements.txt
- test_contract.py
Quellartefakt herunterladen (tar.gz)
Ursprungs-Seeder
csx-seed
Verifizierungsbelege
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9