Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pytest-dev/pytest-xdist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.3.0
Choose a base ref
...
head repository: pytest-dev/pytest-xdist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.3.1
Choose a head ref
  • 7 commits
  • 5 files changed
  • 4 contributors

Commits on May 12, 2023

  1. Merge pull request #905 from pytest-dev/release-3.3.0

    Release 3.3.0
    nicoddemus authored May 12, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4d230b6 View commit details
  2. Fix tag creation in deploy workflow

    As commented in #905, an annotated tag needs a configured user.
    nicoddemus committed May 12, 2023
    Copy the full SHA
    d8fb60b View commit details
  3. Copy the full SHA
    6d39025 View commit details

Commits on May 15, 2023

  1. Merge pull request #906 from nicoddemus/ci-improvements

    CI improvements
    nicoddemus authored May 15, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9efc64e View commit details

Commits on May 16, 2023

  1. [pre-commit.ci] pre-commit autoupdate (#908)

    updates:
    - [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](pre-commit/mirrors-mypy@v1.2.0...v1.3.0)
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    pre-commit-ci[bot] authored May 16, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    52a6143 View commit details

Commits on May 19, 2023

  1. Avoid unnecessary rinfo calls after creating gateways (#909)

    Hopefully this fixes #907, as seems this is the only
    change in #901 which is somehow related.
    
    ---------
    
    Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
    nicoddemus and RonnyPfannschmidt authored May 19, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4e7bd02 View commit details
  2. Release 3.3.1

    nicoddemus committed May 19, 2023
    Copy the full SHA
    9791021 View commit details
Showing with 45 additions and 19 deletions.
  1. +2 −0 .github/workflows/deploy.yml
  2. +14 −2 .github/workflows/test.yml
  3. +1 −1 .pre-commit-config.yaml
  4. +13 −0 CHANGELOG.rst
  5. +15 −16 src/xdist/dsession.py
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -43,5 +43,7 @@ jobs:

- name: Push tag
run: |
git config user.name "pytest bot"
git config user.email "pytestbot@gmail.com"
git tag --annotate --message=v${{ github.event.inputs.version }} v${{ github.event.inputs.version }} ${{ github.sha }}
git push origin v${{ github.event.inputs.version }}
16 changes: 14 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ concurrency:

jobs:

check-package:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -26,6 +26,8 @@ jobs:

test:

needs: [package]

runs-on: ${{ matrix.os }}

strategy:
@@ -68,14 +70,24 @@ jobs:
with:
# Needed to fetch tags, which are required by setuptools-scm.
fetch-depth: 0

- name: Download Package
uses: actions/download-artifact@v3
with:
name: Packages
path: dist

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}

- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
shell: bash
run: |
tox -e ${{ matrix.tox_env }}
tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ repos:
language: python
additional_dependencies: [pygments, restructuredtext_lint]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0
rev: v1.3.0
hooks:
- id: mypy
files: ^(src/|testing/)
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
pytest-xdist 3.3.1 (2023-05-19)
===============================

Bug Fixes
---------

- `#907 <https://github.com/pytest-dev/pytest-xdist/issues/907>`_: Avoid remote calls during startup as ``execnet`` by default does not ensure remote affinity with the
main thread and might accidentally schedule the pytest worker into a non-main thread, which breaks numerous frameworks,
for example ``asyncio``, ``anyio``, ``PyQt/PySide``, etc.

A more safe correction will require thread affinity in ``execnet`` (`pytest-dev/execnet#96 <https://github.com/pytest-dev/execnet/issues/96>`__).


pytest-xdist 3.3.0 (2023-05-12)
===============================

31 changes: 15 additions & 16 deletions src/xdist/dsession.py
Original file line number Diff line number Diff line change
@@ -444,26 +444,25 @@ def pytest_xdist_setupnodes(self, specs) -> None:

@pytest.hookimpl
def pytest_xdist_newgateway(self, gateway) -> None:
rinfo = gateway._rinfo()
is_local = rinfo.executable == sys.executable
if self.config.option.verbose > 0 and not is_local:
version = "%s.%s.%s" % rinfo.version_info[:3]
self.rewrite(
"[%s] %s Python %s cwd: %s"
% (gateway.id, rinfo.platform, version, rinfo.cwd),
newline=True,
)
if self.config.option.verbose > 0:
rinfo = gateway._rinfo()
different_interpreter = rinfo.executable != sys.executable
if different_interpreter:
version = "%s.%s.%s" % rinfo.version_info[:3]
self.rewrite(
f"[{gateway.id}] {rinfo.platform} Python {version} cwd: {rinfo.cwd}",
newline=True,
)
self.setstatus(gateway.spec, WorkerStatus.Initialized, tests_collected=0)

@pytest.hookimpl
def pytest_testnodeready(self, node) -> None:
d = node.workerinfo
is_local = d.get("executable") == sys.executable
if self.config.option.verbose > 0 and not is_local:
infoline = "[{}] Python {}".format(
d["id"], d["version"].replace("\n", " -- ")
)
self.rewrite(infoline, newline=True)
if self.config.option.verbose > 0:
d = node.workerinfo
different_interpreter = d.get("executable") != sys.executable
if different_interpreter:
version = d["version"].replace("\n", " -- ")
self.rewrite(f"[{d['id']}] Python {version}", newline=True)
self.setstatus(
node.gateway.spec, WorkerStatus.ReadyForCollection, tests_collected=0
)