summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2025-10-10 22:17:42 +0300
committerrobot-piglet <[email protected]>2025-10-10 22:28:05 +0300
commit90b8dc330c9dae77ba084e2199f2b85793407372 (patch)
tree1dc781602be51655434becb2e02dd4bd966a3fc6 /contrib/python
parent5cf77d1156cbd68ded4afa6b0255cd6f9971b807 (diff)
Intermediate changes
commit_hash:d61540abee23f6613ae4792d93d214c70f277973
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/zope.interface/py3/.dist-info/METADATA12
-rw-r--r--contrib/python/zope.interface/py3/patches/01-fix-tests.patch140
-rw-r--r--contrib/python/zope.interface/py3/ya.make6
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/common/tests/test_collections.py4
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py6
-rw-r--r--contrib/python/zope.interface/py3/zope/interface/tests/test_ro.py3
6 files changed, 97 insertions, 74 deletions
diff --git a/contrib/python/zope.interface/py3/.dist-info/METADATA b/contrib/python/zope.interface/py3/.dist-info/METADATA
index e037cb7ebfe..dfe56bc74b2 100644
--- a/contrib/python/zope.interface/py3/.dist-info/METADATA
+++ b/contrib/python/zope.interface/py3/.dist-info/METADATA
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: zope.interface
-Version: 8.0
+Version: 8.0.1
Summary: Interfaces for Python
Home-page: https://github.com/zopefoundation/zope.interface
Author: Zope Foundation and Contributors
@@ -25,7 +25,6 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
-Requires-Dist: setuptools
Provides-Extra: docs
Requires-Dist: Sphinx; extra == "docs"
Requires-Dist: repoze.sphinx.autointerface; extra == "docs"
@@ -48,7 +47,6 @@ Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
-Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary
@@ -88,6 +86,14 @@ For detailed documentation, please see https://zopeinterface.readthedocs.io/en/l
Changes
=========
+8.0.1 (2025-09-25)
+==================
+
+- Make tests resilient against different ways of calling them.
+
+- Remove run-time dependency on ``setuptools``.
+
+
8.0 (2025-09-12)
================
diff --git a/contrib/python/zope.interface/py3/patches/01-fix-tests.patch b/contrib/python/zope.interface/py3/patches/01-fix-tests.patch
index caf8f31514f..841985d2649 100644
--- a/contrib/python/zope.interface/py3/patches/01-fix-tests.patch
+++ b/contrib/python/zope.interface/py3/patches/01-fix-tests.patch
@@ -185,9 +185,70 @@
@@ -620,1 +620,1 @@ class Test_verifyObject(Test_verifyClass):
- from zope.interface.tests import dummy
+ from . import dummy
+--- contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py (index)
++++ contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py (working tree)
+@@ -672 +672 @@ class Test_implementedByFallback(unittest.TestCase):
+- from zope.interface.tests.test_declarations import FooNoCall
++ from __tests__.tests.test_declarations import FooNoCall
+@@ -688 +688 @@ class Test_implementedByFallback(unittest.TestCase):
+- from zope.interface.tests.test_declarations import FooImplementedNone
++ from __tests__.tests.test_declarations import FooImplementedNone
+@@ -1156 +1156 @@ class Test_implementer(Test_classImplements):
+- from zope.interface.tests.test_declarations import Foo
++ from __tests__.tests.test_declarations import Foo
+@@ -1351 +1351 @@ class TestProvidesClassRepr(unittest.TestCase):
+- from zope.interface.tests import dummy
++ from __tests__.tests import dummy
+@@ -1356 +1356 @@ class TestProvidesClassRepr(unittest.TestCase):
+- "sys.modules['zope.interface.tests.dummy'], "
++ "sys.modules['__tests__.tests.dummy'], "
+@@ -1375,3 +1375,3 @@ class TestProvidesClassRepr(unittest.TestCase):
+- from zope.interface.tests import dummy
+- from zope.interface.tests.test_declarations import IBar
+- from zope.interface.tests.test_declarations import IFoo
++ from __tests__.tests import dummy
++ from __tests__.tests.test_declarations import IBar
++ from __tests__.tests.test_declarations import IFoo
+@@ -1389 +1389 @@ class TestProvidesClassRepr(unittest.TestCase):
+- "directlyProvides(sys.modules['zope.interface.tests.dummy'], IFoo)"
++ "directlyProvides(sys.modules['__tests__.tests.dummy'], IFoo)"
+@@ -1404 +1404 @@ class TestProvidesClassRepr(unittest.TestCase):
+- from zope.interface.tests import test_declarations as my_module
++ from __tests__.tests import test_declarations as my_module
+@@ -1412,2 +1412,2 @@ class TestProvidesClassRepr(unittest.TestCase):
+- "directlyProvides(('zope.interface.tests.dummy', "
+- "'zope.interface.tests.test_declarations'), "
++ "directlyProvides(('__tests__.tests.dummy', "
++ "'__tests__.tests.test_declarations'), "
+@@ -2023 +2023 @@ class Test_moduleProvides(unittest.TestCase):
+- globs = {'__name__': 'zope.interface.tests.foo',
++ globs = {'__name__': '__tests__.tests.foo',
+@@ -2037 +2037 @@ class Test_moduleProvides(unittest.TestCase):
+- globs = {'__name__': 'zope.interface.tests.foo',
++ globs = {'__name__': '__tests__.tests.foo',
+@@ -2050 +2050 @@ class Test_moduleProvides(unittest.TestCase):
+- globs = {'__name__': 'zope.interface.tests.foo',
++ globs = {'__name__': '__tests__.tests.foo',
+--- contrib/python/zope.interface/py3/zope/interface/tests/test_exceptions.py (index)
++++ contrib/python/zope.interface/py3/zope/interface/tests/test_exceptions.py (working tree)
+@@ -26 +26 @@ def _makeIface():
+- from zope.interface.tests.test_exceptions import IDummy
++ from __tests__.tests.test_exceptions import IDummy
+--- contrib/python/zope.interface/py3/zope/interface/tests/test_interface.py (index)
++++ contrib/python/zope.interface/py3/zope/interface/tests/test_interface.py (working tree)
+@@ -1177 +1177 @@ class InterfaceClassTests(unittest.TestCase):
+- from zope.interface.tests.test_interface import HashMe as iface
++ from __tests__.tests.test_interface import HashMe as iface
+--- contrib/python/zope.interface/py3/zope/interface/tests/test_sorting.py (index)
++++ contrib/python/zope.interface/py3/zope/interface/tests/test_sorting.py (working tree)
+@@ -64 +64 @@ class Test(unittest.TestCase):
+- from zope.interface.tests.test_sorting import I1
++ from __tests__.tests.test_sorting import I1
--- contrib/python/zope.interface/py3/zope/interface/tests/test_ro.py (index)
+++ contrib/python/zope.interface/py3/zope/interface/tests/test_ro.py (working tree)
-@@ -224,218 +223,0 @@ class C3Setting:
+@@ -10,1 +10,0 @@
+-import zope.testing.renormalizing
+@@ -228,233 +227,0 @@ class C3Setting:
-class Test_c3_ro(Test_ro):
-
- def setUp(self):
@@ -274,14 +335,29 @@
- interface.tests.test_ro.D interface.tests.test_ro.D
- + interface.tests.test_ro.E
- interface.tests.test_ro.F interface.tests.test_ro.F
-- zope.interface.Interface zope.interface.Interface""".format(
+- interface.Interface interface.Interface""".format(
- name="interface.tests.test_ro.A"
- )
-
-- self.assertEqual(
-- '\n'.join(ln.rstrip() for ln in record.getMessage().splitlines()),
-- expected,
+- checker = zope.testing.renormalizing.OutputChecker([
+- (re.compile(r'zope\.'), ''), # zope is not always there
+- # space in headline is not consistent
+- (re.compile(
+- r'Legacy RO \(len=7\) +C3 RO \(len=7; inconsistent=no\)'),
+- 'Legacy RO (len=7) C3 RO (len=7; inconsistent=no)'),
+- (re.compile(r'=+'), ''), # header underline length varies
+- (re.compile(r' +\+'), ' +'), # table column spacing varies
+- (re.compile(r'interface\.Interface +interface\.Interface'),
+- 'interface.Interface interface.Interface'),
+- # spacing varies in last line
+- ]
- )
+- got = '\n'.join(ln.rstrip() for ln in record.getMessage().splitlines())
+- self.assertTrue(
+- checker.check_output(
+- expected, got, 0), checker.output_difference(
+- doctest.Example(
+- got, expected), got, 0))
-
- def test_ExtendedPathIndex_implement_thing_implementedby_super(self):
- # See
@@ -406,57 +482,3 @@
- self.assertEqual(iro, legacy_iro)
-
-
---- contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py (index)
-+++ contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py (working tree)
-@@ -672 +672 @@ class Test_implementedByFallback(unittest.TestCase):
-- from zope.interface.tests.test_declarations import FooNoCall
-+ from __tests__.tests.test_declarations import FooNoCall
-@@ -688 +688 @@ class Test_implementedByFallback(unittest.TestCase):
-- from zope.interface.tests.test_declarations import FooImplementedNone
-+ from __tests__.tests.test_declarations import FooImplementedNone
-@@ -1156 +1156 @@ class Test_implementer(Test_classImplements):
-- from zope.interface.tests.test_declarations import Foo
-+ from __tests__.tests.test_declarations import Foo
-@@ -1351 +1351 @@ class TestProvidesClassRepr(unittest.TestCase):
-- from zope.interface.tests import dummy
-+ from __tests__.tests import dummy
-@@ -1356 +1356 @@ class TestProvidesClassRepr(unittest.TestCase):
-- "sys.modules['zope.interface.tests.dummy'], "
-+ "sys.modules['__tests__.tests.dummy'], "
-@@ -1375,2 +1375,2 @@ class TestProvidesClassRepr(unittest.TestCase):
-- from zope.interface.tests import dummy
-- from zope.interface.tests.test_declarations import IFoo
-+ from __tests__.tests import dummy
-+ from __tests__.tests.test_declarations import IFoo
-@@ -1389 +1389 @@ class TestProvidesClassRepr(unittest.TestCase):
-- "directlyProvides(sys.modules['zope.interface.tests.dummy'], IFoo)"
-+ "directlyProvides(sys.modules['__tests__.tests.dummy'], IFoo)"
-@@ -1412,2 +1412,2 @@ class TestProvidesClassRepr(unittest.TestCase):
-- "directlyProvides(('zope.interface.tests.dummy', "
-- "'interface.tests.test_declarations'), "
-+ "directlyProvides(('__tests__.tests.dummy', "
-+ "'__tests__.tests.test_declarations'), "
-@@ -2023 +2023 @@ class Test_moduleProvides(unittest.TestCase):
-- globs = {'__name__': 'zope.interface.tests.foo',
-+ globs = {'__name__': '__tests__.tests.foo',
-@@ -2037 +2037 @@ class Test_moduleProvides(unittest.TestCase):
-- globs = {'__name__': 'zope.interface.tests.foo',
-+ globs = {'__name__': '__tests__.tests.foo',
-@@ -2050 +2050 @@ class Test_moduleProvides(unittest.TestCase):
-- globs = {'__name__': 'zope.interface.tests.foo',
-+ globs = {'__name__': '__tests__.tests.foo',
---- contrib/python/zope.interface/py3/zope/interface/tests/test_exceptions.py (index)
-+++ contrib/python/zope.interface/py3/zope/interface/tests/test_exceptions.py (working tree)
-@@ -26 +26 @@ def _makeIface():
-- from zope.interface.tests.test_exceptions import IDummy
-+ from __tests__.tests.test_exceptions import IDummy
---- contrib/python/zope.interface/py3/zope/interface/tests/test_interface.py (index)
-+++ contrib/python/zope.interface/py3/zope/interface/tests/test_interface.py (working tree)
-@@ -1177 +1177 @@ class InterfaceClassTests(unittest.TestCase):
-- from zope.interface.tests.test_interface import HashMe as iface
-+ from __tests__.tests.test_interface import HashMe as iface
---- contrib/python/zope.interface/py3/zope/interface/tests/test_sorting.py (index)
-+++ contrib/python/zope.interface/py3/zope/interface/tests/test_sorting.py (working tree)
-@@ -64 +64 @@ class Test(unittest.TestCase):
-- from zope.interface.tests.test_sorting import I1
-+ from __tests__.tests.test_sorting import I1
diff --git a/contrib/python/zope.interface/py3/ya.make b/contrib/python/zope.interface/py3/ya.make
index 83ef8a66f88..598e0764960 100644
--- a/contrib/python/zope.interface/py3/ya.make
+++ b/contrib/python/zope.interface/py3/ya.make
@@ -2,14 +2,10 @@
PY3_LIBRARY()
-VERSION(8.0)
+VERSION(8.0.1)
LICENSE(ZPL-2.1)
-PEERDIR(
- contrib/python/setuptools
-)
-
NO_COMPILER_WARNINGS()
NO_LINT()
diff --git a/contrib/python/zope.interface/py3/zope/interface/common/tests/test_collections.py b/contrib/python/zope.interface/py3/zope/interface/common/tests/test_collections.py
index df7dec99a29..384b033eeb6 100644
--- a/contrib/python/zope.interface/py3/zope/interface/common/tests/test_collections.py
+++ b/contrib/python/zope.interface/py3/zope/interface/common/tests/test_collections.py
@@ -65,10 +65,6 @@ class TestVerifyClass(VerifyClassMixin, unittest.TestCase):
# including some that aren't part of a language protocol, such as
# ``index`` and ``count``.
memoryview,
- # 'pkg_resources._vendor.pyparsing.ParseResults' is registered as a
- # MutableMapping but is missing methods like ``popitem`` and
- # ``setdefault``. It's imported due to namespace packages.
- 'ParseResults',
# sqlite3.Row claims ISequence but also misses ``index`` and
# ``count``. It's imported because...? Coverage imports it, but why
# do we have it without coverage?
diff --git a/contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py b/contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py
index c684d7c61e2..2abf0af95af 100644
--- a/contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py
+++ b/contrib/python/zope.interface/py3/zope/interface/tests/test_declarations.py
@@ -26,6 +26,7 @@ from __tests__.tests.test_interface import \
# pylint:disable=inherit-non-class,too-many-lines,protected-access
# pylint:disable=blacklisted-name,attribute-defined-outside-init
+IBar = InterfaceClass('IBar')
IFoo = InterfaceClass('IFoo')
@@ -1373,10 +1374,9 @@ class TestProvidesClassRepr(unittest.TestCase):
from zope.interface.declarations import alsoProvides
from zope.interface.declarations import directlyProvides
from __tests__.tests import dummy
+ from __tests__.tests.test_declarations import IBar
from __tests__.tests.test_declarations import IFoo
- IBar = InterfaceClass('IBar')
-
orig_provides = dummy.__provides__ # pylint:disable=no-member
del dummy.__provides__ # pylint:disable=no-member
self.addCleanup(setattr, dummy, '__provides__', orig_provides)
@@ -1401,7 +1401,7 @@ class TestProvidesClassRepr(unittest.TestCase):
# If we make this module also provide IFoo and IBar, then the repr
# lists both names.
- my_module = sys.modules[__name__]
+ from __tests__.tests import test_declarations as my_module
assert not hasattr(my_module, '__provides__')
directlyProvides(my_module, IFoo, IBar)
diff --git a/contrib/python/zope.interface/py3/zope/interface/tests/test_ro.py b/contrib/python/zope.interface/py3/zope/interface/tests/test_ro.py
index aeb801a6605..c2978ac80dd 100644
--- a/contrib/python/zope.interface/py3/zope/interface/tests/test_ro.py
+++ b/contrib/python/zope.interface/py3/zope/interface/tests/test_ro.py
@@ -12,9 +12,12 @@
#
##############################################################################
"""Resolution ordering utility tests"""
+import doctest
+import re
import unittest
+
# pylint:disable=blacklisted-name
# pylint:disable=protected-access
# pylint:disable=attribute-defined-outside-init