Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use execnet main_thread_only execmodel #1

Draft
wants to merge 53 commits into
base: master
Choose a base branch
from

Conversation

zmedico
Copy link
Owner

@zmedico zmedico commented Feb 16, 2024

Submitted upstream as pytest-dev#1027.

@zmedico zmedico force-pushed the issue_620_execnet_main_thread_only branch from 640ee7a to c8c68ab Compare February 25, 2024 19:25
@zmedico zmedico marked this pull request as draft February 25, 2024 19:54
@zmedico zmedico force-pushed the issue_620_execnet_main_thread_only branch 5 times, most recently from bc0a846 to 61c0a8f Compare February 25, 2024 21:15
jeremy-hiatt and others added 20 commits February 28, 2024 15:17
The setuptools implementation of editable installs will insert a
placeholder entry into sys.path as part of its magic to register its
custom import mechanism.

These are not real filesystem paths and as such should not be
rewritten to absolute paths.
…h-hooks

Avoid modifying path placeholders created by editable installs
Bumps the github-actions group with 1 update: [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish).


Updates `pypa/gh-action-pypi-publish` from 1.8.11 to 1.8.12
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.8.11...v1.8.12)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the github-actions group with 2 updates: [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) and [softprops/action-gh-release](https://github.com/softprops/action-gh-release).


Updates `pypa/gh-action-pypi-publish` from 1.8.12 to 1.8.14
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](pypa/gh-action-pypi-publish@v1.8.12...v1.8.14)

Updates `softprops/action-gh-release` from 1 to 2
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@v1...v2)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
updates:
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](pre-commit/mirrors-mypy@v1.8.0...v1.9.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates:
- [github.com/PyCQA/autoflake: v2.3.0 → v2.3.1](PyCQA/autoflake@v2.3.0...v2.3.1)
- [github.com/psf/black: 24.2.0 → 24.3.0](psf/black@24.2.0...24.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
It's available since pytest 5.2, and pytest-xdist requires pytest>=6.2.
…compat

Remove pytest InvocationParams backward compat
Bumps the github-actions group with 1 update: [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package).


Updates `hynek/build-and-inspect-python-package` from 2.0 to 2.2
- [Release notes](https://github.com/hynek/build-and-inspect-python-package/releases)
- [Changelog](https://github.com/hynek/build-and-inspect-python-package/blob/main/CHANGELOG.md)
- [Commits](hynek/build-and-inspect-python-package@v2.0...v2.2)

---
updated-dependencies:
- dependency-name: hynek/build-and-inspect-python-package
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
…actions/github-actions-867643949f

Bump the github-actions group with 1 update
Using pytest's style.
Use ruff instead of black, flake8, autoflake, pyupgrade
The `testdir` fixture is soft-deprecated in favor of `pytester`.
The assert as written was always true, according to the name `failures`
it intended the first element of the tuple.
self.config can't be None.
This code is bogus copy/paste; presumably it's not executed in practice
so make it raise `NotImplementedError`.
`time()` is not monotonic and is not appropriate for measuring duration.
Since d153e0a the remote doesn't send
events for this hook at all (I think perhaps wrongly, but it's history
by now), so no point in handling it in the coordinator side.
These days dicts are guaranteed to be ordered, so no need to use
OrderedDict in two of the three cases (the remaining case needs
`popitem(last=False)`).
Enum has a unique type, unlike `object()`, enabling better typing.
Allows us to use more modern typing.
py is no longer used.
psutil is used optionally so add its typing.
Seems like it intends to check all schedulers.
@zmedico zmedico force-pushed the issue_620_execnet_main_thread_only branch from 0140f7f to e9bc11b Compare April 8, 2024 15:51
pre-commit-ci bot and others added 6 commits April 8, 2024 22:37
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)
…te-config

[pre-commit.ci] pre-commit autoupdate
- Clearly delineate the required interface of schedulers
- Useful for typing
@zmedico zmedico force-pushed the issue_620_execnet_main_thread_only branch 2 times, most recently from 4c24539 to 397e08f Compare April 17, 2024 04:47
pre-commit-ci bot and others added 4 commits April 17, 2024 15:09
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.3.7](astral-sh/ruff-pre-commit@v0.3.5...v0.3.7)
…te-config

[pre-commit.ci] pre-commit autoupdate
Use the execnet main_thread_only execmodel so that code which expects
to run in the main thread will just work.  This execmodel has been
merged to the execnet master branch via pytest-dev/execnet#243, so this
patch should not be merged until there is a released version of execnet
supporting the main_thread_only execmodel.

Closes: pytest-dev#620
@nicoddemus nicoddemus force-pushed the issue_620_execnet_main_thread_only branch from 397e08f to c82fee1 Compare April 19, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants