Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-Twisted for openSUSE:Factory checked in at 2023-01-11 17:14:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Twisted (Old) and /work/SRC/openSUSE:Factory/.python-Twisted.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Twisted" Wed Jan 11 17:14:17 2023 rev:59 rq:1057659 version:22.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Twisted/python-Twisted.changes 2022-11-22 16:09:49.105918972 +0100 +++ /work/SRC/openSUSE:Factory/.python-Twisted.new.32243/python-Twisted.changes 2023-01-11 17:14:20.839580005 +0100 @@ -1,0 +2,7 @@ +Tue Jan 10 17:43:37 UTC 2023 - Daniel Garcia <daniel.gar...@suse.com> + +- Add py311-tests-compat.patch to fix tests with python 3.11 + gh#twisted/twisted#11734 + gh#twisted/twisted#11733 + +------------------------------------------------------------------- New: ---- py311-tests-compat.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Twisted.spec ++++++ --- /var/tmp/diff_new_pack.mwfaIk/_old 2023-01-11 17:14:21.379583147 +0100 +++ /var/tmp/diff_new_pack.mwfaIk/_new 2023-01-11 17:14:21.387583193 +0100 @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -47,6 +47,8 @@ Patch5: no-pygtkcompat.patch # PATCH-FIX-OPENSUSE remove-dependency-version-upper-bounds.patch boo#1190036 -- run with h2 >= 4.0.0 and priority >= 2.0 Patch6: remove-dependency-version-upper-bounds.patch +# PATCH-FIX-UPSTREAM py311-tests-compat.patch gh#twisted/twisted#11734 gh#twisted/twisted#11733 +Patch7: py311-tests-compat.patch BuildRequires: %{python_module incremental >= 21.3.0} BuildRequires: %{python_module setuptools} BuildRequires: fdupes ++++++ py311-tests-compat.patch ++++++ Index: Twisted-22.10.0/src/twisted/newsfragments/10343.feature =================================================================== --- /dev/null +++ Twisted-22.10.0/src/twisted/newsfragments/10343.feature @@ -0,0 +1 @@ +Twisted now officially supports Python 3.11. Index: Twisted-22.10.0/src/twisted/persisted/aot.py =================================================================== --- Twisted-22.10.0.orig/src/twisted/persisted/aot.py +++ Twisted-22.10.0/src/twisted/persisted/aot.py @@ -399,8 +399,10 @@ class AOTUnjellier: inst = klass.__new__(klass) if hasattr(klass, "__setstate__"): self.callAfter(inst.__setstate__, state) - else: + elif isinstance(state, dict): inst.__dict__ = state + else: + inst.__dict__ = state.__getstate__() return inst elif c is Ref: Index: Twisted-22.10.0/src/twisted/spread/flavors.py =================================================================== --- Twisted-22.10.0.orig/src/twisted/spread/flavors.py +++ Twisted-22.10.0/src/twisted/spread/flavors.py @@ -398,6 +398,8 @@ class RemoteCopy(Unjellyable): object's dictionary (or a filtered approximation of it depending on my peer's perspective). """ + if not state: + state = {} state = { x.decode("utf8") if isinstance(x, bytes) else x: y for x, y in state.items() } Index: Twisted-22.10.0/src/twisted/spread/jelly.py =================================================================== --- Twisted-22.10.0.orig/src/twisted/spread/jelly.py +++ Twisted-22.10.0/src/twisted/spread/jelly.py @@ -154,7 +154,8 @@ def _newInstance(cls, state): instance = _createBlank(cls) def defaultSetter(state): - instance.__dict__ = state + if isinstance(state, dict): + instance.__dict__ = state or {} setter = getattr(instance, "__setstate__", defaultSetter) setter(state) Index: Twisted-22.10.0/src/twisted/test/test_persisted.py =================================================================== --- Twisted-22.10.0.orig/src/twisted/test/test_persisted.py +++ Twisted-22.10.0/src/twisted/test/test_persisted.py @@ -378,6 +378,10 @@ class AOTTests(TestCase): def __dict__(self): raise AttributeError() + @property + def __getstate__(self): + raise AttributeError() + self.assertRaises(TypeError, aot.jellyToSource, UnknownType()) def test_basicIdentity(self): Index: Twisted-22.10.0/src/twisted/trial/test/test_pyunitcompat.py =================================================================== --- Twisted-22.10.0.orig/src/twisted/trial/test/test_pyunitcompat.py +++ Twisted-22.10.0/src/twisted/trial/test/test_pyunitcompat.py @@ -218,8 +218,10 @@ class PyUnitResultTests(SynchronousTestC pyresult = pyunit.TestResult() result = PyUnitResultAdapter(pyresult) result.addError(self, f) + tback = "".join(traceback.format_exception(*exc_info)) self.assertEqual( - pyresult.errors[0][1], "".join(traceback.format_exception(*exc_info)) + pyresult.errors[0][1].endswith("ZeroDivisionError: division by zero\n"), + tback.endswith("ZeroDivisionError: division by zero\n"), ) def test_trialSkip(self): Index: Twisted-22.10.0/src/twisted/web/test/test_flatten.py =================================================================== --- Twisted-22.10.0.orig/src/twisted/web/test/test_flatten.py +++ Twisted-22.10.0/src/twisted/web/test/test_flatten.py @@ -706,15 +706,15 @@ class FlattenerErrorTests(SynchronousTes Exception while flattening: \\[<unrenderable>\\] <unrenderable> - .* + <Deferred at .* current result: <twisted.python.failure.Failure builtins.RuntimeError: example>> File ".*", line \\d*, in _flattenTree - element = await element - RuntimeError: example + element = await element.* """ ), flags=re.MULTILINE, ), ) + self.assertIn("RuntimeError: example", str(failure.value)) # The original exception is unmodified and will be logged separately if # unhandled. self.failureResultOf(failing, RuntimeError) Index: Twisted-22.10.0/src/twisted/mail/test/test_smtp.py =================================================================== --- Twisted-22.10.0.orig/src/twisted/mail/test/test_smtp.py +++ Twisted-22.10.0/src/twisted/mail/test/test_smtp.py @@ -1771,7 +1771,8 @@ class SendmailTests(TestCase): The default C{reactor} parameter of L{twisted.mail.smtp.sendmail} is L{twisted.internet.reactor}. """ - args, varArgs, keywords, defaults = inspect.getargspec(smtp.sendmail) + fullSpec = inspect.getfullargspec(smtp.sendmail) + defaults = fullSpec[3] self.assertEqual(reactor, defaults[2]) def _honorsESMTPArguments(self, username, password):