From 46e727a7137bbc416b094ec68a49c14bf24e8d626fe5a1bd8d2da7dc4de2cf13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 24 May 2021 12:11:34 +0000 Subject: [PATCH] Accepting request 895156 from home:pgajdos:python - version update to 4.8.0 * Make Python 2 forbid the use of type objects as keys (unless a custom metaclass is used that implements comparison as required by BTrees.) On Python 3, types are not orderable so they were already forbidden, but on Python 2 types can be ordered by memory address, which makes them unsuitable for use as keys. See `issue `_. * Make the ``multiunion``, ``union``, ``intersection``, and ``difference`` functions accept arbitrary Python iterables (that iterate across the correct types). Previously, the Python implementation allowed this, but the C implementation only allowed objects (like ``TreeSet`` or ``Bucket``) defined in the same module providing the function. See `issue 24 `_. * Fix persistency bug in the Python version (`#118 `_). * Fix ``Tree.__setstate__`` to no longer accept children besides tree or bucket types to prevent crashes. See `PR 143 `_ for details. * Make BTrees, TreeSet, Set and Buckets implements the ``__and__``, ``__or__`` and ``__sub__`` special methods as shortcuts for ``BTrees.Interfaces.IMerge.intersection``, ``BTrees.Interfaces.IMerge.union`` and ``BTrees.Interfaces.IMerge.difference``. * Add support for Python 3.9. * Build and upload aarch64 wheels. * Make a value of ``0`` in the ``PURE_PYTHON`` environment variable require the C extensions (except on PyPy). Previously, and if this variable is unset, missing or unusable C extensions would be silently ignored. With this variable set to ``0``, an OBS-URL: https://build.opensuse.org/request/show/895156 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-BTrees?expand=0&rev=22 --- BTrees-4.7.2.tar.gz | 3 -- BTrees-4.8.0.tar.gz | 3 ++ python-BTrees.changes | 72 +++++++++++++++++++++++++++++++++++++++++++ python-BTrees.spec | 10 ++++-- 4 files changed, 82 insertions(+), 6 deletions(-) delete mode 100644 BTrees-4.7.2.tar.gz create mode 100644 BTrees-4.8.0.tar.gz diff --git a/BTrees-4.7.2.tar.gz b/BTrees-4.7.2.tar.gz deleted file mode 100644 index 125c02c..0000000 --- a/BTrees-4.7.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7ce4a5eb5c135bcb5c06b5bd1ca6fd7fd39d8631306182307ed8bc30d3033846 -size 175093 diff --git a/BTrees-4.8.0.tar.gz b/BTrees-4.8.0.tar.gz new file mode 100644 index 0000000..9d46e73 --- /dev/null +++ b/BTrees-4.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3dba82db46db87597bf3cde4060d51d2a0592c481eacf0a99e13f5ec480d8a14 +size 194606 diff --git a/python-BTrees.changes b/python-BTrees.changes index 43c0d35..4d1bbce 100644 --- a/python-BTrees.changes +++ b/python-BTrees.changes @@ -1,3 +1,75 @@ +------------------------------------------------------------------- +Tue May 18 07:13:46 UTC 2021 - pgajdos@suse.com + +- version update to 4.8.0 + * Make Python 2 forbid the use of type objects as keys (unless a + custom metaclass is used that implements comparison as required by + BTrees.) On Python 3, types are not orderable so they were already + forbidden, but on Python 2 types can be ordered by memory address, + which makes them unsuitable for use as keys. See `issue + `_. + * Make the ``multiunion``, ``union``, ``intersection``, and + ``difference`` functions accept arbitrary Python iterables (that + iterate across the correct types). Previously, the Python + implementation allowed this, but the C implementation only allowed + objects (like ``TreeSet`` or ``Bucket``) defined in the same module + providing the function. See `issue 24 + `_. + * Fix persistency bug in the Python version + (`#118 `_). + * Fix ``Tree.__setstate__`` to no longer accept children besides + tree or bucket types to prevent crashes. See `PR 143 + `_ for details. + * Make BTrees, TreeSet, Set and Buckets implements the ``__and__``, + ``__or__`` and ``__sub__`` special methods as shortcuts for + ``BTrees.Interfaces.IMerge.intersection``, + ``BTrees.Interfaces.IMerge.union`` and + ``BTrees.Interfaces.IMerge.difference``. + * Add support for Python 3.9. + * Build and upload aarch64 wheels. + * Make a value of ``0`` in the ``PURE_PYTHON`` environment variable + require the C extensions (except on PyPy). Previously, and if this + variable is unset, missing or unusable C extensions would be + silently ignored. With this variable set to ``0``, an + ``ImportError`` will be raised if the C extensions are unavailable. + See `issue 156 + `_. + * Make the BTree objects (``BTree``, ``TreeSet``, ``Set``, ``Bucket``) + of each module actually provide the interfaces defined in + ``BTrees.Interfaces``. Previously, they provided no interfaces. + * Make all the BTree and Bucket objects instances of + ``collections.abc.MutableMapping`` (that is, ``isinstance(btree, + MutableMapping)`` is now true; no actual inheritance has changed). + As part of this, they now provide the ``popitem()`` method. + * Make all the TreeSet and Set objects instances of + ``collections.abc.MutableSet`` (that is, ``isinstance(tree_set, + MutableSet)`` is now true; no actual inheritance has changed). + As part of this, they now provide several more methods, including + ``isdisjoint``, ``discard``, and ``pop``, and support in-place + mutation operators such as ``tree_set |= other``, ``tree_set += + other``, ``tree_set -= other`` and ``tree_set ^= other``. See `issue + 121 `_. + * Update the definitions of ``ISized`` and ``IReadSequence`` to simply + be ``zope.interface.common.collections.ISized`` and + ``zope.interface.common.sequence.IMinimalSequence`` respectively. + * Remove the ``__nonzero__`` interface method from ``ICollection``. No + objects actually implemented such a method; instead, the boolean value + is typically taken from ``__len__``. + * Adjust the definition of ``ISet`` to produce the same resolution + order under the C3 and legacy orderings. This means that the legacy + order has changed slightly, but that this package emits no warnings + when ``ZOPE_INTERFACE_LOG_CHANGED_IRO=1``. Note that the legacy + order was not being used for these objects because the C3 ordering + was still consistent; it could only be obtained using + ``ZOPE_INTERFACE_USE_LEGACY_IRO=1``. See `PR 159 + `_ for all the + interface updates. + * Fix the ``get``, ``setdefault`` and ``pop`` methods, as well as the + ``in`` operator, to not suppress ``POSKeyError`` if the object or + subobjects are corrupted. Previously, such errors were logged by + ZODB, but not propagated. See `issue 161 + `_. + ------------------------------------------------------------------- Tue Apr 14 09:19:56 UTC 2020 - Tomáš Chvátal diff --git a/python-BTrees.spec b/python-BTrees.spec index 422e39b..f6953a1 100644 --- a/python-BTrees.spec +++ b/python-BTrees.spec @@ -1,7 +1,7 @@ # # spec file for package python-BTrees # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # Copyright (c) 2015 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-BTrees -Version: 4.7.2 +Version: 4.8.0 Release: 0 Summary: Persistent B-tree object containers for Python License: ZPL-2.1 @@ -27,6 +27,7 @@ URL: https://github.com/zopefoundation/BTrees Source: https://files.pythonhosted.org/packages/source/B/BTrees/BTrees-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module persistent-devel >= 4.1.0} +BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module transaction} BuildRequires: %{python_module zope.interface} @@ -69,7 +70,10 @@ rm -rf BTrees.egg-info } %check -%python_exec setup.py -q test +# testPurePython tests would require this step which setup.py test did: +#%%{python_expand cp build/lib.linux-*/BTrees/*.so src/BTrees/} +# it can be overcome with --import-mode=append +%pytest_arch -k 'not testPurePython' %files %{python_files} %doc CHANGES.rst README.rst PKG-INFO