Compare commits

..

7 Commits

Author SHA1 Message Date
Bruno Oliveira
9791021f02 Release 3.3.1 2023-05-19 07:44:21 -03:00
Bruno Oliveira
4e7bd0239e 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>
2023-05-19 07:43:18 -03:00
pre-commit-ci[bot]
52a61434fb [pre-commit.ci] pre-commit autoupdate (#908)
updates:
- [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.2.0...v1.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-16 06:20:14 -03:00
Bruno Oliveira
9efc64eef9 Merge pull request #906 from nicoddemus/ci-improvements
CI improvements
2023-05-15 08:21:30 -03:00
Bruno Oliveira
6d39025be3 Use same package in all test runs 2023-05-12 17:59:46 -03:00
Bruno Oliveira
d8fb60ba7f Fix tag creation in deploy workflow
As commented in #905, an annotated tag needs a configured user.
2023-05-12 17:52:21 -03:00
Bruno Oliveira
4d230b6de7 Merge pull request #905 from pytest-dev/release-3.3.0
Release 3.3.0
2023-05-12 17:48:57 -03:00
5 changed files with 45 additions and 19 deletions

View File

@@ -43,5 +43,7 @@ jobs:
- name: Push tag - name: Push tag
run: | 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 tag --annotate --message=v${{ github.event.inputs.version }} v${{ github.event.inputs.version }} ${{ github.sha }}
git push origin v${{ github.event.inputs.version }} git push origin v${{ github.event.inputs.version }}

View File

@@ -17,7 +17,7 @@ concurrency:
jobs: jobs:
check-package: package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -26,6 +26,8 @@ jobs:
test: test:
needs: [package]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
@@ -68,14 +70,24 @@ jobs:
with: with:
# Needed to fetch tags, which are required by setuptools-scm. # Needed to fetch tags, which are required by setuptools-scm.
fetch-depth: 0 fetch-depth: 0
- name: Download Package
uses: actions/download-artifact@v3
with:
name: Packages
path: dist
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python }} python-version: ${{ matrix.python }}
- name: Install tox - name: Install tox
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install tox pip install tox
- name: Test - name: Test
shell: bash
run: | run: |
tox -e ${{ matrix.tox_env }} tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`

View File

@@ -39,7 +39,7 @@ repos:
language: python language: python
additional_dependencies: [pygments, restructuredtext_lint] additional_dependencies: [pygments, restructuredtext_lint]
- repo: https://github.com/pre-commit/mirrors-mypy - repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.2.0 rev: v1.3.0
hooks: hooks:
- id: mypy - id: mypy
files: ^(src/|testing/) files: ^(src/|testing/)

View File

@@ -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) pytest-xdist 3.3.0 (2023-05-12)
=============================== ===============================

View File

@@ -444,26 +444,25 @@ class TerminalDistReporter:
@pytest.hookimpl @pytest.hookimpl
def pytest_xdist_newgateway(self, gateway) -> None: def pytest_xdist_newgateway(self, gateway) -> None:
rinfo = gateway._rinfo() if self.config.option.verbose > 0:
is_local = rinfo.executable == sys.executable rinfo = gateway._rinfo()
if self.config.option.verbose > 0 and not is_local: different_interpreter = rinfo.executable != sys.executable
version = "%s.%s.%s" % rinfo.version_info[:3] if different_interpreter:
self.rewrite( version = "%s.%s.%s" % rinfo.version_info[:3]
"[%s] %s Python %s cwd: %s" self.rewrite(
% (gateway.id, rinfo.platform, version, rinfo.cwd), f"[{gateway.id}] {rinfo.platform} Python {version} cwd: {rinfo.cwd}",
newline=True, newline=True,
) )
self.setstatus(gateway.spec, WorkerStatus.Initialized, tests_collected=0) self.setstatus(gateway.spec, WorkerStatus.Initialized, tests_collected=0)
@pytest.hookimpl @pytest.hookimpl
def pytest_testnodeready(self, node) -> None: def pytest_testnodeready(self, node) -> None:
d = node.workerinfo if self.config.option.verbose > 0:
is_local = d.get("executable") == sys.executable d = node.workerinfo
if self.config.option.verbose > 0 and not is_local: different_interpreter = d.get("executable") != sys.executable
infoline = "[{}] Python {}".format( if different_interpreter:
d["id"], d["version"].replace("\n", " -- ") version = d["version"].replace("\n", " -- ")
) self.rewrite(f"[{d['id']}] Python {version}", newline=True)
self.rewrite(infoline, newline=True)
self.setstatus( self.setstatus(
node.gateway.spec, WorkerStatus.ReadyForCollection, tests_collected=0 node.gateway.spec, WorkerStatus.ReadyForCollection, tests_collected=0
) )