From 794f28bcf4a3711acd074e9637ce8674fb6215be Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 24 Oct 2022 13:15:08 -0300 Subject: [PATCH 1/7] Use modern syntax for towncrier --- pyproject.toml | 42 ++++++++++++++---------------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1a462cc..b3e6209 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,37 +17,23 @@ directory = "changelog/" title_format = "pytest-xdist {version} ({project_date})" template = "changelog/_template.rst" - [[tool.towncrier.type]] - directory = "removal" - name = "Removals" - showcontent = true +[tool.towncrier.fragment.removal] +name = "Removals" - [[tool.towncrier.type]] - directory = "deprecation" - name = "Deprecations" - showcontent = true +[tool.towncrier.fragment.deprecation] +name = "Deprecations" - [[tool.towncrier.type]] - directory = "feature" - name = "Features" - showcontent = true +[tool.towncrier.fragment.feature] +name = "Features" - [[tool.towncrier.type]] - directory = "bugfix" - name = "Bug Fixes" - showcontent = true +[tool.towncrier.fragment.bugfix] +name = "Bug Fixes" - [[tool.towncrier.type]] - directory = "vendor" - name = "Vendored Libraries" - showcontent = true +[tool.towncrier.fragment.vendor] +name = "Vendored Libraries" - [[tool.towncrier.type]] - directory = "doc" - name = "Improved Documentation" - showcontent = true +[tool.towncrier.fragment.doc] +name = "Improved Documentation" - [[tool.towncrier.type]] - directory = "trivial" - name = "Trivial Changes" - showcontent = true +[tool.towncrier.fragment.trivial] +name = "Trivial Changes" From bd23c2460f00129fa0ace7151c8ae18c0a70d5ad Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 24 Oct 2022 13:27:14 -0300 Subject: [PATCH 2/7] Fix changelog fragments --- changelog/825.deprecation.rst | 3 +++ changelog/826.deprecation.rst | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 changelog/825.deprecation.rst diff --git a/changelog/825.deprecation.rst b/changelog/825.deprecation.rst new file mode 100644 index 0000000..46ce0e7 --- /dev/null +++ b/changelog/825.deprecation.rst @@ -0,0 +1,3 @@ +The ``--rsyncdir`` command line argument and ``rsyncdirs`` config variable are deprecated. + +The rsync feature will be removed in pytest-xdist 4.0. diff --git a/changelog/826.deprecation.rst b/changelog/826.deprecation.rst index e69de29..8ca1a2f 100644 --- a/changelog/826.deprecation.rst +++ b/changelog/826.deprecation.rst @@ -0,0 +1,3 @@ +The ``--looponfail`` command line argument and ``looponfailroots`` config variable are deprecated. + +The loop-on-fail feature will be removed in pytest-xdist 4.0. From 0f58a14def50b9b9112ec25cef97b9593ce86b8a Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 24 Oct 2022 13:42:53 -0300 Subject: [PATCH 3/7] Fix towncrier command for latest version --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 0c1655b..20ffd99 100644 --- a/tox.ini +++ b/tox.ini @@ -47,7 +47,7 @@ passenv = * deps = towncrier commands = - towncrier --version {posargs} --yes + towncrier build --version {posargs} --yes [testenv:docs] basepython = python3 From 192193197bee27228e1e4b44855b3777397e31e5 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 24 Oct 2022 13:44:11 -0300 Subject: [PATCH 4/7] Update CHANGELOG for 3.0 --- CHANGELOG.rst | 78 +++++++++++++++++++++++++++++++++++ changelog/468.removal.rst | 1 - changelog/468.trivial.rst | 1 - changelog/791.doc | 1 - changelog/792.feature | 2 - changelog/796.doc.rst | 1 - changelog/812.feature | 22 ---------- changelog/813.bugfix | 1 - changelog/822.trivial.rst | 1 - changelog/823.trivial.rst | 1 - changelog/824.trivial.rst | 1 - changelog/825.deprecation.rst | 3 -- changelog/826.deprecation.rst | 3 -- changelog/829.doc | 1 - 14 files changed, 78 insertions(+), 39 deletions(-) delete mode 100644 changelog/468.removal.rst delete mode 100644 changelog/468.trivial.rst delete mode 100644 changelog/791.doc delete mode 100644 changelog/792.feature delete mode 100644 changelog/796.doc.rst delete mode 100644 changelog/812.feature delete mode 100644 changelog/813.bugfix delete mode 100644 changelog/822.trivial.rst delete mode 100644 changelog/823.trivial.rst delete mode 100644 changelog/824.trivial.rst delete mode 100644 changelog/825.deprecation.rst delete mode 100644 changelog/826.deprecation.rst delete mode 100644 changelog/829.doc diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c2d680a..7b2d4ac 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,81 @@ +pytest-xdist 3.0.0 (2022-10-24) +=============================== + +Bug Fixes +--------- + +- `#813 `_: Cancel shutdown when a crashed worker is restarted. + + +Deprecations +------------ + +- `#825 `_: The ``--rsyncdir`` command line argument and ``rsyncdirs`` config variable are deprecated. + + The rsync feature will be removed in pytest-xdist 4.0. + +- `#826 `_: The ``--looponfail`` command line argument and ``looponfailroots`` config variable are deprecated. + + The loop-on-fail feature will be removed in pytest-xdist 4.0. + + +Improved Documentation +---------------------- + +- `#791 `_: Document the ``pytest_xdist_auto_num_workers`` hook. + +- `#796 `_: Added known limitations section to documentation. + +- `#829 `_: Document the ``-n logical`` option. + + +Features +-------- + +- `#792 `_: The environment variable ``PYTEST_XDIST_AUTO_NUM_WORKERS`` can now be used to + specify the default for ``-n auto`` and ``-n logical``. + +- `#812 `_: Partially restore old initial batch distribution algorithm in ``LoadScheduling``. + + pytest orders tests for optimal sequential execution - i. e. avoiding + unnecessary setup and teardown of fixtures. So executing tests in consecutive + chunks is important for optimal performance. + + In v1.14, initial test distribution in ``LoadScheduling`` was changed to + round-robin, optimized for the corner case, when the number of tests is less + than ``2 * number of nodes``. At the same time, it became worse for all other + cases. + + For example: if some tests use some "heavy" fixture, and these tests fit into + the initial batch, with round-robin distribution the fixture will be created + ``min(n_tests, n_workers)`` times, no matter how many other tests there are. + + With the old algorithm (before v1.14), if there are enough tests not using + the fixture, the fixture was created only once. + + So restore the old behavior for typical cases where the number of tests is + much greater than the number of workers (or, strictly speaking, when there + are at least 2 tests for every node). + + +Removals +-------- + +- `#468 `_: The ``--boxed`` command-line option has been removed. If you still need this functionality, install `pytest-forked `__ separately. + + +Trivial Changes +--------------- + +- `#468 `_: The ``py`` dependency has been dropped. + +- `#822 `_: Replace internal usage of ``py.log`` with a custom solution (but with the same interface). + +- `#823 `_: Remove usage of ``py._pydir`` as an rsync candidate. + +- `#824 `_: Replace internal usages of ``py.path.local`` by ``pathlib.Path``. + + pytest-xdist 2.5.0 (2021-12-10) =============================== diff --git a/changelog/468.removal.rst b/changelog/468.removal.rst deleted file mode 100644 index c4bdfc2..0000000 --- a/changelog/468.removal.rst +++ /dev/null @@ -1 +0,0 @@ -The ``--boxed`` command-line option has been removed. If you still need this functionality, install `pytest-forked `__ separately. diff --git a/changelog/468.trivial.rst b/changelog/468.trivial.rst deleted file mode 100644 index 5104593..0000000 --- a/changelog/468.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -The ``py`` dependency has been dropped. diff --git a/changelog/791.doc b/changelog/791.doc deleted file mode 100644 index adc3e65..0000000 --- a/changelog/791.doc +++ /dev/null @@ -1 +0,0 @@ -Document the ``pytest_xdist_auto_num_workers`` hook. diff --git a/changelog/792.feature b/changelog/792.feature deleted file mode 100644 index a971233..0000000 --- a/changelog/792.feature +++ /dev/null @@ -1,2 +0,0 @@ -The environment variable ``PYTEST_XDIST_AUTO_NUM_WORKERS`` can now be used to -specify the default for ``-n auto`` and ``-n logical``. diff --git a/changelog/796.doc.rst b/changelog/796.doc.rst deleted file mode 100644 index 28a10bc..0000000 --- a/changelog/796.doc.rst +++ /dev/null @@ -1 +0,0 @@ -Added known limitations section to documentation. diff --git a/changelog/812.feature b/changelog/812.feature deleted file mode 100644 index 1d0eb0e..0000000 --- a/changelog/812.feature +++ /dev/null @@ -1,22 +0,0 @@ -Partially restore old initial batch distribution algorithm in ``LoadScheduling``. - -pytest orders tests for optimal sequential execution - i. e. avoiding -unnecessary setup and teardown of fixtures. So executing tests in consecutive -chunks is important for optimal performance. - -In v1.14, initial test distribution in ``LoadScheduling`` was changed to -round-robin, optimized for the corner case, when the number of tests is less -than ``2 * number of nodes``. At the same time, it became worse for all other -cases. - -For example: if some tests use some "heavy" fixture, and these tests fit into -the initial batch, with round-robin distribution the fixture will be created -``min(n_tests, n_workers)`` times, no matter how many other tests there are. - -With the old algorithm (before v1.14), if there are enough tests not using -the fixture, the fixture was created only once. - -So restore the old behavior for typical cases where the number of tests is -much greater than the number of workers (or, strictly speaking, when there -are at least 2 tests for every node). - diff --git a/changelog/813.bugfix b/changelog/813.bugfix deleted file mode 100644 index 251cf4b..0000000 --- a/changelog/813.bugfix +++ /dev/null @@ -1 +0,0 @@ -Cancel shutdown when a crashed worker is restarted. diff --git a/changelog/822.trivial.rst b/changelog/822.trivial.rst deleted file mode 100644 index 844453a..0000000 --- a/changelog/822.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Replace internal usage of ``py.log`` with a custom solution (but with the same interface). diff --git a/changelog/823.trivial.rst b/changelog/823.trivial.rst deleted file mode 100644 index f09b4b6..0000000 --- a/changelog/823.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Remove usage of ``py._pydir`` as an rsync candidate. diff --git a/changelog/824.trivial.rst b/changelog/824.trivial.rst deleted file mode 100644 index e6c6c85..0000000 --- a/changelog/824.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Replace internal usages of ``py.path.local`` by ``pathlib.Path``. diff --git a/changelog/825.deprecation.rst b/changelog/825.deprecation.rst deleted file mode 100644 index 46ce0e7..0000000 --- a/changelog/825.deprecation.rst +++ /dev/null @@ -1,3 +0,0 @@ -The ``--rsyncdir`` command line argument and ``rsyncdirs`` config variable are deprecated. - -The rsync feature will be removed in pytest-xdist 4.0. diff --git a/changelog/826.deprecation.rst b/changelog/826.deprecation.rst deleted file mode 100644 index 8ca1a2f..0000000 --- a/changelog/826.deprecation.rst +++ /dev/null @@ -1,3 +0,0 @@ -The ``--looponfail`` command line argument and ``looponfailroots`` config variable are deprecated. - -The loop-on-fail feature will be removed in pytest-xdist 4.0. diff --git a/changelog/829.doc b/changelog/829.doc deleted file mode 100644 index b779bf9..0000000 --- a/changelog/829.doc +++ /dev/null @@ -1 +0,0 @@ -Document the ``-n logical`` option. From f2633f1b372dbc58a221cd612c9cb4e79f59eea3 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 25 Oct 2022 08:58:30 -0300 Subject: [PATCH 5/7] Fetch all tags, as required by setuptools-scm --- .github/workflows/main.yml | 10 ++++++++-- changelog/830.trivial.rst | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 changelog/830.trivial.rst diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7359cfe..41e8200 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,10 @@ jobs: python: "3.8" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + # Needed to fetch tags, which are required by setuptools-scm. + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v2 with: @@ -62,7 +65,10 @@ jobs: needs: build steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + with: + # Needed to fetch tags, which are required by setuptools-scm. + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v2 with: diff --git a/changelog/830.trivial.rst b/changelog/830.trivial.rst new file mode 100644 index 0000000..146d8a5 --- /dev/null +++ b/changelog/830.trivial.rst @@ -0,0 +1 @@ +Fixed failed deploy of ``3.0.0`` release. From 38dcf52ae69188b0249eb6307fe6745e2e4174dc Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 25 Oct 2022 08:59:20 -0300 Subject: [PATCH 6/7] Release 3.0.1 --- CHANGELOG.rst | 9 +++++++++ changelog/830.trivial.rst | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) delete mode 100644 changelog/830.trivial.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7b2d4ac..66b1553 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,12 @@ +pytest-xdist 3.0.1 (2022-10-25) +=============================== + +Trivial Changes +--------------- + +- `#830 `_: Fixed failed deploy of ``3.0.0`` release. + + pytest-xdist 3.0.0 (2022-10-24) =============================== diff --git a/changelog/830.trivial.rst b/changelog/830.trivial.rst deleted file mode 100644 index 146d8a5..0000000 --- a/changelog/830.trivial.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed failed deploy of ``3.0.0`` release. From eed37d4771f7379156303f63e0d09131f1ac8dee Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 25 Oct 2022 12:36:11 -0300 Subject: [PATCH 7/7] Update CHANGELOG --- CHANGELOG.rst | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 66b1553..9357cce 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,13 +1,4 @@ -pytest-xdist 3.0.1 (2022-10-25) -=============================== - -Trivial Changes ---------------- - -- `#830 `_: Fixed failed deploy of ``3.0.0`` release. - - -pytest-xdist 3.0.0 (2022-10-24) +pytest-xdist 3.0.2 (2022-10-25) =============================== Bug Fixes