Commit Graph

16007 Commits

Author SHA1 Message Date
Sviatoslav Sydorenko 39b548e6ea
📝 Make "setuptools entrypoint" term generic
This feature grew out of `setuptools` but the modern interface for
extracting this information from the distribution package metadata
is `importlib.metadata`. So the patch attempts to reflect this in
the documentation messaging.

Refs:
* https://docs.python.org/3/library/importlib.metadata.html#entry-points
* https://packaging.python.org/en/latest/guides/creating-and-discovering-plugins/#using-package-metadata
* https://packaging.python.org/en/latest/specifications/entry-points/#entry-points
2024-06-20 11:01:10 +02:00
Ronny Pfannschmidt 20dd1d6738
Merge pull request #12493 from webknjaz/maintenance/sphinx-towncrier-draft
📝💅 Always render changelog draft @ Sphinx docs
2024-06-20 10:59:04 +02:00
Sviatoslav Sydorenko e702079fd5
📝💅 Always render changelog draft @ Sphinx docs
The earlier implementation was generating a temporary file, when
the docs site was being built with `tox`. However, this was not
enabled in RTD and is hackish.
This patch integrates the `sphinxcontrib-towncrier` extension to
make it work in any environment where Sphinx docs are being built.
2024-06-20 10:44:32 +02:00
Ronny Pfannschmidt 63dfa4bb84
Merge pull request #12494 from webknjaz/maintenance/rtd-conf-name
📝 Rename the RTD config to canonical filename
2024-06-20 10:39:34 +02:00
Sviatoslav Sydorenko 0470c387a9
📝 Rename the RTD config to canonical filename
Previously, it was possible to use several different config file name
variants. However, there is one canonical name now and the others are
being deprecated [[1]].

[1]: https://docs.rtfd.io/en/stable/config-file/index.html
2024-06-20 10:22:17 +02:00
Ronny Pfannschmidt 57bc6df510
Merge pull request #12488 from webknjaz/maintenance/gha-check-allowed-failures
🧪 Make required CI jobs match branch protection
2024-06-19 12:42:36 +02:00
Sviatoslav Sydorenko 6a95bcaa58
🧪 Make required CI jobs match branch protection 2024-06-19 12:10:20 +02:00
Ronny Pfannschmidt ff133f6baa
Merge pull request #12486 from webknjaz/maintenance/rm-legacy-backport-gha-workflow
🔥 Exterminate legacy backport GHA workflow
2024-06-19 11:59:28 +02:00
Sviatoslav Sydorenko bab3c2c291
📝 Add myself to the authors file 2024-06-19 11:31:55 +02:00
Ronny Pfannschmidt 08a39bf9b7
Merge pull request #11818 from RonnyPfannschmidt/ronny/issue-11797-approx-sequence-like
fix #11797: be more lenient on SequenceLike approx
2024-06-19 11:25:55 +02:00
Sviatoslav Sydorenko 19715bf313
🔥 Exterminate legacy `backport` GHA workflow
Previously, this workflow was being used to cherry-pick PRs made
against `main` into older stable branches. Now that #12475 integrated
the Patchback GitHub App, it's no longer needed as it's making
duplicate pull requests which don't even trigger CI runs automatically
due to #10354. So this patch removes said workflow to address the
problem.
2024-06-19 11:22:55 +02:00
Ronny Pfannschmidt c46a3a9920
Merge pull request #12477 from webknjaz/maintenance/chronographer-config
💅 Add a config for the Chronographer GitHub App
2024-06-19 09:49:11 +02:00
Sviatoslav Sydorenko (Святослав Сидоренко) d7b4010638
💅 Add a config for the Patchback GitHub App (#12475)
This patch prepares the project's backporting process to start being
handled by the Patchback GitHub App [[1]].

Ref #9384
Resolves #9385
Resolves #9553
Resolves #9554
Resolves #9555

[1]: https://github.com/apps/patchback
2024-06-19 00:41:33 +00:00
Sviatoslav Sydorenko f479afc5c0
💅 Add a config for the Chronographer GitHub App
This app allows requiring changelog fragments to be included with
each pull request.
2024-06-19 00:40:11 +02:00
Ronny Pfannschmidt ea87bd6302
Merge pull request #12476 from webknjaz/maintenance/rtd-latest-env
🧪 Bump RTD env to the latest LTS Ubuntu & Python
2024-06-19 00:18:12 +02:00
Sviatoslav Sydorenko 9e98b6db5b
🧪 Bump RTD env to the latest LTS Ubuntu & Python 2024-06-18 18:39:13 +02:00
Ronny Pfannschmidt 76f3f3da00 fix #11797: be more lenient on SequenceLike approx
this needs a validation as it allows partially implemented sequences
2024-06-18 17:01:24 +02:00
Ronny Pfannschmidt dc65bb6a66
Merge pull request #10315 from webknjaz/maintenance/gha-check
Introduce a gate/check GHA job
2024-06-18 16:30:54 +02:00
pre-commit-ci[bot] 807d16abfd
[pre-commit.ci] pre-commit autoupdate (#12470)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.8 → v0.4.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.8...v0.4.9)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-18 08:29:53 -03:00
Sviatoslav Sydorenko (Святослав Сидоренко) 49374ec7a0
🚑 Clarify patch condition for doctest finder hack (#12471)
There was a regression caused by #12431 that excluded the patch on
broken CPython patch version ranges 3.11.0–3.11.8 and 3.12.0–3.12.2.

This change fixes that by adjusting the patching conditional clause
to include said versions.

Closes #12430.

Co-authored-by: Florian Bruhin <me@the-compiler.org>
2024-06-18 09:21:25 +00:00
Sviatoslav Sydorenko (Святослав Сидоренко) fe4961afae
Modernize the skipped `test_issue_9765` regression test (#12468)
* 🚑 Explicitly set encoding @ `subprocess.run()`

This invocation is present in the `test_issue_9765` regression test
that is always skipped unconditionally, resulting in the
`EncodingWarning` never manifesting itself in CI or development
environments of the contributors.

* Change `setup.py` call w/ `pip install` @ tests

Using this CLI interface has been deprecated in `setuptools` [[1]].

[1]: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
2024-06-17 15:44:14 +00:00
dependabot[bot] 80b7657b2a
build(deps): Bump pypa/gh-action-pypi-publish from 1.8.14 to 1.9.0 (#12464)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.8.14 to 1.9.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.8.14...v1.9.0)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-17 09:58:23 +02:00
github-actions[bot] 5037f8d114
[automated] Update plugin list (#12462)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2024-06-16 05:24:06 +00:00
neutraljump 2effd8cb2c
Docs: clean up various documentation pages (#12451)
* Change Contribution doc title to match sidebar

* Rearrange sentence for clarity

* Update backwards-compatibility.rst

some minor grammar changes

* Update pythonpath.rst

fixed some gramatical errors

* Update AUTHORS

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update doc/en/explanation/pythonpath.rst

From a quick overview it looks like lowercase is more consistent, although some pages do use `pytest` in code blocks

Co-authored-by: Bruno Oliveira <bruno@soliv.dev>

---------

Co-authored-by: Mackerello <82668740+Mackerello@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bruno Oliveira <bruno@soliv.dev>
2024-06-13 09:09:02 -03:00
pre-commit-ci[bot] ff75980135
[pre-commit.ci] pre-commit autoupdate (#12447)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.7 → v0.4.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.7...v0.4.8)
- [github.com/asottile/pyupgrade: v3.15.2 → v3.16.0](https://github.com/asottile/pyupgrade/compare/v3.15.2...v3.16.0)

* Apply pyupgrade automatically

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2024-06-11 12:36:39 -03:00
Ran Benita 23ca9798f7
doc: fix broken code blocks (#12449)
Caused by 4588653b24.

The issue was fixed in https://github.com/astral-sh/ruff/issues/11577,
so won't trigger again.

Fix #12437.
2024-06-11 12:36:20 -03:00
Ran Benita f3946dce07
Merge pull request #12443 from bluetech/pygments-refactor
terminalwriter: small refactor of pygments code, improve usage errors
2024-06-10 14:13:46 +03:00
Ran Benita 7ef9da1f02 terminalwriter: improve `PYTEST_THEME`, `PYTEST_THEME_MODE` usage errors 2024-06-10 11:50:08 +03:00
Ran Benita 67a570aea9 terminalwriter: factor out pygments lexer & formatter selection to own functions
We intend to add some more logic here.
2024-06-10 11:48:19 +03:00
dependabot[bot] 3d91e42229
build(deps): Bump pytest-bdd in /testing/plugins_integration (#12442)
Bumps [pytest-bdd](https://github.com/pytest-dev/pytest-bdd) from 7.1.2 to 7.2.0.
- [Release notes](https://github.com/pytest-dev/pytest-bdd/releases)
- [Changelog](https://github.com/pytest-dev/pytest-bdd/blob/master/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-bdd/compare/7.1.2...7.2.0)

---
updated-dependencies:
- dependency-name: pytest-bdd
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 08:28:57 +02:00
github-actions[bot] 9bfcca6f48
[automated] Update plugin list (#12441)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2024-06-09 22:49:33 -03:00
Ran Benita f85289ba87
Merge pull request #12436 from bluetech/unittest-rerun-assertion
unittest: fix assertion errors on unittest reruns
2024-06-08 02:11:20 +03:00
Ran Benita 18f15a38fc
Merge pull request #12435 from bluetech/avoid-type-checking
Avoid some `TYPE_CHECKING`
2024-06-08 02:11:06 +03:00
Ran Benita db67107090
Merge pull request #12434 from bluetech/register-fixture-scope-none
fixtures: change `register_fixture` to not accept `scope=None`
2024-06-07 12:11:56 +03:00
Ran Benita de47b73520 unittest: fix assertion errors on unittest reruns
This fixes unittest test reruns when using plugins like
pytest-rerunfailures.

The `instance` property uses AttributeError to check if the instance
needs to be initialized, so `del` is the correct way to clear it, not
setting to `None`.

Regressed in 8.2.2.
2024-06-07 10:21:15 +03:00
Ran Benita 8585c58826
Merge pull request #10470 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-trio-0.8.0
build(deps): Bump pytest-trio from 0.7.0 to 0.8.0 in /testing/plugins_integration
2024-06-07 10:20:42 +03:00
dependabot[bot] 13f97632c6
build(deps): Bump pytest-trio in /testing/plugins_integration
Bumps [pytest-trio](https://github.com/python-trio/pytest-trio) from 0.7.0 to 0.8.0.
- [Release notes](https://github.com/python-trio/pytest-trio/releases)
- [Commits](https://github.com/python-trio/pytest-trio/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: pytest-trio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-07 07:03:09 +00:00
Ran Benita c07bbdfa5b Avoid some TYPE_CHECKING
It's better not to use it when possible.
2024-06-07 09:36:55 +03:00
Jason R. Coombs f941099371
Cleanup MockAwareDocTestFinder. (#12431)
* Only rely on _find_lineno on Python 3.10 and earlier.

* Update docstring to reflect current expectation.

* Only rely on _find on Python 3.9 and earlier.

* Mark line as uncovered.

* Remove empty else block (implicit is better than explicit).

Closes #12430
Closes #12432
2024-06-07 09:32:33 +03:00
Tomasz Kłoczko 6b2daaa2e9
[pre-commit] Add pyupgrade back as a manual stage (#12418)
Launchable with ``pre-commit run --hook-stage manual pyupgrade -a``

---------

Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
2024-06-06 23:52:29 +02:00
holger krekel 043ff9abc6
Remove hp42 contact details from the documentation (#12427) 2024-06-06 10:24:31 +00:00
Ran Benita c9d8765381 fixtures: change `register_fixture` to not accept `scope=None`
There is no reason to allow this.
2024-06-04 23:22:18 +03:00
Ran Benita 0070151c63
Merge pull request #12416 from bluetech/cherry-pick-release
Cherry-pick 8.2.2 release notes
2024-06-04 17:22:29 +03:00
Ran Benita 4cd80e19c5 Merge pull request #12415 from pytest-dev/release-8.2.2
Prepare release 8.2.2

(cherry picked from commit f3a494cca3)
2024-06-04 16:52:15 +03:00
Ran Benita d4dbe771f0
Merge pull request #12409 from bluetech/reorder-items-perf
fixtures: fix catastrophic performance problem in `reorder_items`
2024-06-04 10:16:19 +03:00
Ran Benita e89d23b247 fixtures: fix catastrophic performance problem in `reorder_items`
Fix #12355.

In the issue, it was reported that the `reorder_items` has quadratic (or
worse...) behavior with certain simple parametrizations. After some
debugging I found that the problem happens because the "Fix
items_by_argkey order" loop keeps adding the same item to the deque,
and it reaches epic sizes which causes the slowdown.

I don't claim to understand how the `reorder_items` algorithm works, but
if as far as I understand, if an item already exists in the deque, the
correct thing to do is to move it to the front. Since a deque doesn't
have such an (efficient) operation, this switches to `OrderedDict` which
can efficiently append from both sides, deduplicate and move to front.
2024-06-04 10:15:50 +03:00
pre-commit-ci[bot] 3433c7adf5
[pre-commit.ci] pre-commit autoupdate (#12413)
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.5 → v0.4.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.5...v0.4.7)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-04 09:06:33 +02:00
Michael Vogt 7be95f9b30
code: do not truncate args when running with -vvv (#12241)
Related to #2871.
2024-06-03 12:11:41 +00:00
Ran Benita 177f2ae6c4
Merge pull request #12408 from bluetech/cache-race
cacheprovider: fix "Directory not empty" crash from cache directory creation
2024-06-03 12:43:59 +03:00
Ran Benita 1eee63a891 fixtures: minor cleanups to reorder_items
This makes some minor clarity and performance improvements to the code.
2024-06-02 18:31:54 +03:00