File tree Expand file tree Collapse file tree 5 files changed +8
-59
lines changed Expand file tree Collapse file tree 5 files changed +8
-59
lines changed Original file line number Diff line number Diff line change @@ -250,21 +250,23 @@ The ``yield_fixture`` function/decorator
250
250
It has been so for a very long time, so can be search/replaced safely.
251
251
252
252
253
+ Removed Features
254
+ ----------------
255
+
256
+ As stated in our :ref: `backwards-compatibility ` policy, deprecated features are removed only in major releases after
257
+ an appropriate period of deprecation has passed.
258
+
259
+
253
260
The ``pytest.collect `` module
254
261
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
255
262
256
263
.. deprecated :: 6.0
264
+ .. versionremoved :: 7.0
257
265
258
266
The ``pytest.collect `` module is no longer part of the public API, all its names
259
267
should now be imported from ``pytest `` directly instead.
260
268
261
269
262
- Removed Features
263
- ----------------
264
-
265
- As stated in our :ref: `backwards-compatibility ` policy, deprecated features are removed only in major releases after
266
- an appropriate period of deprecation has passed.
267
-
268
270
269
271
The ``pytest_warning_captured `` hook
270
272
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Original file line number Diff line number Diff line change 11
11
from warnings import warn
12
12
13
13
from _pytest .warning_types import PytestDeprecationWarning
14
- from _pytest .warning_types import PytestRemovedIn7Warning
15
14
from _pytest .warning_types import PytestRemovedIn8Warning
16
15
from _pytest .warning_types import UnformattedWarning
17
16
24
23
}
25
24
26
25
27
- PYTEST_COLLECT_MODULE = UnformattedWarning (
28
- PytestRemovedIn7Warning ,
29
- "pytest.collect.{name} was moved to pytest.{name}\n "
30
- "Please update to the new name." ,
31
- )
32
-
33
26
# This can be* removed pytest 8, but it's harmless and common, so no rush to remove.
34
27
# * If you're in the future: "could have been".
35
28
YIELD_FIXTURE = PytestDeprecationWarning (
Original file line number Diff line number Diff line change 1
1
# PYTHON_ARGCOMPLETE_OK
2
2
"""pytest: unit and functional testing with Python."""
3
- from . import collect
4
3
from _pytest import __version__
5
4
from _pytest import version_tuple
6
5
from _pytest ._code import ExceptionInfo
86
85
"CaptureFixture" ,
87
86
"Class" ,
88
87
"cmdline" ,
89
- "collect" ,
90
88
"Collector" ,
91
89
"CollectReport" ,
92
90
"Config" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
from pytest import PytestDeprecationWarning
11
11
12
12
13
- @pytest .mark .parametrize ("attribute" , pytest .collect .__all__ ) # type: ignore
14
- # false positive due to dynamic attribute
15
- def test_pytest_collect_module_deprecated (attribute ) -> None :
16
- with pytest .warns (DeprecationWarning , match = attribute ):
17
- getattr (pytest .collect , attribute )
18
-
19
-
20
13
@pytest .mark .parametrize ("plugin" , sorted (deprecated .DEPRECATED_EXTERNAL_PLUGINS ))
21
14
@pytest .mark .filterwarnings ("default" )
22
15
def test_external_plugins_integrated (pytester : Pytester , plugin ) -> None :
You can’t perform that action at this time.
0 commit comments