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+.

serialization
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.

import pickle5

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

from pickle5 import dump, load

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 footguns
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.
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.
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.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
9 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
Resources