commit python-humanfriendly for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-humanfriendly for openSUSE:Factory checked in at 2022-07-29 16:48:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-humanfriendly (Old) and /work/SRC/openSUSE:Factory/.python-humanfriendly.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-humanfriendly" Fri Jul 29 16:48:17 2022 rev:18 rq:991672 version:10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-humanfriendly/python-humanfriendly.changes 2022-03-21 20:13:27.404525516 +0100 +++ /work/SRC/openSUSE:Factory/.python-humanfriendly.new.1533/python-humanfriendly.changes 2022-07-29 16:48:19.574724015 +0200 @@ -1,0 +2,6 @@ +Fri Jul 29 07:42:02 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com> + +- Add patch pytest-7-support.patch: + * Support pytest >= 7. + +------------------------------------------------------------------- New: ---- pytest-7-support.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-humanfriendly.spec ++++++ --- /var/tmp/diff_new_pack.2UyVUU/_old 2022-07-29 16:48:20.214725795 +0200 +++ /var/tmp/diff_new_pack.2UyVUU/_new 2022-07-29 16:48:20.218725806 +0200 @@ -35,6 +35,8 @@ Source: https://files.pythonhosted.org/packages/source/h/humanfriendly/humanfriendly-%{version}.tar.gz # https://github.com/xolox/python-humanfriendly/issues/62 Patch0: python-humanfriendly-no-mock.patch +# PATCH-FIX-UPSTREAM gh#xolox/python-humanfriendly#65 +Patch1: pytest-7-support.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -74,8 +76,7 @@ friendly rendering of usage messages and querying the terminal for its size. %prep -%setup -q -n humanfriendly-%{version} -%patch0 -p1 +%autosetup -p1 -n humanfriendly-%{version} %build %python_build ++++++ pytest-7-support.patch ++++++ From 1789ed31946ba6353c8b26332344608519722a88 Mon Sep 17 00:00:00 2001 From: Steve Kowalik <steven@wedontsleep.org> Date: Fri, 29 Jul 2022 17:19:38 +1000 Subject: [PATCH] Do not import setup in the tests module pytest 7 and above will call any setup as a hook for any module collected, which in this case calls into the Sphinx machinery due to importing the setup function from there. Import it as something else so that pytest will not call it. Fixes #64 --- humanfriendly/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/humanfriendly/tests.py b/humanfriendly/tests.py index 72dad99..d019a2f 100644 --- a/humanfriendly/tests.py +++ b/humanfriendly/tests.py @@ -59,7 +59,7 @@ deprecation_note_callback, man_role, pypi_role, - setup, + setup as sphinx_setup, special_methods_callback, usage_message_callback, ) @@ -1444,7 +1444,7 @@ def bogus_usage(self): # Test event callback registration. fake_app = FakeApp() - setup(fake_app) + sphinx_setup(fake_app) assert man_role == fake_app.roles['man'] assert pypi_role == fake_app.roles['pypi'] assert deprecation_note_callback in fake_app.callbacks['autodoc-process-docstring']
participants (1)
-
Source-Sync