Skip to content

Commit

Permalink
Merge pull request #7224 from bluetech/logging-simplifications
Browse files Browse the repository at this point in the history
logging: some simplifications/cleanups
  • Loading branch information
bluetech committed May 17, 2020
2 parents abbd97f + f71ec8c commit e27228a
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 315 deletions.
4 changes: 4 additions & 0 deletions changelog/7224.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The `item.catch_log_handler` and `item.catch_log_handlers` attributes, set by the
logging plugin and never meant to be public , are no longer available.

The deprecated ``--no-print-logs`` option is removed. Use ``--show-capture`` instead.
4 changes: 2 additions & 2 deletions doc/en/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ a public API and may break in the future.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. deprecated:: 5.4
.. versionremoved:: 6.0


Option ``--no-print-logs`` is deprecated and meant to be removed in a future release. If you use ``--no-print-logs``, please try out ``--show-capture`` and
provide feedback.
Option ``--no-print-logs`` is removed. If you used ``--no-print-logs``, please use ``--show-capture`` instead.

``--show-capture`` command-line option was added in ``pytest 3.5.0`` and allows to specify how to
display captured output when tests fail: ``no``, ``stdout``, ``stderr``, ``log`` or ``all`` (the default).
Expand Down
5 changes: 0 additions & 5 deletions src/_pytest/deprecated.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@
"for more information."
)

NO_PRINT_LOGS = PytestDeprecationWarning(
"--no-print-logs is deprecated and scheduled for removal in pytest 6.0.\n"
"Please use --show-capture instead."
)

COLLECT_DIRECTORY_HOOK = PytestDeprecationWarning(
"The pytest_collect_directory hook is not working.\n"
"Please use collect_ignore in conftests or pytest_collection_modifyitems."
Expand Down

0 comments on commit e27228a

Please sign in to comment.