--- id: zodbpickle version: "4.4" license: ZPL-2.1 license_treatment: unclear maintenance: active --- # zodbpickle — Fork of Python 3 pickle module License: unclear · Maintenance: active · Downloads: 220.2K/mo ## What it is and what it does zodbpickle is a fork of Python's pickle module designed to bridge serialization between Python 2 and 3 codebases, particularly for ZODB (Zope Object Database) applications. It adds support for protocol 3 opcodes under Python 2 and restores the noload() operation removed in Python 3, which ZODB uses to retrieve persistent references without loading objects into memory. The package handles the tricky cross-version problem where Python 2 strings and Python 3 bytes have different semantics: it provides encoding options (like errors='bytes') to let you control whether legacy pickles deserialize as bytes or strings. It also offers a choice between fast C-based and slow pure-Python implementations, useful for debugging or when C extensions aren't available. No runtime dependencies means it integrates cleanly into existing projects. Use it for: - Migrating ZODB databases from Python 2 to Python 3 while preserving pickled object compatibility - Loading legacy Python 2 pickles in Python 3 applications with correct string/bytes handling - Optimizing ZODB cache behavior by using noload() to inspect persistent references without object instantiation - Comparing pickle behavior between C and pure-Python implementations during debugging - Building cross-version serialization layers where standard pickle doesn't handle protocol 3 or legacy opcodes ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a ZODB-compatible pickle interface that handles cross-version serialization between Python 2 and 3, with support for protocol 3 opcodes and the noload() operation. Yes, if you work with ZODB or need to deserialize Python 2 pickles in Python 3. The package is actively maintained, has no security vulnerabilities, and solves a real compatibility problem. Install friction is moderate due to C compilation, but wheels are available for common platforms. Verify ZPL-2.1 license compatibility with your project first. ## Install pip install zodbpickle uv add zodbpickle poetry add zodbpickle ## Installing zodbpickle Before you install: Medium install friction due to compiled C extensions across multiple platforms (macOS x86/ARM, Linux i686/aarch64/x86_64, Windows). Active maintenance with recent release (102 days ago) and support for current Python versions including 3.14. License in practice: Licensed under ZPL-2.1 (Zope Public License 2.1), but license treatment is marked unclear in the fact sheet—verify compatibility with your project's licensing requirements before use. Quickstart: from zodbpickle import pickle # Load Python 2 pickle on Python 3 data = pickle.loads(b"S'\\xff'\np0\n.", encoding='bytes') # Or use explicit implementation choice from zodbpickle import fastpickle # always C from zodbpickle import slowpickle # always Python Requires Python 3.10 or later; compiled C extensions must build for your platform. Pickle module security warning: never unpickle untrusted data. Verify before relying: - Exact scope of ZPL-2.1 license compatibility with common project licenses - Performance characteristics of fastpickle vs slowpickle for typical workloads - Whether noload() operation is actively used by ZODB or legacy-only ## Package facts - License: ZPL-2.1 (unclear) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 220.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags zodb pickle compatibility, python 2 3 pickle bridge, cross-version serialization, pickle protocol 3 support, noload pickle operation, binary pickle handling, zodb persistent references, zodb, serialization, cross-version [View on SkillFed](https://skillfed.io/packages/zodbpickle) · [View on PyPI](https://pypi.org/project/zodbpickle/)