Registry / serialization / pickle5

pickle5

JSON →
library0.0.12pypypiunverified

pickle5 is a backport of the pickle protocol 5 (PEP 574) and other related changes, primarily for Python versions prior to 3.8. It provides the performance improvements and features of protocol 5 for Python 3.5, 3.6, and 3.7. The library is currently at version 0.0.12 and is no longer actively maintained, as its purpose has been superseded by native support in Python 3.8+.

pip install pickle5
INSTALL
IMPORT
SIG · PICKLE5
P
pickle5
serializationpythonv0.0.12
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pickle5
import pickle5
dump
from pickle5 import dump, load
from pickle import dump
Use pickle5's functions directly for protocol 5 on older Pythons, not the standard library's pickle.

This example demonstrates how to use `pickle5` to dump and load a Python dictionary. `pickle5` automatically uses protocol 5 by default, offering improvements over earlier pickle protocols available in older Python versions.

import pickle5 import os data = {'name': 'Alice', 'age': 30, 'city': 'New York'} # Dump data using pickle5 (protocol 5 is default) with open('data.pickle5', 'wb') as f: pickle5.dump(data, f) print("Data successfully pickled to data.pickle5 using pickle5.") # Load data using pickle5 with open('data.pickle5', 'rb') as f: loaded_data = pickle5.load(f) print(f"Data successfully loaded: {loaded_data}") # Clean up os.remove('data.pickle5')
Debug
Known issues
breakingInstalling `pickle5` on Python 3.8 or newer will fail due to `python_requires` constraints. If forcefully installed (e.g., via `pip install --no-deps` on an unsupported Python version), it can lead to subtle runtime issues, conflicts with the built-in `pickle` module, and unpredictable behavior, as Python 3.8+ already natively supports pickle protocol 5.
fix
Do not install `pickle5` on Python 3.8 or newer. Use the standard `import pickle` module, which includes protocol 5 support. If you have it installed, uninstall it: `pip uninstall pickle5`.
affects: Python >= 3.8
gotchaThe `pickle5` library is only necessary for Python versions 3.5, 3.6, and 3.7 to access pickle protocol 5. For Python 3.8 and all subsequent versions, protocol 5 is part of the standard `pickle` library and `pickle5` offers no additional functionality.
fix
Evaluate your project's Python version requirements. If you are targeting Python 3.8+, simply use `import pickle` and specify `protocol=5` if needed, or rely on the default highest protocol.
affects: Python < 3.8
deprecatedThe `pickle5` library is no longer actively maintained as its primary use case (backporting protocol 5) has been superseded by native Python versions. Relying on an unmaintained backport for critical serialization can introduce risks.
fix
It is highly recommended to upgrade your Python environment to 3.8 or newer to utilize the native `pickle` module's protocol 5 support and benefit from continued language updates and security patches.
affects: All versions
Upgrade
Version history
0.0.12latest on PyPI · released Nov 20, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Resources
pickle5 — pip install pickle5 · libregistry