Commit Graph

1309 Commits

Author SHA1 Message Date
Zac Medico
12b3cce0ce Cache execnet gateway rinfo during WorkerController setup
Cache execnet gateway info during WorkerController setup for backward
compatibility, in order to avoid a later main_thread_only deadlock
error triggered when pytest-cov calls rinfo after the main thread is
already busy. See pytest-dev/execnet#274 for corresponding test case.

Fixes: 20e3ac774e ("Use execnet main_thread_only execmodel (#1027)")
2024-04-28 22:01:32 +03:00
dependabot[bot]
c93a106b3a build(deps): bump hynek/build-and-inspect-python-package (#1066)
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.2 to 2.4
- [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](https://github.com/hynek/build-and-inspect-python-package/compare/v2.2...v2.4)

---
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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-23 14:20:59 -03:00
pre-commit-ci[bot]
52e2022638 [pre-commit.ci] pre-commit autoupdate (#1073)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.7 → v0.4.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.7...v0.4.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-23 14:20:44 -03:00
Ran Benita
699f939b5c Merge pull request #1070 from pytest-dev/release-3.6.0
Release 3.6.0
2024-04-19 22:49:28 +03:00
Ran Benita
80bc0b8e5b Release 3.6.0 v3.6.0 2024-04-19 22:39:59 +03:00
Zac Medico
20e3ac774e Use execnet main_thread_only execmodel (#1027)
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 #620
2024-04-19 08:03:32 -03:00
Bruno Oliveira
0a4238f6da Merge pull request #1067 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-04-17 15:11:33 -03:00
pre-commit-ci[bot]
068627994f [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.3.5 → v0.3.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.5...v0.3.7)
2024-04-17 15:09:14 -03:00
Ran Benita
ecf7c1cd10 Merge pull request #1065 from bluetech/typing
Improve typing
2024-04-16 23:36:41 +03:00
Ran Benita
b78cf1c0ce Improve typing
Fix #1057
2024-04-15 23:30:17 +03:00
Ran Benita
5dfc590a8c Merge pull request #1061 from bluetech/scheduling-proto
Add a Scheduling Protocol
2024-04-15 18:20:29 +03:00
Ran Benita
bf2dcccfb0 Add a Scheduling Protocol
- Clearly delineate the required interface of schedulers
- Useful for typing
2024-04-15 18:05:46 +03:00
Bruno Oliveira
91812bf5f9 Merge pull request #1062 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-04-10 11:08:51 -03:00
pre-commit-ci[bot]
7c3f70f007 [pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0)
2024-04-08 22:37:10 +00:00
Ran Benita
47208081d6 Merge pull request #1060 from bluetech/pre-typing-fixes
Pre-typing fixes/improvements
2024-04-06 22:26:31 +03:00
Ran Benita
cdff86a131 pyproject: make plain mypy run work 2024-04-06 21:55:44 +03:00
Ran Benita
29aa05f9bf testing: add worksteal to TestLocking tests
Seems like it intends to check all schedulers.
2024-04-06 21:55:44 +03:00
Ran Benita
d6c81d5537 pre-commit: remove py from typing deps, add types-psutil
py is no longer used.
psutil is used optionally so add its typing.
2024-04-06 21:55:42 +03:00
Ran Benita
e7a971b167 Use from __future__ import annotations
Allows us to use more modern typing.
2024-04-06 21:55:21 +03:00
Ran Benita
059c1bcc8c remote,workermanage: use enums for markers
Enum has a unique type, unlike `object()`, enabling better typing.
2024-04-06 21:54:44 +03:00
Ran Benita
ee0b09c61f loadscope: use dict instead of OrderedDict
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)`).
2024-04-06 21:54:44 +03:00
Ran Benita
024c73f29e testing: fix a private pytest import to its current location 2024-04-06 21:54:44 +03:00
Ran Benita
5c676aa685 dsession,workermanage: drop handling of pytest_captured_warning
Since d153e0a4c4 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.
2024-04-06 21:54:44 +03:00
Ran Benita
a3b9a98126 looponfail: remove unneeded setup(out) parameter
It's not used.
2024-04-06 21:54:44 +03:00
Ran Benita
4057da1c1f remote: use perf_counter() to measure duration, not time()
`time()` is not monotonic and is not appropriate for measuring duration.
2024-04-06 21:54:44 +03:00
Ran Benita
ef5dcde977 each: remove incorrect mark_test_pending implementation
This code is bogus copy/paste; presumably it's not executed in practice
so make it raise `NotImplementedError`.
2024-04-06 21:54:44 +03:00
Ran Benita
503c5ee828 loadscope: remove redundant None check
self.config can't be None.
2024-04-06 21:54:44 +03:00
Ran Benita
8e77d14f8c testing: fix an assert
The assert as written was always true, according to the name `failures`
it intended the first element of the tuple.
2024-04-06 21:54:44 +03:00
Ran Benita
5dcc10c723 dsession: remove unnecessary getplugin("runner") 2024-04-06 21:54:44 +03:00
Ran Benita
3e9260462d Merge pull request #1059 from bluetech/execnet-min
Bump min execnet to 2.1.0
2024-04-06 21:51:30 +03:00
Ran Benita
e9084f2d73 Bump min execnet to 2.1.0
This version adds typing which we want to utilize.
2024-04-05 21:52:13 +03:00
Ran Benita
dd067e4f86 Merge pull request #1058 from bluetech/pytest-min-7
Bump min pytest to 7.0.0
2024-04-05 20:39:24 +03:00
Ran Benita
31de42ffa5 Bump min pytest to 7.0.0
Refs #1057
2024-04-05 11:50:11 +03:00
Ran Benita
99b767b6dd Merge pull request #1056 from bluetech/ci-pytestmin
ci: add a job for min supported pytest version
2024-04-05 10:58:02 +03:00
Ran Benita
fbf2eca13d ci: add a job for min supported pytest version
Make sure we don't break the promise.
2024-04-04 19:39:16 +03:00
Ran Benita
470bc83a25 Merge pull request #1052 from bluetech/pytester
testing: replace `testdir` -> `pytester`
2024-04-04 00:09:41 +03:00
Ronny Pfannschmidt
d96d87ef6f Merge pull request #1054 from bluetech/rm-py37
Drop support for Python 3.7
2024-04-03 21:56:21 +02:00
Ran Benita
a790dc5d72 Drop support for Python 3.7
Fix #1053
2024-04-03 18:07:38 +03:00
Ran Benita
d63400e8a6 testing: replace testdir -> pytester
The `testdir` fixture is soft-deprecated in favor of `pytester`.
2024-04-03 18:01:00 +03:00
Ran Benita
b6f5d2bd32 Merge pull request #1051 from bluetech/ruff
Use ruff instead of black, flake8, autoflake, pyupgrade
2024-04-03 09:42:26 +03:00
Ran Benita
816c9dcda1 Use ruff instead of black, flake8, autoflake, pyupgrade
Config adapted from pytest.
2024-04-03 00:19:32 +03:00
Ran Benita
c01de1c73e Make docstring style more consistent 2024-04-03 00:19:31 +03:00
Ran Benita
e3b69d4f29 Sort imports
Using pytest's style.
2024-04-03 00:19:31 +03:00
Bruno Oliveira
8f7bd68566 Merge pull request #1050 from pytest-dev/dependabot/github_actions/github-actions-867643949f
Bump the github-actions group with 1 update
2024-04-01 16:44:44 -03:00
dependabot[bot]
940c4fcf1d Bump the github-actions group with 1 update
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](https://github.com/hynek/build-and-inspect-python-package/compare/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>
2024-04-01 17:25:28 +00:00
Ben Brown
84df4451ed Terminate the test loop if shouldfail or shouldstop is set (#1026) 2024-04-01 18:00:50 +03:00
Bruno Oliveira
dde8a66da5 Merge pull request #1047 from bluetech/rm-invocationparams-compat
Remove pytest InvocationParams backward compat
2024-04-01 07:36:30 -03:00
pre-commit-ci[bot]
74f5752ed9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-03-23 18:42:36 +00:00
Ran Benita
00dc8eeaff Remove pytest InvocationParams backward compat
It's available since pytest 5.2, and pytest-xdist requires pytest>=6.2.
2024-03-23 20:40:54 +02:00
pre-commit-ci[bot]
74edbeb7c7 [pre-commit.ci] pre-commit autoupdate (#1044)
updates:
- [github.com/PyCQA/autoflake: v2.3.0 → v2.3.1](https://github.com/PyCQA/autoflake/compare/v2.3.0...v2.3.1)
- [github.com/psf/black: 24.2.0 → 24.3.0](https://github.com/psf/black/compare/24.2.0...24.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-03-19 12:27:16 -03:00