From dbcfdd3dea62012b991ae03cf13ec0bc1fb389578d6cc882dbc772eedad1114d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 25 Mar 2024 21:32:21 +0000 Subject: [PATCH] Accepting request 1161549 from home:dancermak:branches:devel:languages:python New upstream release 4.14.2 OBS-URL: https://build.opensuse.org/request/show/1161549 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=119 --- 0001-Make-use-of-devpi_process-optional.patch | 55 ++++++++++++++ ...ip-test-which-require-network-access.patch | 39 ++++++++++ mark-network-tests.patch | 31 -------- optional_devpi_process.patch | 32 -------- python-tox.changes | 76 +++++++++++++++++++ python-tox.spec | 43 +++++------ tox-4.11.4.tar.gz | 3 - tox-4.14.2.tar.gz | 3 + 8 files changed, 192 insertions(+), 90 deletions(-) create mode 100644 0001-Make-use-of-devpi_process-optional.patch create mode 100644 0002-skip-test-which-require-network-access.patch delete mode 100644 mark-network-tests.patch delete mode 100644 optional_devpi_process.patch delete mode 100644 tox-4.11.4.tar.gz create mode 100644 tox-4.14.2.tar.gz diff --git a/0001-Make-use-of-devpi_process-optional.patch b/0001-Make-use-of-devpi_process-optional.patch new file mode 100644 index 0000000..8aafd3e --- /dev/null +++ b/0001-Make-use-of-devpi_process-optional.patch @@ -0,0 +1,55 @@ +From 48abffc7beea8884717bcb631f921a1b7f58bb6d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= +Date: Mon, 25 Mar 2024 20:15:19 +0100 +Subject: [PATCH 1/2] Make use of devpi_process optional + +Also skip tests using the enable_pip_pypi_access_fixture, as these tests require +the devpi server and can break without it +--- + src/tox/pytest.py | 6 +++++- + tests/test_provision.py | 5 ++++- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/tox/pytest.py b/src/tox/pytest.py +index d734defd..f9e5ae10 100644 +--- a/src/tox/pytest.py ++++ b/src/tox/pytest.py +@@ -17,7 +17,10 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c + + import pytest + from _pytest.fixtures import SubRequest # noqa: PLC2701 +-from devpi_process import IndexServer ++try: ++ from devpi_process import IndexServer ++except ImportError: ++ IndexServer = None + from virtualenv.info import fs_supports_symlink + + import tox.run +@@ -507,6 +510,7 @@ def enable_pip_pypi_access_fixture( + """Set a fake pip index url, tests that want to use a pypi server should create and overwrite this.""" + _, previous_url = disable_pip_pypi_access + enable_pypi_server(monkeypatch, previous_url) ++ pytest.skip() + return previous_url + + +diff --git a/tests/test_provision.py b/tests/test_provision.py +index 41eb630e..88cefb76 100644 +--- a/tests/test_provision.py ++++ b/tests/test_provision.py +@@ -16,7 +16,10 @@ from filelock import FileLock + from packaging.requirements import Requirement + + if TYPE_CHECKING: +- from devpi_process import Index, IndexServer ++ try: ++ from devpi_process import Index, IndexServer ++ except ImportError: ++ Index, IndexServer = None, None + + from tox.pytest import MonkeyPatch, TempPathFactory, ToxProjectCreator + +-- +2.44.0 + diff --git a/0002-skip-test-which-require-network-access.patch b/0002-skip-test-which-require-network-access.patch new file mode 100644 index 0000000..6dc45f8 --- /dev/null +++ b/0002-skip-test-which-require-network-access.patch @@ -0,0 +1,39 @@ +From 3ccb15d7bea97db132ed4cdea4d9ef25d18311a4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= +Date: Mon, 25 Mar 2024 20:11:16 +0100 +Subject: [PATCH 2/2] skip test which require network access + +--- + pyproject.toml | 3 +++ + .../python/virtual_env/package/test_package_cmd_builder.py | 1 + + 2 files changed, 4 insertions(+) + +diff --git a/pyproject.toml b/pyproject.toml +index 5e9b104a..b81c63ad 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -147,6 +147,9 @@ count = true + [tool.pytest.ini_options] + testpaths = ["tests"] + addopts = "--tb=auto -ra --showlocals --no-success-flaky-report" ++markers = [ ++ "network: tests requiring network connection", ++] + + [tool.coverage] + html.show_contexts = true +diff --git a/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py b/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py +index d29fe257..fb49a984 100644 +--- a/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py ++++ b/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py +@@ -87,6 +87,7 @@ def test_install_pkg_via(tox_project: ToxProjectCreator, mode: str, pkg_with_ext + + + @pytest.mark.usefixtures("enable_pip_pypi_access") ++@pytest.mark.network + def test_build_wheel_external(tox_project: ToxProjectCreator, demo_pkg_inline: Path) -> None: + ini = """ + [testenv] +-- +2.44.0 + diff --git a/mark-network-tests.patch b/mark-network-tests.patch deleted file mode 100644 index 82c55e9..0000000 --- a/mark-network-tests.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- - pyproject.toml | 3 +++ - tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py | 1 + - 2 files changed, 4 insertions(+) - -Index: tox-4.11.1/pyproject.toml -=================================================================== ---- tox-4.11.1.orig/pyproject.toml -+++ tox-4.11.1/pyproject.toml -@@ -133,6 +133,9 @@ ignore = [ - [tool.pytest.ini_options] - testpaths = ["tests"] - addopts = "--tb=auto -ra --showlocals --no-success-flaky-report" -+markers = [ -+ "network: tests requiring network connection", -+] - - [tool.coverage] - html.show_contexts = true -Index: tox-4.11.1/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py -=================================================================== ---- tox-4.11.1.orig/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py -+++ tox-4.11.1/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py -@@ -78,6 +78,7 @@ def test_install_pkg_via(tox_project: To - - - @pytest.mark.usefixtures("enable_pip_pypi_access") -+@pytest.mark.network - def test_build_wheel_external(tox_project: ToxProjectCreator, demo_pkg_inline: Path) -> None: - ini = """ - [testenv] diff --git a/optional_devpi_process.patch b/optional_devpi_process.patch deleted file mode 100644 index 635c786..0000000 --- a/optional_devpi_process.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: tox-4.11.1/src/tox/pytest.py -=================================================================== ---- tox-4.11.1.orig/src/tox/pytest.py -+++ tox-4.11.1/src/tox/pytest.py -@@ -16,7 +16,10 @@ from typing import TYPE_CHECKING, Any, C - - import pytest - from _pytest.fixtures import SubRequest --from devpi_process import IndexServer -+try: -+ from devpi_process import IndexServer -+except ImportError: -+ IndexServer = None - from virtualenv.info import fs_supports_symlink - - import tox.run -Index: tox-4.11.1/tests/test_provision.py -=================================================================== ---- tox-4.11.1.orig/tests/test_provision.py -+++ tox-4.11.1/tests/test_provision.py -@@ -16,7 +16,10 @@ from filelock import FileLock - from packaging.requirements import Requirement - - if TYPE_CHECKING: -- from devpi_process import Index, IndexServer -+ try: -+ from devpi_process import Index, IndexServer -+ except ImportError: -+ Index, IndexServer = None, None - - from tox.pytest import MonkeyPatch, TempPathFactory, ToxProjectCreator - diff --git a/python-tox.changes b/python-tox.changes index 1e9d87f..83750cd 100644 --- a/python-tox.changes +++ b/python-tox.changes @@ -1,3 +1,79 @@ +------------------------------------------------------------------- +Mon Mar 25 19:22:38 UTC 2024 - Dan Čermák + +- Rebase patches: + * optional_devpi_process.patch as 0001-Make-use-of-devpi_process-optional.patch + (additionally add a skip of tests that would require the devpi process) + * mark-network-tests.patch as 0002-skip-test-which-require-network-access.patch + +- Bump dependencies according to upstream +- Remove unused dependency pytest-randomly + +- New upstream release 4.14.2: + +v4.14.2 (2024-03-22) +-------------------- + +Bugfixes - 4.14.2 +~~~~~~~~~~~~~~~~~ +- Add provision arguments to ToxParser to fix crash when provisioning new tox environment without list-dependencies by :user:`seyidaniels` (:issue:`3190`) + +Improved Documentation - 4.14.2 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Removed unused line from the 'fresh_subprocess' documentation. (:issue:`3241`) + +v4.14.1 (2024-03-06) +-------------------- + +Bugfixes - 4.14.1 +~~~~~~~~~~~~~~~~~ +- Fix crash with fresh subprocess, if the build backend is setuptools automatically enable fresh subprocesses for + build backend calls - by :user:`gaborbernat`. (:issue:`3235`) + +v4.14.0 (2024-03-05) +-------------------- + +Features - 4.14.0 +~~~~~~~~~~~~~~~~~ +- Support enabling fresh subprocess for packaging build backends via :ref:`fresh_subprocess` - by :user:`gaborbernat`. (:issue:`3227`) +- Allow plugins attaching additional information to ``--version`` via ``tox_append_version_info`` method in the plugin + module - by :user:`gaborbernat`. (:issue:`3234`) + +v4.13.0 (2024-02-16) +-------------------- + +Features - 4.13.0 +~~~~~~~~~~~~~~~~~ +- Extract virtual environment packaging code to its own base class not tied to ``virtualenv`` - by :user:`gaborbernat`. (:issue:`3221`) + +Improved Documentation - 4.13.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- Documented usage of ``pytest`` with ``tox run-parallel`` - by :user:`faph`. (:issue:`3187`) +- Configuration: state in config directive sections their ini file sections - by :user:`0cjs`. (:issue:`3194`) +- Development: summarize important points experienced developers need to know - by :user:`0cjs`. (:issue:`3197`) + +v4.12.1 (2024-01-16) +-------------------- + +Bugfixes - 4.12.1 +~~~~~~~~~~~~~~~~~ +- Fixed bug where running with --installpkg and multiple envs could not clean up between tests (:issue:`3165`) + +v4.12.0 (2024-01-11) +-------------------- + +Features - 4.12.0 +~~~~~~~~~~~~~~~~~ +- Always pass ``FORCE_COLOR`` and ``NO_COLOR`` to the environment (:issue:`3171`) + +Bugfixes - 4.12.0 +~~~~~~~~~~~~~~~~~ +- ``--parallel-no-spinner`` flag now implies ``--parallel`` (:issue:`3158`) + +Improved Documentation - 4.12.0 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- -Fix ``open an issue`` link in development.rst (:issue:`3179`) + ------------------------------------------------------------------- Tue Mar 5 13:39:30 UTC 2024 - Dominique Leuenberger diff --git a/python-tox.spec b/python-tox.spec index 3ebd33f..5723d89 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -23,30 +23,26 @@ %bcond_with devpi_process %endif Name: python-tox -Version: 4.11.4 +Version: 4.14.2 Release: 0 Summary: Virtualenv-based automation of test activities License: MIT URL: https://github.com/tox-dev/tox Source: https://files.pythonhosted.org/packages/source/t/tox/tox-%{version}.tar.gz -# PATCH-FIX-OPENSUSE optional_devpi_process.patch bsc#[0-9]+ mcepl@suse.com -# Make use devpi_process optional -Patch0: optional_devpi_process.patch -# PATCH-FEATURE-UPSTREAM mark-network-tests.patch bsc#[0-9]+ mcepl@suse.com -# to skip test which require network access -Patch1: mark-network-tests.patch +Patch0: 0001-Make-use-of-devpi_process-optional.patch +Patch1: 0002-skip-test-which-require-network-access.patch BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module build >= 0.10.0} -BuildRequires: %{python_module cachetools >= 5.3.1} +BuildRequires: %{python_module cachetools >= 5.3.2} BuildRequires: %{python_module chardet >= 5.2} BuildRequires: %{python_module colorama >= 0.4.6} -BuildRequires: %{python_module filelock >= 3.12.3} +BuildRequires: %{python_module filelock >= 3.13.1} BuildRequires: %{python_module hatch >= 0.3} -BuildRequires: %{python_module hatch_vcs >= 0.3} -BuildRequires: %{python_module hatchling >= 1.18} -BuildRequires: %{python_module packaging >= 23.1} +BuildRequires: %{python_module hatch_vcs >= 0.4} +BuildRequires: %{python_module hatchling >= 1.21} +BuildRequires: %{python_module packaging >= 23.2} BuildRequires: %{python_module pip} -BuildRequires: %{python_module platformdirs >= 3.10} +BuildRequires: %{python_module platformdirs >= 4.1} BuildRequires: %{python_module pluggy >= 1.3} BuildRequires: %{python_module poetry-core} BuildRequires: %{python_module pyproject-api >= 1.6.1} @@ -54,27 +50,27 @@ BuildRequires: %{python_module pytoml >= 0.1} BuildRequires: %{python_module re-assert} BuildRequires: %{python_module setuptools >= 41.0.1} BuildRequires: %{python_module setuptools_scm >= 2.0.0} -BuildRequires: %{python_module time-machine >= 2.12} +BuildRequires: %{python_module time-machine >= 2.13} BuildRequires: %{python_module tomli >= 2.0.1} BuildRequires: %{python_module virtualenv >= 20.24.3} -BuildRequires: %{python_module wheel >= 0.41.2} +BuildRequires: %{python_module wheel >= 0.42} %if %{with devpi_process} BuildRequires: %{python_module devpi-process > 1} %endif -BuildRequires: %{python_module importlib-metadata >= 6.8} +%dnl BuildRequires: %{python_module importlib-metadata >= 6.8} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip -Requires: python-cachetools >= 5.3.1 +Requires: python-cachetools >= 5.3.2 Requires: python-chardet >= 5.2 Requires: python-colorama >= 0.4.6 -Requires: python-filelock >= 3.12.3 -Requires: python-packaging >= 23.1 -Requires: python-platformdirs >= 3.10 +Requires: python-filelock >= 3.13.1 +Requires: python-packaging >= 23.2 +Requires: python-platformdirs >= 4.1 Requires: python-pluggy >= 1.3 Requires: python-pyproject-api >= 1.6.1 Requires: python-virtualenv >= 20.24.3 -Requires: (python-importlib-metadata >= 0.12 if python3-base < 3.8) +%dnl Requires: (python-importlib-metadata >= 0.12 if python3-base < 3.8) Requires: (python-tomli >= 2.0.1 if python3-base < 3.11) Requires(post): update-alternatives Requires(postun): update-alternatives @@ -88,10 +84,9 @@ BuildRequires: %{python_module flaky >= 3.7.0} BuildRequires: %{python_module freezegun >= 0.3.11} BuildRequires: %{python_module numpy >= 1.25} BuildRequires: %{python_module psutil >= 5.9.5} -BuildRequires: %{python_module pytest >= 7.4} +BuildRequires: %{python_module pytest >= 7.4.4} BuildRequires: %{python_module pytest-cov >= 4.1} -BuildRequires: %{python_module pytest-mock >= 3.11.1} -BuildRequires: %{python_module pytest-randomly >= 3.0.0} +BuildRequires: %{python_module pytest-mock >= 3.12} BuildRequires: %{python_module pytest-xdist >= 3.3.1} # /SECTION %if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3" diff --git a/tox-4.11.4.tar.gz b/tox-4.11.4.tar.gz deleted file mode 100644 index 98c89a9..0000000 --- a/tox-4.11.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:73a7240778fabf305aeb05ab8ea26e575e042ab5a18d71d0ed13e343a51d6ce1 -size 176168 diff --git a/tox-4.14.2.tar.gz b/tox-4.14.2.tar.gz new file mode 100644 index 0000000..0d6a6e5 --- /dev/null +++ b/tox-4.14.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0defb44f6dafd911b61788325741cc6b2e12ea71f987ac025ad4d649f1f1a104 +size 178515