Add preliminary support for Python 3.12b4.
Build Linux binary wheels for Python 3.11.
Drop support for Python 2.7, 3.5, 3.6.
Add support for building arm64 wheels on macOS.
Update Python 3.11 support to final release.
Update Python 3.11 support to 3.11.0-rc1.
Disable unsafe math optimizations in C code. See pull request 176.
Add support for Python 3.11 (as of 3.11a5).
Switch package to src-layout, this is a packaging only change. (#168)
Add support for Python 3.10.
Add support for Python 3.9.
Move from Travis CI to Github Actions.
Supply manylinux wheels for aarch64 (ARM).
Fix the pure-Python implementation to activate a ghost object when setting its
__dict__. This matches the behaviour of the C implementation. See issue 155.
Fix the CFFI cache implementation (used on CPython when
PURE_PYTHON=1) to not print unraisable
_WeakValueDictionaryduring garbage collection. See issue 150.
Make the pure-Python implementation of the cache run a garbage collection (
minimizeif it detects that an object that was weakly referenced has been ejected. This solves issues on PyPy with ZODB raising
ConnectionStateErrorwhen there are persistent
zope.interfaceutilities/adapters registered. This partly reverts a change from release 4.2.3.
AssertionErrorclearing a non-empty
PersistentMappingthat has no connection. See issue 139.
Stop installing C header files on PyPy (which is what persistent before 4.6.0 used to do), fixes issue 135.
Fix slicing of
PersistentListto always return instances of the same class. It was broken on Python 3 prior to 3.7.4.
Fix copying of
copy.copyto also copy the underlying data object. This was broken prior to Python 3.7.4.
Update the handling of the
PURE_PYTHONenvironment variable. Now, a value of “0” requires that the C extensions be used; any other non-empty value prevents the extensions from being used. Also, all C extensions are required together or none of them will be used. This prevents strange errors that arise from a mismatch of Python and C implementations. See issue 131.
Note that some private implementation details such as the names of the pure-Python implementations have changed.
PersistentListto mark itself as changed after calling
clear(if needed). See PR 115.
PersistentMapping.updateto accept keyword arguments like the native
UserDict. Previously, most uses of keyword arguments resulted in
TypeError; in the undocumented and extremely unlikely event of a single keyword argument called
bthat happens to be a dictionary, the behaviour will change. Also adjust the signatures of
popto match the native version.
PersistentMapping.popitemto no longer mark the object as changed if it was empty.
Add preliminary support for Python 3.9a3+. See issue 124.
Fix the Python implementation of the PickleCache to be able to store objects that cannot be weakly referenced. See issue 133.
ctypesis required to use the Python implementation (except on PyPy).
Add support for Python 3.8.
Update documentation to Python 3.
Fully test the C implementation of the PickleCache, and fix discrepancies between it and the Python implementation:
The C implementation now raises
AssertionErrorfor certain types of bad inputs.
The Python implementation uses the C wording for error messages.
The C implementation properly implements
IPickleCache; methods unique to the Python implementation were moved to
The Python implementation raises
AttributeErrorif a persistent class doesn’t have a
See issue 102.
Allow sweeping cache without
cache_size=0, no need to set
cache_sizeto a large value.
CFFIon CPython for pure-Python operation. This drops support for Jython (which was untested). See issue 77.
Fix DeprecationWarning about
PY_SSIZE_T_CLEAN. See issue 108.
Drop support for Python 3.4.
Fix the repr of the persistent objects to include the module name when using the C extension. This matches the pure-Python behaviour and the behaviour prior to 4.4.0. See issue 92.
Change the repr of persistent objects to format the OID as in integer in hexadecimal notation if it is an 8-byte byte string, as ZODB does. This eliminates some issues in doctests. See issue 95.
Explicitly use unsigned constants for packing and unpacking C timestamps, fixing an arithmetic issue for GCC when optimizations are enabled and
-fwrapvis not enabled. See issue 86.
Fix installation of source packages on PyPy. See issue 88.
Use unsigned constants when doing arithmetic on C timestamps, possibly avoiding some overflow issues with some compilers or compiler settings. See issue 86.
Change the default representation of
Persistentobjects to include the representation of their OID and jar, if set. Also add the ability for subclasses to implement
_p_repr()instead of overriding
__repr__for better exception handling. See issue 11.
Reach and maintain 100% test coverage.
__init__.py, including removal of an attempted legacy import of
persistent.TimeStamp. See PR 80.
Add support for Python 3.7 and drop support for Python 3.3.
Build the CFFI modules (used on PyPy or when PURE_PYTHON is set) at installation or wheel building time when CFFI is available. This replaces the deprecated way of building them at import time. If binary wheels are distributed, it eliminates the need to have a functioning C compiler to use PyPy. See issue 75.
Fix deleting the
_p_oidof a pure-Python persistent object when it is in a cache.
Fix deleting special (
_p) attributes of a pure-Python persistent object that overrides
__delattr__and correctly calls
Remove some internal compatibility shims that are no longer necessary. See PR 82.
Make the return value of
TimeStamp.second()consistent across C and Python implementations when the
TimeStampwas created from 6 arguments with floating point seconds. Also make it match across trips through
TimeStamp.raw(). Previously, the C version could initially have erroneous rounding and too much false precision, while the Python version could have too much precision. The raw/repr values have not changed. See issue 41.
Fix the possibility of a rare crash in the C extension when deallocating items. See https://github.com/zopefoundation/persistent/issues/66
Change cPickleCache’s comparison of object sizes to determine whether an object can go in the cache to use
PyObject_TypeCheck(). This matches what the pure Python implementation does and is a stronger test that the object really is compatible with the cache. Previously, an object could potentially include
cPersistent_HEADand not set
cPersistenceCAPI->pertypeand still be eligible for the pickle cache; that is no longer the case. See issue 69.
Packaging-only release: fix Python 2.7
Packaging-only release: get
manylinuxwheel built automatically.
Avoid raising a
SystemError: error return without exception setwhen loading an object with slots whose jar generates an exception (such as a ZODB
Fix the hashcode of Python
TimeStampobjects on 64-bit Python on Windows. See https://github.com/zopefoundation/persistent/pull/55
PickleCache.incrgcis called (every transaction boundary) in pure-Python mode (PyPy). This means that the reported size of the cache may be wrong (until the next GC), but it is much faster. This should not have any observable effects for user code.
Stop clearing the dict and slots of objects added to
PickleCache.new_ghost(typically these values are passed to
__new__from the pickle data) in pure-Python mode (PyPy). This matches the behaviour of the C code.
Add support for Python 3.6.
stateparameter is not a built-in dict
Drop use of
ctypesfor determining maximum integer size, to increase pure-Python compatibility. See https://github.com/zopefoundation/persistent/pull/31
__slots__attributes are cleared when a persistent object is ghostified. (This excluses classes that override
__new__. See https://github.com/zopefoundation/persistent/wiki/Notes_on_state_new_and_slots if you’re curious.)
Fix the hashcode of C
TimeStampobjects on 64-bit Python 3 on Windows.
Fixed the Python(/PYPY) implementation
TimeStamp.timeTimemethod to have subsecond precision.
tox, avoid poisoning the user’s global wheel cache.
Add support for Python 3.5.
Drop support for Python 2.6 and 3.2.
Fix manifest and re-upload to fix stray files included in 4.1.0.
Make the Python implementation of
PickleCachebehave more similarly to the C implementation. In particular, the Python version can now run the complete ZODB and ZEO test suites.
Fix the hashcode of the Python
TimeStampon 32-bit platforms.
Make the C and Python
TimeStampobjects behave more alike. The Python version now produces the same
.raw()output as the C version, and has the same hashcode. In addition, the Python version is now supports ordering and equality like the C version.
Intern keys of object state in
__setstate__to reduce memory usage when unpickling multiple objects with the same attributes.
Add support for PyPy3.
100% branch coverage.
Add support for Python 3.4.
Persistent, avoid loading state in
_p_activatefor non-ghost objects (which could corrupt their state). (PR #9)
In pure-Python, and don’t throw
_p_activateis called on an object that has never been committed. (PR #9)
Persistent, avoid calling a subclass’s
__setattr__at instance creation time. (PR #8)
Make it possible to delete
_p_oidof a pure-Python
Persistentobject which has been removed from the jar’s cache (fixes aborting a ZODB Connection that has added objects). (PR #7)
Avoid a KeyError from
_p_accessed()on newly-created objects under pure-Python: these objects may be assigned to a jar, but not yet added to its cache. (PR #6)
Avoid a failure in
Persistent.__setstate__when the state dict contains exactly two keys. (PR #5)
Fix a hang in
picklecacheinvalidation if OIDs are manually passed out-of-order. (PR #4)
PURE_PYTHONenvironment variable support: if set, the C extensions will not be built, imported, or tested.
Updated Trove classifiers.
Fixed the C-extensions under Py3k (previously they compiled but were not importable).
Added support for Python 3.3.
C extenstions now build under Python 3.2, passing the same tests as the pure-Python reference implementation.
Fixed: In the C implimentation, an integer was compared with a pointer, with undefined results and a compiler warning.
Fixed: the Python implementation of the
_p_estimated_sizepropety didn’t support deletion.
Simplified implementation of the
_p_estimated_sizeproperty to only accept integers. A TypeError is raised if an incorrect type is provided.
Correct initialization functions in renamed
Worked around test failure due to overflow to long on 32-bit systems.
TimeStampextension module to avoid clash with pure-Python
timestampmodule on case-insensitive filesystems.
N.B: the canonical way to import the
TimeStampclass is now:
from persistent.timestamp import TimeStamp
which will yield the class from the extension module (if available), falling back to the pure-Python reference implementation.
Added explicit support for Python 3.2 and PyPy.
Note that the C implementations of Persistent, PickleCache, and Timestamp are not built (yet) on these platforms.
Dropped support for Python < 2.6.
100% unit test coverage.
Rewrote some to avoid the dependency
Cloned the remainder into new
Refactored some doctests refactored as unittests.
Completed pure-Python reference implementations of ‘Persistent’, ‘PickleCache’, and ‘TimeStamp’.
All covered platforms tested under
Added support for continuous integration using
setup.py devalias (installs
Dropped dependency on
zope.testrunner: tests now run with
Refactored many Doctests as Sphinx documentation (snippets are exercised via ‘tox’).
setup.py docsalias (installs