disable_gc
Python context manager for temporarily disabling the garbage collector.
Reentrant, threadsafe, safe for use in asyncio, and prevents GC starvation.
Safe for use inside finalizers.
Usage
from disable_gc import disable_gc
with disable_gc:
a = 1 # Doing things with GC disabled
@disable_gc
def func():
a = 1 # GC disabled inside the function.
Notes
disable_gc does not and cannot monkey patch gc.enable(). Other threads enabling the gc in the background will leave it enabled until disable_gc is reentered once again.
Can be used as a reference for bpo-31356.
Metadata
Release files for disable-gc 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| disable_gc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for disable_gc-0.1.0-py3-none-any.whl |
Release files / disable_gc-0.1.0-py3-none-any.whl
| Download URL | disable_gc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f504e712751b0f2054ac5c638ea090c8190ec1858e877c691dc4554970fd3b64
|
|
BLAKE2b-256 checksum How to use checksums |
3a80ab63ea1acd544f0ffb74b64cf850655ce5847093f323a55b3d7ed3f08688
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
|
Security for disable-gc 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.