From 6006e6abd1e76e979850f433d8554bca815b188e Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 17 Jul 2017 21:31:43 -0300 Subject: [PATCH] Revert "introduce deprecation warnings for legacy parametersets" As discussed in #2573, this change introduced a serious regression. Fix #2573 This reverts commit 0d0b01bded8ab758118d9be1ea64db493045dcf4. --- _pytest/deprecated.py | 6 ------ _pytest/mark.py | 5 +---- changelog/2427.removal | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 changelog/2427.removal diff --git a/_pytest/deprecated.py b/_pytest/deprecated.py index 1eeb74918ed..c5aedd0c9cf 100644 --- a/_pytest/deprecated.py +++ b/_pytest/deprecated.py @@ -30,10 +30,4 @@ class RemovedInPytest4Warning(DeprecationWarning): MARK_INFO_ATTRIBUTE = RemovedInPytest4Warning( "MarkInfo objects are deprecated as they contain the merged marks" -) - -MARK_PARAMETERSET_UNPACKING = RemovedInPytest4Warning( - "Applying marks directly to parameters is deprecated," - " please use pytest.param(..., marks=...) instead.\n" - "For more details, see: https://docs.pytest.org/en/latest/parametrize.html" ) \ No newline at end of file diff --git a/_pytest/mark.py b/_pytest/mark.py index 961c3c40971..11f1e30d600 100644 --- a/_pytest/mark.py +++ b/_pytest/mark.py @@ -6,7 +6,7 @@ from collections import namedtuple from operator import attrgetter from .compat import imap -from .deprecated import MARK_INFO_ATTRIBUTE, MARK_PARAMETERSET_UNPACKING +from .deprecated import MARK_INFO_ATTRIBUTE def alias(name, warning=None): getter = attrgetter(name) @@ -61,9 +61,6 @@ def extract_from(cls, parameterset, legacy_force_tuple=False): if legacy_force_tuple: argval = argval, - if newmarks: - warnings.warn(MARK_PARAMETERSET_UNPACKING) - return cls(argval, marks=newmarks, id=None) @property diff --git a/changelog/2427.removal b/changelog/2427.removal deleted file mode 100644 index c7ed8e17a7a..00000000000 --- a/changelog/2427.removal +++ /dev/null @@ -1 +0,0 @@ -introduce deprecation warnings for legacy marks based parametersets