Commit Graph

15293 Commits

Author SHA1 Message Date
Lesnek 7b7bd304aa fix(warnings-recorder): Add handling of rest 2023-07-04 10:30:19 +02:00
Lesnek 2706271f66 test(warnings-recorder): Add another warning 2023-07-04 10:30:19 +02:00
Lesnek 8ac3c645fa fix(warnings-recorder): Match also subclass of warning in pop 2023-07-04 10:30:19 +02:00
Lesnek 18e87c9831 test(warnings-recorder): Add non working subclass behaviour of pop 2023-07-04 10:30:19 +02:00
pre-commit-ci[bot] 6995257cf4
[pre-commit.ci] pre-commit autoupdate (#11165)
updates:
- [github.com/asottile/pyupgrade: v3.7.0 → v3.8.0](https://github.com/asottile/pyupgrade/compare/v3.7.0...v3.8.0)
- [github.com/asottile/setup-cfg-fmt: v2.3.0 → v2.4.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.3.0...v2.4.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-07-04 07:00:14 +00:00
Ronny Pfannschmidt bea56b30af
Switch to deploy environment and configure for pypi oidc (#10925)
Closes #10871
Closes #10870
2023-07-03 12:52:58 -03:00
github-actions[bot] b847084224
[automated] Update plugin list (#11159)
Co-authored-by: pytest bot <pytestbot@users.noreply.github.com>
2023-07-03 11:45:17 -03:00
Akhilesh Ramakrishnan 024e62e6d2
Added Akhilesh Ramakrishnan to AUTHORS (#11153)
* Added Akhilesh Ramakrishnan to AUTHORS

PR#10338

* Fix typo in changelog
2023-07-03 13:49:50 +02:00
Ronny Pfannschmidt f9410fddcd
Merge pull request #11155 from RonnyPfannschmidt/fix-10447-maker-mro-order-needs-reverse
fix #10447 - consider marks in reverse mro order to give base classes priority
2023-07-02 22:23:00 +02:00
Ronny Pfannschmidt 561f1a993b fix #10447 - consider marks in reverse mro order to give base classes priority 2023-07-01 22:27:18 +02:00
Bruno Oliveira b77d0deaf5
Fix duplicated imports with importlib mode and doctest-modules (#11148)
The initial implementation (in #7246) introduced the `importlib` mode, which
never added the imported module to `sys.modules`, so it included a test
to ensure calling `import_path` twice would yield different modules.

Not adding modules to `sys.modules` proved problematic, so we began to add the imported module to `sys.modules`
in #7870, but failed to realize that given we are now changing `sys.modules`, we might
as well avoid importing it more than once.

Then #10088 came along, passing `importlib` also when importing application modules
(as opposed to only test modules before), which caused problems due to imports
having side-effects and the expectation being that they are imported only once.

With this PR, `import_path` returns the module immediately if already in
`sys.modules`.

Fix #10811
Fix #10341
2023-07-01 15:37:46 +00:00
akhilramkee 2f7415cfbc
Add child modules as attributes of parent modules. (#10338)
Failing to add child modules as attributes of parent module will prevent them from being accessible through parent module.

Fix #10337
2023-07-01 15:12:41 +00:00
Zac Hatfield-Dodds ba60649680
Merge pull request #11129 from Cheukting/warn_in_expt 2023-06-30 21:58:42 -07:00
Zac Hatfield-Dodds 679bd6f2ed
Merge pull request #10937 from reaganjlee/re-emit 2023-06-30 21:21:37 -07:00
Zac Hatfield-Dodds a50ea1b8e7
Merge pull request #11152 from Zac-HD/drop-py37 2023-06-30 20:56:47 -07:00
Zac Hatfield-Dodds 0353a94cd1 Explicit GC for PyPy, take 2 2023-06-30 20:33:12 -07:00
Zac Hatfield-Dodds 0311fc3384
Apply suggestions from code review
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
2023-06-30 20:18:25 -07:00
Zac Hatfield-Dodds 7fdc8391e2 Explicit GC for PyPy 2023-06-30 16:23:18 -07:00
Cheukting 15524f34d2 capture warning when exception is raised (fix #9036) 2023-06-30 16:04:37 -07:00
Zac Hatfield-Dodds 2d48171e88 Tweak docs on review 2023-06-30 15:29:03 -07:00
Zac Hatfield-Dodds 7022fb455d Update tests for re-emitted warnings 2023-06-30 15:29:03 -07:00
Zac Hatfield-Dodds a1b37022af Refactor warns() exit logic 2023-06-30 15:29:02 -07:00
Reagan Lee 9279ea2882 Emit unmatched warnings from pytest.warns() 2023-06-30 15:29:02 -07:00
Zac Hatfield-Dodds 165fbbd12a Drop py37 from CI 2023-06-30 15:19:19 -07:00
Zac Hatfield-Dodds f617bab0a2 Update pre-commit config 2023-06-30 15:07:07 -07:00
Zac Hatfield-Dodds f4e3b4ad98 Drop Python 3.7 2023-06-30 14:55:42 -07:00
Ran Benita 81cfb3fc87
Merge pull request #11017 from erik-hasse/caplog-root-logger-docs
add a warning about modifying the root logger during tests
2023-06-28 09:28:46 +03:00
pre-commit-ci[bot] dd5f3773d9
[pre-commit.ci] pre-commit autoupdate (#11145)
updates:
- [github.com/PyCQA/autoflake: v2.1.1 → v2.2.0](https://github.com/PyCQA/autoflake/compare/v2.1.1...v2.2.0)
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.4.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.3.0...v1.4.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-27 05:28:11 +00:00
Ran Benita e132d6488f
Merge pull request #11139 from pytest-dev/update-plugin-list/patch-fe51121f3
[automated] Update plugin list
2023-06-26 15:33:14 +03:00
pre-commit-ci[bot] 4719d998d8 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-06-26 11:34:03 +00:00
Tushar Sadhwani 5332656906
Add changelog and author 2023-06-26 17:02:33 +05:30
Tushar Sadhwani a14fc10cac
add a test function to the test 2023-06-26 13:06:11 +05:30
Tushar Sadhwani 05d7e60904
Add test 2023-06-26 12:37:23 +05:30
Tushar Sadhwani 4ebb2b94c2
fix code for py37 2023-06-26 12:19:42 +05:30
Tushar Sadhwani 9859c110cc
Ensure the docstring is a string 2023-06-26 12:14:41 +05:30
Zac Hatfield-Dodds 5eaf8207eb
Merge pull request #8428 from graingert/warn-when-a-mark-is-applied-to-a-fixture 2023-06-25 10:21:18 -07:00
Thomas Grainger 518ca37cae
Update doc/en/deprecations.rst 2023-06-25 16:09:04 +01:00
Thomas Grainger 45f1a462d5
Apply suggestions from code review
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2023-06-25 16:08:53 +01:00
Thomas Grainger 4cd95eeabf
Merge branch 'main' into warn-when-a-mark-is-applied-to-a-fixture 2023-06-25 16:08:11 +01:00
pytest bot 1306b84241 [automated] Update plugin list 2023-06-25 00:27:02 +00:00
Ran Benita fe51121f39
Merge pull request #11042 from bluetech/pkg-init-argpath
python: change `pytest pkg/__init__.py` to only collect the `__init__.py` Module
2023-06-23 21:09:00 +03:00
Ran Benita c8b1790ee7 python: change `pytest pkg/__init__.py` to only collect the `__init__.py` Module
Previously it would collect the entire package, but this is not what
users expect.

Refs #3749
Fixes #8976
Fixes #9263
Fixes #9313
2023-06-23 20:42:50 +03:00
Ran Benita 2870157234
Merge pull request #11133 from bluetech/removed-in-8-error
Change PytestRemovedIn8Warning to error by default, add PytestRemovedIn9Warning
2023-06-23 20:13:17 +03:00
Ran Benita 1b7896f83d Add PytestRemovedIn9Warning
It's good to have it available already in all 8.* versions, even if it's
not used yet.
2023-06-23 16:42:26 +03:00
Ran Benita a4a189ad99 Change PytestRemovedIn8Warning to error by default
Per our backward compatibility policy.
2023-06-23 16:42:24 +03:00
Ran Benita 57d352460c
Merge pull request #11132 from bluetech/cherry-pick-release
Cherry-pick 7.4.0 release notes
2023-06-23 14:48:46 +03:00
Ran Benita a14745550a Merge pull request #11131 from pytest-dev/release-7.4.0
Prepare release 7.4.0

(cherry picked from commit fb03d1388b002f63973c663cb4929908a2ca81f5)
2023-06-23 14:19:51 +03:00
Ran Benita 64319dbc01
Merge pull request #11128 from bluetech/pythonpath-note
reference: add note that `pythonpath` does not affect `-p`
2023-06-22 18:12:37 +03:00
Ran Benita 1e8135df16 reference: add note that `pythonpath` does not affect `-p`
Fix #11118.
2023-06-22 15:45:20 +03:00
Zac Hatfield-Dodds 1e32a4b570
Merge pull request #10935 from nondescryptid/10328 2023-06-21 11:04:10 -07:00