#130 [F38] Update to 4.11.0 (rhbz#2189321)
Merged 8 months ago by churchyard. Opened 9 months ago by churchyard.
rpms/ churchyard/python-tox 4.11.0  into  f38

file modified
+33 -40
@@ -1,57 +1,58 @@ 

- From eb6cd0a5fe1734c5eee78b9889ba7a07fdeb2111 Mon Sep 17 00:00:00 2001

+ From c23f636eef39220989fcfde7aed6a505aaca993c Mon Sep 17 00:00:00 2001

  From: Lumir Balhar <lbalhar@redhat.com>

  Date: Tue, 10 Jan 2023 08:34:25 +0100

  Subject: [PATCH] fix tests

  

  ---

-  pyproject.toml          |  4 ----

+  pyproject.toml          |  5 -----

   src/tox/pytest.py       | 16 +++-------------

-  tests/test_provision.py | 18 ++----------------

+  tests/test_provision.py | 17 ++---------------

   3 files changed, 5 insertions(+), 33 deletions(-)

  

  diff --git a/pyproject.toml b/pyproject.toml

- index 19ee5ec..b806958 100644

+ index 9bdfbca..51c6980 100644

  --- a/pyproject.toml

  +++ b/pyproject.toml

- @@ -73,8 +73,6 @@ optional-dependencies.docs = [

+ @@ -72,9 +72,6 @@ optional-dependencies.docs = [

   ]

   optional-dependencies.testing = [

     "build[virtualenv]>=0.10",

  -  "covdefaults>=2.3",

- -  "devpi-process>=0.3",

-    "diff-cover>=7.5",

-    "distlib>=0.3.6",

+ -  "detect-test-pollution>=1.1.1",

+ -  "devpi-process>=1",

+    "diff-cover>=7.7",

+    "distlib>=0.3.7",

     "flaky>=3.7",

- @@ -82,7 +80,6 @@ optional-dependencies.testing = [

-    "hatchling>=1.14",

-    "psutil>=5.9.4",

-    "pytest>=7.2.2",

- -  "pytest-cov>=4",

-    "pytest-mock>=3.10",

-    "pytest-xdist>=3.2.1",

+ @@ -82,7 +79,6 @@ optional-dependencies.testing = [

+    "hatchling>=1.18",

+    "psutil>=5.9.5",

+    "pytest>=7.4",

+ -  "pytest-cov>=4.1",

+    "pytest-mock>=3.11.1",

+    "pytest-xdist>=3.3.1",

     "re-assert>=1.1",

- @@ -120,7 +117,6 @@ paths.source = [

+ @@ -148,7 +144,6 @@ paths.source = [

   report.fail_under = 88

   report.omit = ["src/tox/config/cli/for_docs.py", "tests/execute/local_subprocess/bad_process.py", "tests/type_check/*"]

   run.parallel = true

  -run.plugins = ["covdefaults"]

   

-  [tool.isort]

-  known_first_party = ["tox", "tests"]

+  [tool.mypy]

+  python_version = "3.11"

  diff --git a/src/tox/pytest.py b/src/tox/pytest.py

- index 0bc9905..65701b5 100644

+ index d7243bd..0e14e5d 100644

  --- a/src/tox/pytest.py

  +++ b/src/tox/pytest.py

- @@ -26,7 +26,6 @@ from _pytest.logging import LogCaptureFixture

-  from _pytest.monkeypatch import MonkeyPatch

-  from _pytest.python import Function

-  from _pytest.tmpdir import TempPathFactory

+ @@ -16,7 +16,6 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c

+  

+  import pytest

+  from _pytest.fixtures import SubRequest

  -from devpi_process import IndexServer

-  from pytest_mock import MockerFixture

   from virtualenv.info import fs_supports_symlink

   

- @@ -286,9 +285,9 @@ class ToxProject:

-                  m.setattr(sys, "argv", [sys.executable, "-m", "tox"] + list(args))

+  import tox.run

+ @@ -276,9 +275,9 @@ class ToxProject:

+                  m.setattr(sys, "argv", [sys.executable, "-m", "tox", *list(args)])

                   m.setenv("VIRTUALENV_SYMLINK_APP_DATA", "1")

                   m.setenv("VIRTUALENV_SYMLINKS", "1")

  -                m.setenv("VIRTUALENV_PIP", "embed")
@@ -63,12 +64,12 @@ 

                   try:

                       tox_run(args)

                   except SystemExit as exception:

- @@ -472,15 +471,6 @@ def enable_pypi_server(monkeypatch: MonkeyPatch, url: str | None) -> None:

+ @@ -472,15 +471,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None

       monkeypatch.setenv("PIP_TIMEOUT", str(2))

   

   

  -@pytest.fixture(scope="session")

- -def pypi_server(tmp_path_factory: TempPathFactory) -> Iterator[IndexServer]:

+ -def pypi_server(tmp_path_factory: pytest.TempPathFactory) -> Iterator[IndexServer]:

  -    # takes around 2.5s

  -    path = tmp_path_factory.mktemp("pypi")

  -    with IndexServer(path) as server:
@@ -80,18 +81,10 @@ 

   def _invalid_index_fake_port() -> int:  # noqa: PT005

       with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler:

  diff --git a/tests/test_provision.py b/tests/test_provision.py

- index 290e48d..475d7f4 100644

+ index f9275fb..ddf8607 100644

  --- a/tests/test_provision.py

  +++ b/tests/test_provision.py

- @@ -12,7 +12,6 @@ from unittest import mock

-  from zipfile import ZipFile

-  

-  import pytest

- -from devpi_process import Index, IndexServer

-  from filelock import FileLock

-  from packaging.requirements import Requirement

-  

- @@ -93,21 +92,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path]

+ @@ -92,21 +92,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path]

           return result

   

   
@@ -115,7 +108,7 @@ 

   

   

   def test_provision_requires_nok(tox_project: ToxProjectCreator) -> None:

- @@ -156,7 +143,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) -

+ @@ -155,7 +143,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) -

   

   

   @pytest.mark.integration()
@@ -124,5 +117,5 @@ 

       ini = "[tox]\nrequires=demo-pkg-inline\n[testenv]\npackage=skip\n[testenv:.tox]\nplatform=wrong_platform"

       proj = tox_project({"tox.ini": ini})

  -- 

- 2.39.2

+ 2.40.1

  

file modified
+20 -3
@@ -19,7 +19,7 @@ 

  %undefine _py3_shebang_s

  

  Name:           python-tox

- Version:        4.4.12

+ Version:        4.11.0 

  Release:        1%{?dist}

  Summary:        Virtualenv-based automation of test activities

  
@@ -28,9 +28,10 @@ 

  Source0:        %{pypi_source tox}

  

  # Remove dependency on devpi-process.

+ # Remove dependency on detect-test-pollution.

  # Remove coverage-related dependencies.

  # Adjust virtualenv environment variables to make it work with our patched virtualenv.

- Patch:          fix-tests.patch

+ Patch1:         fix-tests.patch

  

  BuildArch:      noarch

  
@@ -46,6 +47,9 @@ 

  BuildRequires:  libffi-devel

  # xdist is not used upstream, but we use it to speed up the %%check

  BuildRequires:  python3-pytest-xdist

+ # for test_allowed_implicit_cli_envs[py310]

+ # TODO remove this once https://github.com/tox-dev/tox/pull/3108 is released

+ BuildRequires:  python3.10

  %if %{with ci_tests}

  # The CI tests only work if the tested tox is installed :(

  BuildRequires:  tox = %{version}-%{release}
@@ -102,7 +106,8 @@ 

  

  # Upstream updates dependencies too aggressively

  # see https://github.com/tox-dev/tox/pull/2843#discussion_r1065028356

- sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|diff-cover|pyproject-api|pytest-xdist|wheel)>=.*/"\1",/g' \

+ sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|diff-cover|pyproject-api|pytest|pytest-mock|pytest-xdist|wheel|pluggy|distlib|cachetools)>=.*/"\1",/g' \

+         -e "s/'(time-machine)>=[^;']+/'\1/" \

          -e 's/"(virtualenv)>=.*/"\1>=20",/g' \

          -e 's/"(hatchling)>=.*/"\1>=1.13",/g' \

      pyproject.toml
@@ -156,6 +161,18 @@ 

  

  

  %changelog

+ * Wed Aug 30 2023 Miro Hrončok <mhroncok@redhat.com> - 4.11.0-1

+ - Update to 4.11.0 (rhbz#2189321)

+ 

+ * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.12-4

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

+ 

+ * Thu Jun 29 2023 Python Maint <python-maint@redhat.com> - 4.4.12-3

+ - Rebuilt for Python 3.12

+ 

+ * Wed Jun 14 2023 Python Maint <python-maint@redhat.com> - 4.4.12-2

+ - Bootstrap for Python 3.12

+ 

  * Thu Apr 13 2023 Miro Hrončok <mhroncok@redhat.com> - 4.4.12-1

  - Update to 4.4.12 (rhbz#2186618)

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (tox-4.4.12.tar.gz) = 896ecef178b0625246ffe4ab3a9a0c03650eb78633fa92706e93475d6589ac29d65bbf91b9ecfacfa8154739eefd463aeb1252be68998cdffddc270a4f89edd0

+ SHA512 (tox-4.11.0.tar.gz) = 3e2e9f09874c39f6928d2502e5d01ca48721fc777d758f1d4b3df012261c3adc9e93a89ff6dcf7950fb4245df2624ff8c7cb84feb9424a8fcb6ab12117728692

@@ -50,14 +50,14 @@ 

  

  # Get all packages that supplement tox,

  # no repo explicitly specified means we use the enabled repos on the CI system which should be what we want

- repoquery_result = subprocess.check_output(['dnf', 'repoquery', '--whatsupplements', 'tox'], text=True)

+ repoquery_result = subprocess.check_output(['dnf-3', 'repoquery', '--whatsupplements', 'tox'], text=True)

  supplementing_pkgs = set(repoquery_result.splitlines())

  

  

  # It gets quite tricky, since packages like "pypy" can supplement tox, we get a set of provides for all of them

  supplementing_pkgs_provides = {}

  for nvra in supplementing_pkgs:

-     repoquery_result = subprocess.check_output(['dnf', '-q', 'repoquery', '--provides', nvra], text=True)

+     repoquery_result = subprocess.check_output(['dnf-3', '-q', 'repoquery', '--provides', nvra], text=True)

      provides = set(repoquery_result.splitlines())

      unversioned_provides = {provide.split(' ')[0] for provide in provides}

      supplementing_pkgs_provides[nvra.rsplit('-', 2)[0]] = unversioned_provides

file modified
+5 -1
@@ -66,6 +66,9 @@ 

      - smoke_pypy39:

          dir: python/smoke

          run: PYTHON=pypy3.9 VERSION=3.9 ./venv.sh

+     - smoke_pypy310:

+         dir: python/smoke

+         run: PYTHON=pypy3.10 VERSION=3.10 ./venv.sh

      - pyproject_pytest:

          dir: pyproject-rpm-macros/tests

          run: ./mocktest.sh python-pytest
@@ -88,8 +91,9 @@ 

      - python3.12-devel

      - python2-devel

      - pypy3.9-devel

+     - pypy3.10-devel

      - python3-tox

-     - dnf

+     - python3-dnf

      - mock

      - rpmdevtools

      - rpm-build

no initial comment

1 new commit added

  • CI: Add PyPy 3.10
9 months ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/9327303a2e8a4b929697e7d33a293a78

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/51761f487d8f4d94969179910cd16ee0

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/3f3e222e578844ef9c50a4d97998d876

The CI failed here because of https://pagure.io/fedora-ci/general/issue/434 but you can see it passed before the last commit (see the green Dist Git test badge in the commit list): https://artifacts.dev.testing-farm.io/e68584fd-f1d6-423d-b07c-478a66d25e93/

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/3fef32d48ef848d4abb7e1466492d6d0

8 new commits added

  • CI: Add PyPy 3.10
  • Update to 4.11.0 (rhbz#2189321)
  • Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
  • Use dnf-3 on the CI to workaround https://bugzilla.redhat.com/2223347
  • Enumerate patches to workaround CI's old RPM version
  • Update a test regex to work with Python 3.12+
  • Rebuilt for Python 3.12
  • Bootstrap for Python 3.12
9 months ago

Build succeeded.
https://fedora.softwarefactory-project.io/zuul/buildset/66b2310b62c64a0bafe41369907ddfa0

Pull-Request has been merged by churchyard

8 months ago