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 2024-01-21 23:07:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Twisted (Old) and /work/SRC/openSUSE:Factory/.python-Twisted.new.16006 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-Twisted" Sun Jan 21 23:07:48 2024 rev:67 rq:1139828 version:23.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-Twisted/python-Twisted.changes 2023-11-23 21:38:48.503425385 +0100 +++ /work/SRC/openSUSE:Factory/.python-Twisted.new.16006/python-Twisted.changes 2024-01-21 23:08:00.520745218 +0100 @@ -1,0 +2,8 @@ +Thu Jan 18 21:33:05 UTC 2024 - Ben Greiner <c...@bnavigator.de> + +- Add twisted-pr12054-testinvokationpy3.12.1.patch + * Pull request gh#twisted/twisted#12054 fixes failing tests on + python312 gh#twisted/twisted#12052 +- Fix rpmlint errors + +------------------------------------------------------------------- New: ---- twisted-pr12054-testinvokationpy3.12.1.patch BETA DEBUG BEGIN: New: - Add twisted-pr12054-testinvokationpy3.12.1.patch * Pull request gh#twisted/twisted#12054 fixes failing tests on BETA DEBUG END: ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Twisted.spec ++++++ --- /var/tmp/diff_new_pack.89EtHm/_old 2024-01-21 23:08:03.088838829 +0100 +++ /var/tmp/diff_new_pack.89EtHm/_new 2024-01-21 23:08:03.108839559 +0100 @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,7 +32,7 @@ Release: 0 Summary: An asynchronous networking framework written in Python License: MIT -URL: https://twistedmatrix.com/ +URL: https://twisted.org Source0: https://files.pythonhosted.org/packages/source/t/twisted/twisted-%{version}.tar.gz Source99: python-Twisted.rpmlintrc Patch0: skip_MultiCast.patch @@ -42,8 +42,10 @@ # PATCH-FIX-UPSTREAM 1521_delegate_parseqs_stdlib_bpo42967.patch https://twistedmatrix.com/trac/ticket/10096 mc...@suse.com # overcome incompatibility with the solution for bpo#42967. Patch3: 1521_delegate_parseqs_stdlib_bpo42967.patch -# We don't want to package yet another module, and it is easily skippable -Patch4: no-cython_test_exception_raiser.patch +# PATCH-FIX-UPSTREAM twisted-pr12054-testinvokationpy3.12.1.patch gh#twisted/twisted#12054 fixes gh#twisted/twisted#12052 +Patch4: twisted-pr12054-testinvokationpy3.12.1.patch +# PATCH-FIX-OPENSUSE We don't want to package yet another module, and it is easily skippable +Patch5: no-cython_test_exception_raiser.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 BuildRequires: %{python_module hatch-fancy-pypi-readme} @@ -178,6 +180,8 @@ %prep %autosetup -p1 -n twisted-%{version} sed -i '1{/env python/d}' src/twisted/mail/test/pop3testserver.py src/twisted/trial/test/scripttest.py +find src/twisted -name .gitignore -delete +find src/twisted -name '*.misc' -size 0 -delete %if ! %{with test} %build @@ -197,6 +201,11 @@ find docs -type f -print0 | xargs -0 chmod a-x # Fix doc-file dependency by removing x flags #sed -i "s/\r//" docs/core/howto/listings/udp/{MulticastClient,MulticastServer}.py %python_expand %fdupes %{buildroot}%{$python_sitelib} +%if 0%{?suse_version} > 1500 +mkdir -p %{buildroot}%{_docdir}/%{name}-doc +cp -r docs/* %{buildroot}%{_docdir}/%{name}-doc +%fdupes %{buildroot}%{_docdir}/%{name}-doc +%endif # Prepare for update-alternatives usage for p in twistd cftp ckeygen conch pyhtmlizer tkconch trial ; do @@ -288,8 +297,10 @@ %if 0%{?suse_version} > 1500 %files -n %{name}-doc -%endif +%doc %{_docdir}/%{name}-doc +%else %doc docs/ +%endif %endif ++++++ python-Twisted.rpmlintrc ++++++ --- /var/tmp/diff_new_pack.89EtHm/_old 2024-01-21 23:08:03.608857785 +0100 +++ /var/tmp/diff_new_pack.89EtHm/_new 2024-01-21 23:08:03.644859097 +0100 @@ -1,2 +1,3 @@ -addFilter("E: python-tests-in-package.*/usr/lib/.*/site-packages/twisted.*/test") +# rpmlint is too stupid for the . in the name +addFilter("python-.*-require .*zope.interface") ++++++ twisted-pr12054-testinvokationpy3.12.1.patch ++++++ >From 3038382d8b01912358419cee96a56730499881e1 Mon Sep 17 00:00:00 2001 From: Adi Roiban <adi.roi...@chevah.com> Date: Mon, 18 Dec 2023 13:42:28 +0000 Subject: [PATCH 1/4] Run with latest Python. --- .github/workflows/test.yaml | 6 +++--- src/twisted/newsfragments/12052.1.misc | 0 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 src/twisted/newsfragments/12052.1.misc Index: twisted-23.10.0/src/twisted/trial/reporter.py =================================================================== --- twisted-23.10.0.orig/src/twisted/trial/reporter.py +++ twisted-23.10.0/src/twisted/trial/reporter.py @@ -7,7 +7,7 @@ """ Defines classes that handle the results of tests. """ - +from __future__ import annotations import os import sys @@ -16,7 +16,7 @@ import unittest as pyunit import warnings from collections import OrderedDict from types import TracebackType -from typing import TYPE_CHECKING, List, Tuple, Type, Union +from typing import TYPE_CHECKING, List, Optional, Tuple, Type, Union from zope.interface import implementer @@ -87,6 +87,11 @@ class TestResult(pyunit.TestResult): @ivar successes: count the number of successes achieved by the test run. @type successes: C{int} + + @ivar _startTime: The time when the current test was started. It defaults to + L{None}, which means that the test was skipped. + @ivar _lastTime: The duration of the current test run. It defaults to + L{None}, which means that the test was skipped. """ # Used when no todo provided to addExpectedFailure or addUnexpectedSuccess. @@ -96,6 +101,9 @@ class TestResult(pyunit.TestResult): expectedFailures: List[Tuple[itrial.ITestCase, str, "Todo"]] # type: ignore[assignment] unexpectedSuccesses: List[Tuple[itrial.ITestCase, str]] # type: ignore[assignment] successes: int + _testStarted: Optional[int] + # The duration of the test. It is None until the test completes. + _lastTime: Optional[int] def __init__(self): super().__init__() @@ -104,6 +112,8 @@ class TestResult(pyunit.TestResult): self.unexpectedSuccesses = [] self.successes = 0 self._timings = [] + self._testStarted = None + self._lastTime = None def __repr__(self) -> str: return "<%s run=%d errors=%d failures=%d todos=%d dones=%d skips=%d>" % ( @@ -146,7 +156,8 @@ class TestResult(pyunit.TestResult): @type test: L{pyunit.TestCase} """ super().stopTest(test) - self._lastTime = self._getTime() - self._testStarted + if self._testStarted is not None: + self._lastTime = self._getTime() - self._testStarted def addFailure(self, test, fail): """ Index: twisted-23.10.0/src/twisted/newsfragments/12052.removal =================================================================== --- /dev/null +++ twisted-23.10.0/src/twisted/newsfragments/12052.removal @@ -0,0 +1,4 @@ +twisted.trial.reporter.TestRun.startTest() is no longer called for tests +with skip annotation or skip attribute for Python 3.12.1 or newer. +This is the result of upstream Python gh-106584 change. +The behavior is not change in 3.12.0 or older.