diff --git a/AUTHORS b/AUTHORS index d8fb8f703..8c7cb19ce 100644 --- a/AUTHORS +++ b/AUTHORS @@ -104,6 +104,7 @@ Michael Droettboom Michael Seifert Mike Lundy Ned Batchelder +Neven Mundar Nicolas Delaby Oleg Pidsadnyi Oliver Bestwalter diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8fb7b1589..77b67ddbb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,11 +1,15 @@ 3.0.5.dev0 ========== -* Add hint to error message hinting possible missing __init__.py (`#478`_). Thanks `@DuncanBetts`_. +* Add hint to error message hinting possible missing ``__init__.py`` (`#478`_). Thanks `@DuncanBetts`_. * Provide ``:ref:`` targets for ``recwarn.rst`` so we can use intersphinx referencing. Thanks to `@dupuy`_ for the report and `@lwm`_ for the PR. +* Using ``item.Function``, ``item.Module``, etc., is now issuing deprecation warnings, prefer + ``pytest.Function``, ``pytest.Module``, etc., instead (`#2034`_). + Thanks `@nmundar`_ for the PR. + * An error message is now displayed if ``--confcutdir`` is not a valid directory, avoiding subtle bugs (`#2078`_). Thanks `@nicoddemus`_ for the PR. @@ -27,8 +31,10 @@ .. _@adler-j: https://github.com/adler-j .. _@DuncanBetts: https://github.com/DuncanBetts .. _@nedbat: https://github.com/nedbat +.. _@nmundar: https://github.com/nmundar .. _#478: https://github.com/pytest-dev/pytest/issues/478 +.. _#2034: https://github.com/pytest-dev/pytest/issues/2034 .. _#2038: https://github.com/pytest-dev/pytest/issues/2038 .. _#2078: https://github.com/pytest-dev/pytest/issues/2078 .. _#2082: https://github.com/pytest-dev/pytest/issues/2082 diff --git a/_pytest/main.py b/_pytest/main.py index dd0775501..2b5b12875 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -190,7 +190,9 @@ class FSHookProxy: def compatproperty(name): def fget(self): - # deprecated - use pytest.name + import warnings + warnings.warn("This usage is deprecated, please use pytest.{0} instead".format(name), + PendingDeprecationWarning, stacklevel=2) return getattr(pytest, name) return property(fget)