Commit Graph

16045 Commits

Author SHA1 Message Date
lovetheguitar 7c7c36d7e0 test(test_mark.py): add sad case that `-k` doesn't support keyword expressions 2024-06-21 20:51:01 +02:00
lovetheguitar 3921d94316 test: use new `MarkMatcher.from_markers` method & register test markers 2024-06-21 20:51:01 +02:00
lovetheguitar 6dd8ad60a4 refactor(MarkMatcher): replace `from_item` with `from_markers` method 2024-06-21 20:51:01 +02:00
lovetheguitar 1e7eb20347 perf(expression): improve string lexing & error messages 2024-06-21 20:51:01 +02:00
lovetheguitar f4897391ec refactor(mark): use existing `NOT_SET` sentinel 2024-06-21 20:51:01 +02:00
lovetheguitar 1cc35ecc3f test: add empty string keyword argument marker test cases 2024-06-21 20:51:01 +02:00
lovetheguitar 04f457c4f4 style: use `@overload` to get rid of mypy only assertions 2024-06-21 20:51:01 +02:00
lovetheguitar 15c33fbaa3 feat: support keyword arguments in marker expressions
Fixes #12281
2024-06-21 20:51:01 +02:00
Ronny Pfannschmidt e8fa8dd31c
Merge pull request #12509 from pytest-dev/update-plugin-list/patch-c8948fca6
[automated] Update plugin list
2024-06-21 20:34:00 +02:00
pytest bot 27b2550283 [automated] Update plugin list 2024-06-21 20:19:10 +02:00
Farbod Ahmadian 34e28295a7
refactor: simplify bound method representation (#12492)
Co-authored-by: Sviatoslav Sydorenko <webknjaz@redhat.com>
Co-authored-by: Farbod Ahmadian <farbod@datachef.com>
2024-06-21 18:20:44 +02:00
Sviatoslav Sydorenko (Святослав Сидоренко) 9947ec3ad1
🧪🚑 Pass a Codecov config to the action @ GHA (#12508)
The #11921 update broke uploading coverage of the `main` branch (or
any in-repo pushes for that matter) to Codecov 4 months ago.
Version 4 requires an upload token to be provided and since there was
no configuration for it, the upload was failing. But the step itself
was showing up as successful due to `fail_ci_if_error: true` being
set. The error is visible in the console output, though.

This patch flips the setting to `fail_ci_if_error: false` and sets the
Codecov upload token in the config in clear text. The non-secret part
allows the PRs uploads to be more stable.

Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
2024-06-21 17:47:23 +02:00
Ronny Pfannschmidt c8948fca65
Merge pull request #12502 from webknjaz/maintenance/ci-plugin-update-draft-ux
🧪 Make a draft based plugin bump PR CI trigger
2024-06-21 15:48:49 +02:00
Ronny Pfannschmidt dab29d39d7
Merge pull request #12507 from webknjaz/maintenance/hotfixes/note/sphinx-towncrier-draft
📝 Add a change note for PR #12493
2024-06-21 15:26:11 +02:00
Oliver Bestwalter b864e50138
Merge pull request #12498 from webknjaz/maintenance/tox-descriptions 2024-06-21 15:17:40 +02:00
Sviatoslav Sydorenko 5d95f09b2a
📝 Add a change note for PR #12493 2024-06-21 15:11:12 +02:00
Sviatoslav Sydorenko a67327ac8e
📝 Add a change note to PR #12498 2024-06-21 14:14:28 +02:00
Sviatoslav Sydorenko a69230ea5f
🎨 Add descriptions to all `tox` environments
Previously, a part of the environments weren't documented in the
config, making it difficult for the newbies to figure out what
their purposes are. This patch sets the descriptions for all the
envs listed with the `tox -av` command, leveraging the dynamic
factor-dependent explanation fragments.

```console
default environments:
linting                   -> run pre-commit-defined linters under `python3`
py38                      -> run the tests under `py38`
py39                      -> run the tests under `py39`
py310                     -> run the tests under `py310`
py311                     -> run the tests under `py311`
py312                     -> run the tests under `py312`
py313                     -> run the tests under `py313`
pypy3                     -> run the tests under `pypy3`
py38-pexpect              -> run the tests against `pexpect` under `py38`
py38-xdist                -> run the tests with pytest in parallel mode under `py38`
py38-unittestextras       -> run the tests against the unit test extras under `py38`
py38-numpy                -> run the tests against `numpy` under `py38`
py38-pluggymain           -> run the tests against the bleeding edge `pluggy` from Git under `py38`
py38-pylib                -> run the tests against `py` lib under `py38`
doctesting                -> run the tests under `~/.pyenv/versions/3.12.3/envs/pytest-pyenv-py3.12.3/bin/python` including doctests
doctesting-coverage       -> run the tests collecting coverage under `~/.pyenv/versions/3.12.3/envs/pytest-pyenv-py3.12.3/bin/python` including doctests
plugins                   -> run reverse dependency testing against pytest plugins under `~/.pyenv/versions/3.12.3/envs/pytest-pyenv-py3.12.3/bin/python`
py38-freeze               -> test pytest frozen with `pyinstaller` under `py38`
docs                      -> build the documentation site under `~/src/github/pytest-dev/pytest/doc/en/_build/html` with `python3`
docs-checklinks           -> check the links in the documentation with `python3`
py311-exceptiongroup      -> run the tests against `exceptiongroup` under `py311`

additional environments:
regen                     -> regenerate documentation examples under `python3`
release                   -> do a release, required posarg of the version number
prepare-release-pr        -> prepare a release PR from a manual trigger in GitHub actions
generate-gh-release-notes -> generate release notes that can be published as GitHub Release
nobyte                    -> run the tests in no-bytecode mode under `~/.pyenv/versions/3.12.3/envs/pytest-pyenv-py3.12.3/bin/python`
lsof                      -> run the tests with `--lsof` pytest CLI option under `~/.pyenv/versions/3.12.3/envs/pytest-pyenv-py3.12.3/bin/python`
```
2024-06-21 14:14:26 +02:00
Sviatoslav Sydorenko 072cb5250e
📝 Add a change note for PR #12502 2024-06-21 14:11:07 +02:00
Sviatoslav Sydorenko 323b0bd853
🧪 Make a draft based plugin bump PR CI trigger
Normally, PRs/commits published using the default GitHub Actions CI/CD
API token are not propagated to any integrations. This patch marks the
plugin update PR as a draft and leaves a comment asking the maintainers to
mark it as ready for review in order to actually trigger a CI run.

This idea is found in GitHub's own repos:
* https://github.com/github/codeql-action/pull/2263#issuecomment-2078311173
* https://github.com/github/codeql-action/blob/4ebadbc7/.github/workflows/update-dependencies.yml#L38-L41
* https://github.com/github/codeql-action/pull/1868
* https://github.com/github/codeql-action/pull/679
2024-06-21 14:11:06 +02:00
Ronny Pfannschmidt b08b6d122f
Merge pull request #12501 from webknjaz/maintenance/changelog-categories
📝💅 Split trivial change log category into 3
2024-06-21 13:50:07 +02:00
Sviatoslav Sydorenko e73db68642
📝 Add a change note for PR #12501 2024-06-21 13:35:47 +02:00
Sviatoslav Sydorenko 3ce1d658bd
🎨 Set up Git to only allow certain change notes 2024-06-21 13:35:47 +02:00
Sviatoslav Sydorenko 03be1ed8b1
📝💅 Split `trivial` change log category into 3
The new change note types are `packaging`, `contrib` and `misc`.
`packaging` is intended for the audience of downstream redistributors.
The `contrib` notes are meant to be documenting news affecting the
project contributors, their development, and processes.
Finally, `misc` is for things that don't fit anywhere but are still
desired to be documented for some reason.
2024-06-21 13:35:47 +02:00
Sviatoslav Sydorenko 45a89ec61f
📝 Extend change log title meanings
This patch makes them more verbose so that they are clearer to the
readers.
2024-06-21 13:34:38 +02:00
Sviatoslav Sydorenko 0cf92cfa4c
📝 Add comments to change note categories 2024-06-21 13:34:38 +02:00
Ronny Pfannschmidt bbe6b4a218
Merge pull request #12467 from RonnyPfannschmidt/ronny/new-annotations-try-2
from __future__ import annotations + migrate
2024-06-21 10:24:56 +02:00
Oliver Bestwalter 2f92da9190
Merge pull request #12503 from webknjaz/maintenance/hotfixes/sphinx-towncrier-draft 2024-06-21 10:08:50 +02:00
Ronny Pfannschmidt 6a8e9ed43a fixup: Config.cache cannot be None 2024-06-21 09:42:24 +02:00
Sviatoslav Sydorenko dc2568a683
🚑🧪📝 Stop capping Towncrier @ local docs builds
It is uncapped in RTD. Apparently, `tox -e docs` is not invoked in CI,
neither is it called in RTD, resulting in the regression having been
caught only in local development environments.

This is a follow-up for #12493.
2024-06-20 22:13:43 +02:00
Sviatoslav Sydorenko 43815b6fc2
🚑🧪📝 Allow invoking `git` in tox
It is called when building the docs. Apparently, `tox -e docs` is not
invoked in CI, neither is it called in RTD, resulting in the
regression having been caught only in local development environments.

This is a follow-up for #12493.
2024-06-20 22:13:43 +02:00
Ronny Pfannschmidt f426c0b35a
Merge pull request #12469 from webknjaz/maintenance/non-setuptools-entry-points
📝 Make "setuptools entrypoint" term generic
2024-06-20 11:31:13 +02:00
Ronny Pfannschmidt 85e451a2cc add changelog entry 2024-06-20 11:10:04 +02:00
Ronny Pfannschmidt 4e54f19be1 update tox:docs python to rtd python 2024-06-20 11:04:38 +02:00
Ronny Pfannschmidt 5e1649f59a resolve most sphinx lookup errors
add the extra sphinx annotations to refer to Path instances

add Path to nitpicky ignore
2024-06-20 11:04:33 +02:00
Ronny Pfannschmidt b7c0295e1a use runtime union for EXCEPTION_OR_MORE 2024-06-20 11:03:07 +02:00
Ronny Pfannschmidt 9295f9ffff RFC: from __future__ import annotations + migrate 2024-06-20 11:03:03 +02:00
Sviatoslav Sydorenko cb179472bb
📝 Add change notes for PR #12469 2024-06-20 11:01:10 +02:00
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