- Add patch to fix build with new zope.interface:

* tests.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-persistent?expand=0&rev=24
This commit is contained in:
Tomáš Chvátal 2020-03-26 07:43:04 +00:00 committed by Git OBS Bridge
parent 8300cb07c8
commit f8b6a82bac
3 changed files with 30 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
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

View File

@ -23,9 +23,10 @@ Version: 4.6.3
Release: 0
Summary: Translucent persistent objects
License: ZPL-2.1
Group: Development/Languages/Python
URL: https://github.com/zopefoundation/persistent
Source: https://files.pythonhosted.org/packages/source/p/persistent/persistent-%{version}.tar.gz
# https://github.com/zopefoundation/persistent/issues/144
Patch0: tests.patch
BuildRequires: %{python_module cffi}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module manuel}
@ -45,7 +46,6 @@ such as the ZODB.
%package devel
Summary: Translucent persistent objects
Group: Development/Languages/Python
Requires: %{name} = %{version}
Requires: python-devel
@ -54,6 +54,7 @@ This package contains the files needed for binding the %{name} C module.
%prep
%setup -q -n persistent-%{version}
%patch0 -p1
rm -rf persistent.egg-info
%build

21
tests.patch Normal file
View File

@ -0,0 +1,21 @@
Index: persistent-4.6.3/persistent/tests/test_picklecache.py
===================================================================
--- persistent-4.6.3.orig/persistent/tests/test_picklecache.py
+++ persistent-4.6.3/persistent/tests/test_picklecache.py
@@ -1124,13 +1124,12 @@ class CPickleCacheTests(PickleCacheTestM
# interface declaration to the C implementation.
from persistent.interfaces import IExtendedPickleCache
from zope.interface.verify import verifyObject
- from zope.interface.exceptions import DoesNotImplement
- from zope.interface.exceptions import BrokenImplementation
+ from zope.interface.exceptions import MultipleInvalid
# We don't claim to implement it.
- with self.assertRaises(DoesNotImplement):
+ with self.assertRaises(MultipleInvalid):
verifyObject(IExtendedPickleCache, self._makeOne())
# And we don't even provide everything it asks for.
- with self.assertRaises(BrokenImplementation):
+ with self.assertRaises(MultipleInvalid):
verifyObject(IExtendedPickleCache, self._makeOne(), tentative=True)
def test___setitem___persistent_class(self):