Commit Graph

14714 Commits

Author SHA1 Message Date
Thomas Grainger 2fd160110c
Merge branch 'main' into warn-when-a-mark-is-applied-to-a-fixture 2022-10-10 13:55:24 +01:00
Thomas Grainger 2998b596b4
Merge remote-tracking branch 'graingert/warn-when-a-mark-is-applied-to-a-fixture' into warn-when-a-mark-is-applied-to-a-fixture 2022-10-10 13:53:51 +01:00
Thomas Grainger 7f73722c4a
add a test for fixture between mark decorators 2022-10-10 13:52:26 +01:00
Thomas Grainger f7542f6292
move tests into deprecated_test, and test for number of warnings issued 2022-10-10 13:48:26 +01:00
pre-commit-ci[bot] 0de2aa93f0 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-10 11:30:13 +00:00
Thomas Grainger 7759a9d3c2
Update src/_pytest/deprecated.py
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2022-10-10 12:28:30 +01:00
Thomas Grainger d86df89a92
Update doc/en/deprecations.rst
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2022-10-10 12:28:22 +01:00
Thomas Grainger 24fd292878
Update changelog/3664.deprecation.rst
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2022-10-10 12:28:14 +01:00
Bruno Oliveira f5797abb62
Merge pull request #10361 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.10.0
build(deps): Bump pytest-mock from 3.9.0 to 3.10.0 in /testing/plugins_integration
2022-10-10 08:03:35 -03:00
Bruno Oliveira b735f9377a
Merge pull request #10360 from pytest-dev/dependabot/pip/testing/plugins_integration/django-4.1.2
build(deps): Bump django from 4.1.1 to 4.1.2 in /testing/plugins_integration
2022-10-10 08:03:24 -03:00
dependabot[bot] d8c5e8805f
build(deps): Bump pytest-mock in /testing/plugins_integration
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.9.0...v3.10.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 03:03:48 +00:00
dependabot[bot] 07b380bb3a
build(deps): Bump django in /testing/plugins_integration
Bumps [django](https://github.com/django/django) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/4.1.1...4.1.2)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-10 03:03:45 +00:00
itxasos23 78c2c48c67
Handle NFC/NFD strings that normalize to the same string. (#10355)
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2022-10-09 17:09:33 -07:00
Thomas Grainger 8a40fc5315
PytestReturnNotNoneWarning now subclasses PytestRemovedIn8Warning (#10196)
As discussed in https://github.com/pytest-dev/pytest/pull/9956#issuecomment-1132710934.

Also added PytestRemovedIn8Warning to the reference docs.
2022-10-09 20:10:45 -03:00
Vivaan Verma 196f01965e
Replace entrypoint example with `pyproject.toml` in docs (#10359)
Fixes #10344
2022-10-09 17:42:42 -03:00
Simon K 3bf2bc55b1
Add deprecations for tests written for `nose` (#9907)
Fixes #9886
2022-10-09 17:16:33 -03:00
Thomas Grainger a1b10b552a
use getfixturemarker 2022-10-09 20:25:48 +01:00
pre-commit-ci[bot] aa9cc7e8b4 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-10-09 19:11:57 +00:00
Thomas Grainger 5c286d19d8
Update doc/en/deprecations.rst 2022-10-09 20:11:51 +01:00
Thomas Grainger faac197fcf
Merge branch 'main' into warn-when-a-mark-is-applied-to-a-fixture 2022-10-09 20:10:53 +01:00
Bruno Oliveira 571dc6b220
Merge pull request #10358 from drakulavich/patch-1 2022-10-09 10:07:17 -03:00
Anton Yakutovich d0abfb1c2a
Bump actions in test.yml 2022-10-09 16:27:35 +04:00
Ran Benita 81113c1a90
Merge pull request #10354 from pytest-dev/revert-10346-ci-pat
Revert "ci: fix PR not triggering workflows by switching back to pytestbot access token"
2022-10-08 16:31:26 +03:00
Bruno Oliveira 784ba85b17
Merge pull request #10331 from sgaist/add_modernization_tip_for_tmpdir_and_tmpdir_factory 2022-10-08 09:54:21 -03:00
Samuel Gaist a28d595b46
doc: add note to help modernize code bases to use pathlib
Fixes #10199
2022-10-08 10:18:08 +02:00
Bruno Oliveira 3c1534944c
Merge pull request #10318 from pytest-dev/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-10-07 20:04:48 -03:00
Ran Benita a501518a26
Revert "ci: fix PR not triggering workflows by switching back to pytestbot access token" 2022-10-08 00:58:51 +03:00
Ran Benita 680f3e2097
Merge pull request #10327 from AA-Turner/devnul
Use an explicit encoding when opening `os.devnul`
2022-10-08 00:52:11 +03:00
Ran Benita ed5d4e1269
Merge pull request #10346 from bluetech/ci-pat
ci: fix PR not triggering workflows by switching back to pytestbot access token
2022-10-08 00:30:34 +03:00
Tony Narlock 8e7ce60c7d
Export `pytest.DoctestItem` for typing / runtime purposes (#10313)
Fixes #10312
2022-10-07 13:03:42 -03:00
wodny 2bc036e50a
Mention pythonpath confval in Good Integration Practices (#10314)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-07 13:03:13 -03:00
Bruno Oliveira 79c2e92bb8
Merge pull request #10349 from nicoddemus/doc-setup-teardown-nose 2022-10-07 11:48:09 -03:00
Bruno Oliveira 4da0689653 Ignore mypy error about missing generic arg for catch_warnings
mypy stubs recently changed warnings.catch_warnings to a Generic, in
order to have proper overloads depending on the parameters passed to it, whihc
triggers this mypy error now when we subclass it:

    src/_pytest/recwarn.py:170: error: Missing type parameters for generic type "catch_warnings"  [type-arg]

For our porpuses the parameter is not relevant (we always use record=True), so
decided to just ignore the type error.
2022-10-07 11:30:24 -03:00
Florian Bruhin 9be1e3fac8
doc: Add second day for enterPy training (#10348) 2022-10-07 16:13:05 +02:00
Bruno Oliveira 0c21d60349 Improve documentation for setup() and teardown() nose support
Fix #9549
2022-10-07 11:10:28 -03:00
Bruno Oliveira 4545fcff05
Merge pull request #10335 from pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.9.0 2022-10-07 11:00:10 -03:00
Ronny Pfannschmidt 24ef7c98e8
Merge pull request #10343 from RonnyPfannschmidt/fix-10342-warn-explicit-add-location
fix #10342: put location into warning exceptions
2022-10-07 13:04:32 +02:00
Bruno Oliveira c4981f5a1b
Merge pull request #10347 from The-Compiler/hookimpl-marker-docs 2022-10-07 07:51:16 -03:00
Ronny Pfannschmidt 7a15bad89b
Update src/_pytest/warning_types.py
Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-10-07 12:46:40 +02:00
Florian Bruhin 72cac9b1af Mark tryfirst/trylast as deprecated in their docs.
Follow-up to #9118
2022-10-07 12:16:53 +02:00
Ran Benita 2df0d9656c ci: fix PR not triggering workflows by switching back to pytestbot access token
The builtin actions token is not allowed to trigger further workflows.
So when we create a PR using that token, the PR checks don't run, and a
maintainer must close & open the PR to make them run. This is quite
annoying, so switch back to the "machine user" approach.

Fixes #9554.
2022-10-06 21:14:24 +03:00
Bruno Oliveira 4677580cae
Merge pull request #10339 from Moisan/doc_broken_links 2022-10-06 13:05:11 -03:00
Ronny Pfannschmidt 14919c4bbb fix #10342: put location into warning exceptions
as the warning systems own warn_explicit looses the information
we add them explicitly to the warning exceptions
2022-10-06 11:44:05 +02:00
Thierry Moisan 06007de7ba
Fix a few broken links in the documentation 2022-10-05 10:24:55 -04:00
pre-commit-ci[bot] 4ee6e900a0
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/PyCQA/autoflake: v1.6.0 → v1.6.1](https://github.com/PyCQA/autoflake/compare/v1.6.0...v1.6.1)
- [github.com/asottile/reorder_python_imports: v3.8.2 → v3.8.3](https://github.com/asottile/reorder_python_imports/compare/v3.8.2...v3.8.3)
- [github.com/asottile/pyupgrade: v2.38.0 → v2.38.2](https://github.com/asottile/pyupgrade/compare/v2.38.0...v2.38.2)
- [github.com/pre-commit/mirrors-mypy: v0.971 → v0.981](https://github.com/pre-commit/mirrors-mypy/compare/v0.971...v0.981)
2022-10-03 23:32:26 +00:00
dependabot[bot] eab875509d
build(deps): Bump pytest-mock in /testing/plugins_integration
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.8.2 to 3.9.0.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.8.2...v3.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-03 03:01:46 +00:00
Ronny Pfannschmidt 2be1b8f355
Merge pull request #9118 from RonnyPfannschmidt/fix-4562-deprecate-hookmarkers
deprecate hook configuration via marks/attributes
2022-10-02 12:59:16 +02:00
Adam Turner 594413e8f0
Use an explicit encoding when opening `os.devnul`
Although slightly pointless, this avoids an `EncodingWarning` in Python 3.10
or greater when running under the `-X warn_default_encoding` flag.
2022-09-30 23:43:27 +01:00
Ronny Pfannschmidt ce3e2e922b bump plugin test pytest cov pin 2022-09-28 22:28:03 +02:00
Bruno Oliveira 59b8ec3ce1
Merge pull request #10308 from pytest-dev/pre-commit-ci-update-config 2022-09-21 16:03:59 -03:00