NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #163 most downloaded on PyPI
Pickler class to extend the standard pickle.Pickler functionality
Last release 11 months ago
03 Nov 2025
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 42 of 42 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
42 releases · first in 2015
Fix pickling of abstract base classes containing type annotations for Python 3.14. (PR#578)
Various fixes to support for Python 3.14 (PR #545).
One column per quarter.
https://github.com/cloudpipe/cloudpickle/blob/v3.1.0/CHANGES.md#310
https://github.com/cloudpipe/cloudpickle/blob/v3.1.0/CHANGES.md#310
Ignore the Black commit in git blame output
Ignore the Black commit in git blame output
Drop support for Python 3.6 and 3.7, add official support for Python 3.12.
A large code base reorganization and simplification was possible after dropping support for older Python versions.
See the changelog for more details:
Officially support Python 3.12 and drop support for Python 3.6 and 3.7. Dropping support for older Python versions made it possible to simplify the code base significantly, hopefully making it easier to contribute to and maintain the project. (PR #517)
Fix pickling of dataclasses and their instances. (issue #386, PR #513)
Any color you like as long as it's black. (PR #521)
Drop setup.py and setuptools in favor of pyproject.toml and flit.
(PR #521)
Fix pickling of NamedTuple in Python 3.9+. (issue #460)
Fix support of PyPy 3.8 and later. (issue #455)
Support for pickling abc.abstractproperty, abc.abstractclassmethod, and abc.abstractstaticmethod. (PR #450)
Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
Preparing release 2.0.0 (#431)
Co-authored-by: Pierre Glaser <pierreglaser@msn.com>
Python 3.5 is no longer supported.
Support for registering modules to be serialised by value. This allows code defined in local modules to be serialised and executed remotely without those local modules installed on the remote machine. (PR #417)
Fix a side effect altering dynamic modules at pickling time. (PR #426)
Support for pickling type annotations on Python 3.10 as per PEP 563 (PR #400)
Stricter parametrized type detection heuristics in _is_parametrized_type_hint to limit false positives. (PR #409)
Support pickling / depickling of OrderedDict KeysView, ValuesView, and ItemsView, following similar strategy for vanilla Python dictionaries. (PR #423)
Suppressed a source of non-determinism when pickling dynamically defined functions and handles the deprecation of co_lnotab in Python 3.10+. (PR #428)
cloudpickle's pickle.Pickler subclass (currently defined as cloudpickle.cloudpickle_fast.CloudPickler) can and should now be accessed as cloudpickle.P
cloudpickle's pickle.Pickler subclass (currently defined as
cloudpickle.cloudpickle_fast.CloudPickler) can and should now be accessed
as cloudpickle.Pickler. This is the only officially supported way of
accessing it.
(issue #366)
cloudpickle now supports pickling dict_keys, dict_items and
dict_values.
(PR #384)
Fix a bug causing cloudpickle to crash when pickling dynamically created, importable modules. (issue #360)
Fix a bug causing cloudpickle to crash when pickling dynamically created, importable modules. (issue #360)
Add optional dependency on pickle5 to get improved performance on
Python 3.6 and 3.7.
(PR #370)
Internal refactoring to ease the use of pickle5 in cloudpickle
for Python 3.6 and 3.7.
(PR #368)
Fix incompatibilities between cloudpickle 1.4.0 and Python 3.5.0/1/2 introduced by the new support of cloudpickle for pickling typing constructs. (iss
Fix incompatibilities between cloudpickle 1.4.0 and Python 3.5.0/1/2 introduced by the new support of cloudpickle for pickling typing constructs. (issue #360)
Restore compat with loading dynamic classes pickled with cloudpickle
version 1.2.1 that would reference the types.ClassType attribute.
(PR #359)
This version requires Python 3.5 or later
This version requires Python 3.5 or later
cloudpickle can now all pickle all constructs from the typing module
and the typing_extensions library in Python 3.5+
(PR #318)
Stop pickling the annotations of a dynamic class for Python < 3.6 (follow up on #276) (issue #347)
Fix a bug affecting the pickling of dynamic TypeVar instances on Python 3.7+,
and expand the support for pickling TypeVar instances (dynamic or non-dynamic)
to Python 3.5-3.6 (PR #350)
Add support for pickling dynamic classes subclassing typing.Generic
instances on Python 3.7+
(PR #351)
Fix a bug affecting dynamic modules occuring with modified builtins (issue #316)
Fix a bug affecting dynamic modules occuring with modified builtins (issue #316)
Fix a bug affecting cloudpickle when non-modules objects are added into sys.modules (PR #326).
Fix a regression in cloudpickle and python3.8 causing an error when trying to pickle property objects. (PR #329).
Fix a bug when a thread imports a module while cloudpickle iterates over the module list (PR #322).
Add support for out-of-band pickling (Python 3.8 and later). https://docs.python.org/3/library/pickle.html#example (issue #308)
Fix a side effect that would redefine types.ClassTypes as type
when importing cloudpickle.
(issue #337)
Fix a bug affecting subclasses of slotted classes. (issue #311)
Dont pickle the abc cache of dynamically defined classes for Python 3.6- (This was already the case for python3.7+) (issue #302)
Revert the change introduced in (issue #276) attempting to pickle functions annotations for Python 3.4 to 3.6. It is not possible to pickle complex ty
Revert the change introduced in (issue #276) attempting to pickle functions annotations for Python 3.4 to 3.6. It is not possible to pickle complex typing constructs for those versions (see issue #193)
Fix a bug affecting bound classmethod saving on Python 2. (issue #288)
Add support for pickling "getset" descriptors (issue #290)
Restore (partial) support for Python 3.4 for downstream projects that have LTS versions that would benefit from cloudpickle bug fixes.
Leverage the C-accelerated Pickler new subclassing API (available in Python 3.8) in cloudpickle. This allows cloudpickle to pickle Python objects up t
Leverage the C-accelerated Pickler new subclassing API (available in Python 3.8) in cloudpickle. This allows cloudpickle to pickle Python objects up to 30 times faster. (issue #253)
Support pickling of classmethod and staticmethod objects in python2. arguments. (issue #262)
Add support to pickle type annotations for Python 3.5 and 3.6 (pickling type annotations was already supported for Python 3.7, Python 3.4 might also work but is no longer officially supported by cloudpickle) (issue #276)
Internal refactoring to proactively detect dynamic functions and classes when pickling them. This refactoring also yields small performance improvements when pickling dynamic classes (~10%) (issue #273)
Minor release to fix a packaging issue (Markdown formatting of the long description rendered on pypi.org). The code itself is the same as 1.1.0.
Fix a bug making functions with keyword-only arguments forget the default values of these arguments after being pickled. (issue #264)
Fix a bug (already present before 0.5.3 and re-introduced in 0.8.0) affecting relative import instructions inside depickled functions (issue #254)
Add support for pickling interactively defined dataclasses. (issue #245)
Add support for pickling interactively defined dataclasses. (issue #245)
Global variables referenced by functions pickled by cloudpickle are now
unpickled in a new and isolated namespace scoped by the CloudPickler
instance. This restores the (previously untested) behavior of cloudpickle
prior to changes done in 0.5.4 for functions defined in the __main__
module, and 0.6.0/1 for other dynamic functions.
Correctly serialize dynamically defined classes that have a __slots__ attribute. (issue #225)
__slots__
attribute.
(issue #225)Fix regression in 0.6.0 which breaks the pickling of local function defined in a module, making it impossible to access builtins. (issue #211)
Stop using the deprecated imp module under Python 3. (issue #207)
Ensure that unpickling a function defined in a dynamic module several times sequentially does not reset the values of global variables. (issue #187)
Restrict the ability to pickle annotations to python3.7+ (issue #193 and issue #196)
Stop using the deprecated imp module under Python 3.
(issue #207)
Fixed pickling issue with singleton types NoneType, type(...) and
type(NotImplemented) (issue #209)
Ensure that unpickling a locally defined function that accesses the global variables of a module does not reset the values of the global variables if
Fixed inconsistent version in cloudpickle.__version__.
cloudpickle.__version__.Fixed a pickling issue for ABC in python3.7+ (issue #180).
Fixed a pickling issue for ABC in python3.7+ (issue #180).
Fixed a bug when pickling functions in __main__ that access global
variables (issue #187).
Fixed a crash in Python 2 when serializing non-hashable instancemethods of built-in types (issue #144).
pip install cloudpickle
Fixed a crash in Python 2 when serializing non-hashable instancemethods of built-in types (issue #144).
itertools objects can also pickled (PR #156).
logging.RootLogger can be also pickled
(PR #160).
Fixed a regression: AttributeError when loading pickles that hold a reference to a dynamically defined class from the __main__ module. (issue #131).
Fixed a regression: AttributeError when loading pickles that hold a
reference to a dynamically defined class from the __main__ module.
(issue #131).
Make it possible to pickle classes and functions defined in faulty modules that raise an exception when trying to look-up their attributes by name.
- Fixed cloudpickle.__version__.
cloudpickle.__version__.Use pickle.HIGHEST_PROTOCOL by default.
pickle.HIGHEST_PROTOCOL by default.` pip install cloudpickle==0.4.4 `
pip install cloudpickle==0.4.4
logging.RootLogger can be also pickled
(PR #160).Fixed a regression: AttributeError when loading pickles that hold a reference to a dynamically defined class from the __main__ module. (issue #131).
pip install cloudpickle
AttributeError when loading pickles that hold a
reference to a dynamically defined class from the __main__ module.
(issue #131).Restored compatibility with pickles from 0.4.0.
func.__qualname__ attribute.Fixed a crash when pickling dynamic classes whose __dict__ attribute was defined as a `property`. Most notably, this affected dynamic namedtuples in P
pip install cloudpickle
__dict__ attribute was defined as a property. Most notably, this affected dynamic namedtuples in Python 2. (https://github.com/cloudpipe/cloudpickle/pull/113)__module__ attribute of functions (https://github.com/cloudpipe/cloudpickle/pull/118/).__package__ attribute (https://github.com/cloudpipe/cloudpickle/pull/116).Fix crash when pickling dynamic class cycles
Get it while it's briny with
pip install cloudpickle
__transient__ support (https://github.com/cloudpipe/cloudpickle/pull/110)pickle.whichmodule() (https://github.com/cloudpipe/cloudpickle/pull/112)__transient__ supportpickle.whichmodule()Fix ResourceWarnings and DeprecationWarnings
Get it while it's hot with
pip install cloudpickle
ResourceWarnings and DeprecationWarnings (https://github.com/cloudpipe/cloudpickle/pull/88)__file__ attribute are not dynamic (https://github.com/cloudpipe/cloudpickle/pull/85)Fix ResourceWarnings and DeprecationWarnings
Get it while it's hot with
pip install cloudpickle
ResourceWarnings and DeprecationWarnings (https://github.com/cloudpipe/cloudpickle/pull/88)__file__ attribute are not dynamic (https://github.com/cloudpipe/cloudpickle/pull/85)ResourceWarnings and DeprecationWarnings__file__ attribute are not dynamic* Support Python 3.6 * Support Tornado Coroutines * Support builtin methods
* Packaging fix
Support unbound instancemethods
method_descriptorcloudpickle bug fix release v0.1.1
cloudpickle bug fix release v0.1.1
save_classmethod (#41)import cloudpickle to dump and load pickled data (#37)Pickle arbitrary functions, classes
Many thanks to the originators of PiCloud and the maintainers of PySpark for their stewardship of cloudpickle over the years!
Note: This was released on an :airplane:, in the literal :cloud:s.
Released on 2015-04-16 from the (real) clouds somewhere between Montréal and Atlanta.
Your coding agent can read these notes before it upgrades. Set up the MCP server →