Skip to content

Commit d134e76

Browse files
committed
Also pospone deprecation of FILLFUNCARGS, PYTEST_COLLECT_MODULE and WARNING_CAPTURED_HOOK
1 parent 1185a2b commit d134e76

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

src/_pytest/fixtures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
from _pytest.config import _PluggyPlugin
4747
from _pytest.config import Config
4848
from _pytest.config.argparsing import Parser
49-
from _pytest.deprecated import FILLFUNCARGS
5049
from _pytest.deprecated import FIXTURE_POSITIONAL_ARGUMENTS
5150
from _pytest.deprecated import FUNCARGNAMES
5251
from _pytest.mark import ParameterSet
@@ -361,7 +360,8 @@ def reorder_items_atscope(
361360

362361
def fillfixtures(function: "Function") -> None:
363362
""" fill missing funcargs for a test function. """
364-
warnings.warn(FILLFUNCARGS, stacklevel=2)
363+
# Uncomment this after 6.0 release (#7361)
364+
# warnings.warn(FILLFUNCARGS, stacklevel=2)
365365
try:
366366
request = function._request
367367
except AttributeError:

src/_pytest/hookspec.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from pluggy import HookspecMarker
1313

1414
from .deprecated import COLLECT_DIRECTORY_HOOK
15-
from .deprecated import WARNING_CAPTURED_HOOK
1615
from _pytest.compat import TYPE_CHECKING
1716

1817
if TYPE_CHECKING:
@@ -738,7 +737,9 @@ def pytest_terminal_summary(
738737
"""
739738

740739

741-
@hookspec(historic=True, warn_on_impl=WARNING_CAPTURED_HOOK)
740+
# Uncomment this after 6.0 release (#7361)
741+
# @hookspec(historic=True, warn_on_impl=WARNING_CAPTURED_HOOK)
742+
@hookspec(historic=True)
742743
def pytest_warning_captured(
743744
warning_message: "warnings.WarningMessage",
744745
when: "Literal['config', 'collect', 'runtest']",

src/pytest/collect.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import sys
2-
import warnings
32
from types import ModuleType
43
from typing import Any
54
from typing import List
65

76
import pytest
8-
from _pytest.deprecated import PYTEST_COLLECT_MODULE
97

108

119
COLLECT_FAKEMODULE_ATTRIBUTES = [
@@ -33,7 +31,8 @@ def __dir__(self) -> List[str]:
3331
def __getattr__(self, name: str) -> Any:
3432
if name not in self.__all__:
3533
raise AttributeError(name)
36-
warnings.warn(PYTEST_COLLECT_MODULE.format(name=name), stacklevel=2)
34+
# Uncomment this after 6.0 release (#7361)
35+
# warnings.warn(PYTEST_COLLECT_MODULE.format(name=name), stacklevel=2)
3736
return getattr(pytest, name)
3837

3938

testing/deprecated_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def test():
2828
)
2929

3030

31+
@pytest.mark.skip(reason="should be reintroduced in 6.1: #7361")
3132
@pytest.mark.parametrize("attribute", pytest.collect.__all__) # type: ignore
3233
# false positive due to dynamic attribute
3334
def test_pytest_collect_module_deprecated(attribute):
@@ -117,7 +118,8 @@ class MockConfig:
117118
assert w[0].filename == __file__
118119

119120

120-
def test__fillfuncargs_is_deprecated() -> None:
121+
@pytest.mark.skip(reason="should be reintroduced in 6.1: #7361")
122+
def test_fillfuncargs_is_deprecated() -> None:
121123
with pytest.warns(
122124
pytest.PytestDeprecationWarning,
123125
match="The `_fillfuncargs` function is deprecated",

0 commit comments

Comments
 (0)