Sync from SUSE:SLFO:Main python-persistent revision cfe30e4e604b6cd75c3921801dbb96f3

This commit is contained in:
Adrian Schröter 2024-05-03 21:51:04 +02:00
commit cb6cb8a7da
4 changed files with 367 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
persistent-5.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

257
python-persistent.changes Normal file
View File

@ -0,0 +1,257 @@
-------------------------------------------------------------------
Mon Jan 9 21:01:23 UTC 2023 - Hans-Peter Jansen <hpj@urpla.net>
- version update to 5.0 (2023-01-09)
- Build Linux binary wheels for Python 3.11.
- Drop support for Python 2.7, 3.5, 3.6.
- 4.9.3 (2022-11-16)
- Add support for building arm64 wheels on macOS.
- 4.9.2 (2022-11-03)
- Update Python 3.11 support to final release.
- 4.9.1 (2022-09-16)
- Update Python 3.11 support to 3.11.0-rc1.
- Disable unsafe math optimizations in C code. See pull request 176.
- 4.9.0 (2022-03-10)
- Add support for Python 3.11 (as of 3.11a5).
- 4.8.0 (2022-03-07)
- Switch package to src-layout, this is a packaging only change. (#168)
- Add support for Python 3.10.
- Clean up testing - exclude failing tests explicitly
-------------------------------------------------------------------
Thu Sep 2 12:04:25 UTC 2021 - pgajdos@suse.com
- version update to 4.7.0
4.7.0 (2021-04-13)
==================
- 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 ``__class__`` and ``__dict__``. This matches the
behaviour of the C implementation. See `issue 155
<https://github.com/zopefoundation/persistent/issues/155>`_.
- Fix the CFFI cache implementation (used on CPython when
``PURE_PYTHON=1``) to not print unraisable ``AttributeErrors`` from
``_WeakValueDictionary`` during garbage collection. See `issue 150
<https://github.com/zopefoundation/persistent/issues/150>`_.
- Make the pure-Python implementation of the cache run a garbage
collection (``gc.collect()``) on ``full_sweep``, ``incrgc`` and
``minimize`` *if* it detects that an object that was weakly
referenced has been ejected. This solves issues on PyPy with ZODB raising
``ConnectionStateError`` when there are persistent
``zope.interface`` utilities/adapters registered. This partly
reverts a change from release 4.2.3.
4.6.4 (2020-03-26)
==================
- Fix an overly specific test failure using zope.interface 5. See
`issue 144 <https://github.com/zopefoundation/persistent/issues/144>`_.
- Fix two reference leaks that could theoretically occur as the result
of obscure errors. See `issue 143 <https://github.com/zopefoundation/persistent/issues/143>`
- %check: use %pyunittest rpm macro
- removed upstreamed tests.patch
-------------------------------------------------------------------
Thu Mar 26 07:39:16 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Add patch to fix build with new zope.interface:
* tests.patch
-------------------------------------------------------------------
Tue Mar 24 12:41:57 UTC 2020 - pgajdos@suse.com
- version update to 4.6.3
- Fix a crash in the test suite under a 32-bit CPython on certain
32-bit platforms. See `issue 137
<https://github.com/zopefoundation/persistent/issues/137>`_. Fix by
`Jerry James <https://github.com/jamesjer>`_.
- Fix an ``AssertionError`` clearing a non-empty ``PersistentMapping``
that has no connection. See `issue 139
<https://github.com/zopefoundation/persistent/issues/139>`_.
-------------------------------------------------------------------
Thu Mar 12 11:54:12 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
- update to 4.6.1
* Stop installing C header files on PyPy
* Fix slicing of PersistentList to always return instances of the same class.
* Fix copying of PersistentList and PersistentMapping using copy.copy
to also copy the underlying data object.
* Update the handling of the PURE_PYTHON environment variable.
* Add preliminary support for Python 3.9a3+.
* Fix the Python implementation of the PickleCache to be able to
store objects that cannot be weakly referenced.
* Add support for Python 3.8.
-------------------------------------------------------------------
Mon May 20 15:50:31 UTC 2019 - pgajdos@suse.com
- version update to 4.5.0
- Fully test the C implementation of the PickleCache, and fix
discrepancies between it and the Python implementation:
- Allow sweeping cache without ``cache_size``. ``cache_size_bytes``
works with ``cache_size=0``, no need to set ``cache_size`` to a
large value.
- Require ``CFFI`` on CPython for pure-Python operation. This drops
support for Jython (which was untested). See `issue 77
<https://github.com/zopefoundation/persistent/issues/77>`_.
- Fix DeprecationWarning about ``PY_SSIZE_T_CLEAN``.
See `issue 108 <https://github.com/zopefoundation/persistent/issues/108>`_.
- Drop support for Python 3.4.
- deleted patches
- persistent-4.2.4.2-switch-off-tests.patch (not needed)
-------------------------------------------------------------------
Tue Mar 5 12:14:02 UTC 2019 - Hans-Peter Jansen <hpj@urpla.net>
- Allow build with older distributions
(%autopatch macro needs an appended empty line)
- Refresh patch persistent-4.2.4.2-switch-off-tests.patch
-------------------------------------------------------------------
Mon Mar 4 14:18:11 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 4.4.3:
* Too many changes around see CHANGES.rst
- Do not bother with documentation generating
- Add more dependencies
-------------------------------------------------------------------
Tue Aug 14 14:55:56 UTC 2018 - mcepl@suse.com
- Update to 4.3.0:
* 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_HEAD and not set tp_base to cPersistenceCAPI->pertype
and still be eligible for the pickle cache; that is no longer the
case. See https://github.com/zopefoundation/persistent/issues/69
-------------------------------------------------------------------
Thu Jul 26 08:35:19 UTC 2018 - tchvatal@suse.com
- Do not restrict python version makes stuff very unresolvable
-------------------------------------------------------------------
Thu Jul 19 15:33:04 UTC 2018 - mcepl@suse.com
- Clean up SPEC
- Fix tests (persistent-4.2.4.2-switch-off-tests.patch removes failing
test)
-------------------------------------------------------------------
Sat Jun 24 11:10:40 UTC 2017 - aloisio@gmx.com
- Update to 4.2.4.2
* Packaging-only release: fix Python 2.7 manylinux wheels.
4.2.4.1:
* Packaging-only release: get manylinux wheel built
automatically.
4.2.4:
* Avoid raising a SystemError: error return without exception
set when loading an object with slots whose jar generates an
exception (such as a ZODB POSKeyError) in setstate.
4.2.3:
* Fix the hashcode of Python TimeStamp objects on 64-bit
Python on Windows. See
https://github.com/zopefoundation/persistent/pull/55
* Stop calling gc.collect every time PickleCache.incrgc is
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.
* Fix __setstate__ interning when state parameter is not a
built-in dict
4.2.2:
* Drop use of ctypes for determining maximum integer size, to
increase pure-Python compatibility. See
https://github.com/zopefoundation/persistent/pull/31
* Ensure that __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 youre curious.)
4.2.1:
* Fix the hashcode of C TimeStamp objects on 64-bit Python 3
on Windows.
4.2.0:
* Fixed the Python(/PYPY) implementation TimeStamp.timeTime
method to have subsecond precision.
* When testing PURE_PYTHON environments under tox, avoid
poisoning the users global wheel cache.
* Add support for Python 3.5.
* Drop support for Python 2.6 and 3.2.
4.1.1:
* Fix manifest and re-upload to fix stray files included in
4.1.0.
4.1.0:
* Make the Python implementation of Persistent and PickleCache
behave 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 TimeStamp on 32-bit platforms.
- Converted to single-spec
- Dropped fix_32-bit_timestamp_hashcode.patch (fixed upstream)
-------------------------------------------------------------------
Sun May 10 19:46:51 UTC 2015 - benoit.monin@gmx.fr
- update to version 4.0.9:
* Make the C and Python TimeStamp objects behave more alike
* 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
- additional changes from version 4.0.8:
* Add support for Python 3.4
* In pure-Python Persistent, avoid loading state in _p_activate
for non-ghost objects (which could corrupt their state). (PR #9)
* In pure-Python, and dont throw POSKeyError if _p_activate is
called on an object that has never been committed. (PR #9)
* In pure-Python Persistent, avoid calling a subclasss
__setattr__ at instance creation time. (PR #8)
* Make it possible to delete _p_jar / _p_oid of a pure-Python
Persistent object which has been removed from the jars cache
(fixes aborting a ZODB Connection that has added objects).
(PR #7)
- additional changes from version 4.0.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 picklecache invalidation if OIDs are manually
passed out-of-order. (PR #4)
* Add PURE_PYTHON environment variable support: if set, the C
extensions will not be built, imported, or tested
- update project URL
- point the source URL to pypi
- drop type-mismatch.patch: fixed upstream
- add fix_32-bit_timestamp_hashcode.patch: fix timestamp hash
computation on 32 bit platform
- pass -q to test to avoid spamming the build log
- rename CHANGES.txt and README.txt to CHANGES.rst and README.rst:
changed upstream
-------------------------------------------------------------------
Fri Mar 21 23:02:35 UTC 2014 - schwab@linux-m68k.org
- type-mismatch.patch: Use Py_ssize_t rather than PY_LONG_LONG for sizes
-------------------------------------------------------------------
Mon Jul 29 14:58:49 UTC 2013 - hpj@urpla.net
- version 4.0.6: initial build

84
python-persistent.spec Normal file
View File

@ -0,0 +1,84 @@
#
# spec file for package python-persistent
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2013-2023 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-persistent
Version: 5.0
Release: 0
Summary: Translucent persistent objects
License: ZPL-2.1
URL: https://github.com/zopefoundation/persistent
Source: https://files.pythonhosted.org/packages/source/p/persistent/persistent-%{version}.tar.gz
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module manuel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module zope.interface}
BuildRequires: %{python_module zope.testrunner}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-cffi
Requires: python-zope.interface
%python_subpackages
%description
This package contains a generic persistence implementation for Python. It forms
the core protocol for making objects interact "transparently" with a database
such as the ZODB.
%package devel
Summary: Translucent persistent objects
Requires: %{name} = %{version}
Requires: python-devel
%description devel
This package contains the files needed for binding the %{name} C module.
%prep
%setup -q -n persistent-%{version}
rm -rf persistent.egg-info
# this two tests fail persistently (pun intended): disable them here allows to build with 15.4 as well
sed -i 's|test__p_repr_exception|tst__p_repr_exception|' src/persistent/tests/test_persistence.py
sed -i 's|test__p_repr_in_instance_ignored|tst__p_repr_in_instance_ignored|' src/persistent/tests/test_persistence.py
%build
%python_build
%install
%python_install
# don't bother with development files
%{python_expand rm %{buildroot}%{$python_sitearch}/persistent/*.c
%fdupes %{buildroot}%{$python_sitearch}
}
%check
%pyunittest_arch -v src/persistent/tests/*.py
%files %{python_files}
%license LICENSE.txt
%doc CHANGES.rst COPYRIGHT.txt README.rst
%exclude %{python_sitearch}/persistent/*.h
%{python_sitearch}/*
%files %{python_files devel}
%dir %{python_sysconfig_path include}/persistent
%{python_sysconfig_path include}/persistent/*.h
%{python_sitearch}/persistent/*.h
%changelog