Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pytest-parallel for openSUSE:Factory checked in at 2021-06-01 10:39:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pytest-parallel (Old) and /work/SRC/openSUSE:Factory/.python-pytest-parallel.new.1898 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-parallel" Tue Jun 1 10:39:54 2021 rev:5 rq:896458 version:0.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pytest-parallel/python-pytest-parallel.changes 2021-02-07 15:24:33.282235884 +0100 +++ /work/SRC/openSUSE:Factory/.python-pytest-parallel.new.1898/python-pytest-parallel.changes 2021-06-01 10:41:30.989227243 +0200 @@ -1,0 +2,6 @@ +Mon May 31 20:46:17 UTC 2021 - Matej Cepl <mc...@suse.com> + +- Add python39.patch which makes the package compatible with Python 3.9 + as well (gh#browsertron/pytest-parallel#98). + +------------------------------------------------------------------- New: ---- python39.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pytest-parallel.spec ++++++ --- /var/tmp/diff_new_pack.TnsxL3/_old 2021-06-01 10:41:31.425227985 +0200 +++ /var/tmp/diff_new_pack.TnsxL3/_new 2021-06-01 10:41:31.429227992 +0200 @@ -25,6 +25,9 @@ License: MIT URL: https://github.com/browsertron/pytest-parallel Source: https://github.com/browsertron/pytest-parallel/archive/%{version}.tar.gz#/pytest-parallel-%{version}.tar.gz +# PATCH-FIX-UPSTREAM python39.patch gh#browsertron/pytest-parallel#98 mc...@suse.com +# os._Environ in py>=3.9 has different parameters +Patch0: python39.patch BuildRequires: %{python_module base >= 3.6} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -44,7 +47,7 @@ A pytest plugin for parallel and concurrent testing. %prep -%setup -q -n pytest-parallel-%{version} +%autosetup -p1 -n pytest-parallel-%{version} %build %python_build ++++++ python39.patch ++++++ >From 9ffdf6e659626061d84a9da38e155927a6eafbaf Mon Sep 17 00:00:00 2001 From: Andreas Nilsson <andni...@gmail.com> Date: Sat, 29 May 2021 12:13:43 +0200 Subject: [PATCH 1/2] Tests incompatible with latest pytest --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 22b1374..4908d31 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ envlist = [testenv] deps = - pytest>=3.0 + pytest>=3.0,<6.0 pytest-html>=1.19.0 six>=1.11.0 tblib >From 448a404d236ed0bbf3967e85ecce025115b1876c Mon Sep 17 00:00:00 2001 From: Andreas Nilsson <andni...@gmail.com> Date: Sat, 29 May 2021 12:53:42 +0200 Subject: [PATCH 2/2] Update environ shim to be compatible with Python 3.9 The `os.putenv()` and `os.unsetenv()` are always available starting in Python 3.9, removing the need for special handling in the `os._Environ` mapping: https://github.com/python/cpython/commit/b8d1262e8afe7b907b4a394a191739571092acdb Update the environ shim to match. --- pytest_parallel/__init__.py | 29 ++++++++++++++++++++--------- tests/test_general.py | 1 - tox.ini | 1 + 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/pytest_parallel/__init__.py b/pytest_parallel/__init__.py index 5702a64..a452bd1 100644 --- a/pytest_parallel/__init__.py +++ b/pytest_parallel/__init__.py @@ -113,15 +113,26 @@ def pytest_configure(config): class ThreadLocalEnviron(os._Environ): def __init__(self, env): - super().__init__( - env._data, - env.encodekey, - env.decodekey, - env.encodevalue, - env.decodevalue, - env.putenv, - env.unsetenv - ) + if sys.version_info >= (3, 9): + super().__init__( + env._data, + env.encodekey, + env.decodekey, + env.encodevalue, + env.decodevalue, + ) + self.putenv = os.putenv + self.unsetenv = os.unsetenv + else: + super().__init__( + env._data, + env.encodekey, + env.decodekey, + env.encodevalue, + env.decodevalue, + env.putenv, + env.unsetenv + ) if hasattr(env, 'thread_store'): self.thread_store = env.thread_store else: diff --git a/tests/test_general.py b/tests/test_general.py index 1209a83..aa7ec46 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -69,7 +69,6 @@ def test_async_2(): @pytest.mark.parametrize('cli_args', [ - [], ['--workers=2'], ['--tests-per-worker=2'] ]) diff --git a/tox.ini b/tox.ini index 4908d31..6e7b5bc 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ envlist = py36 py37 py38 + py39 [testenv] deps =