Skip to content

Commit e27228a

Browse files
authored
Merge pull request #7224 from bluetech/logging-simplifications
logging: some simplifications/cleanups
2 parents abbd97f + f71ec8c commit e27228a

File tree

7 files changed

+179
-315
lines changed

7 files changed

+179
-315
lines changed

changelog/7224.breaking.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The `item.catch_log_handler` and `item.catch_log_handlers` attributes, set by the
2+
logging plugin and never meant to be public , are no longer available.
3+
4+
The deprecated ``--no-print-logs`` option is removed. Use ``--show-capture`` instead.

doc/en/deprecations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ a public API and may break in the future.
3737
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3838

3939
.. deprecated:: 5.4
40+
.. versionremoved:: 6.0
4041

4142

42-
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
43-
provide feedback.
43+
Option ``--no-print-logs`` is removed. If you used ``--no-print-logs``, please use ``--show-capture`` instead.
4444

4545
``--show-capture`` command-line option was added in ``pytest 3.5.0`` and allows to specify how to
4646
display captured output when tests fail: ``no``, ``stdout``, ``stderr``, ``log`` or ``all`` (the default).

src/_pytest/deprecated.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
"for more information."
5555
)
5656

57-
NO_PRINT_LOGS = PytestDeprecationWarning(
58-
"--no-print-logs is deprecated and scheduled for removal in pytest 6.0.\n"
59-
"Please use --show-capture instead."
60-
)
61-
6257
COLLECT_DIRECTORY_HOOK = PytestDeprecationWarning(
6358
"The pytest_collect_directory hook is not working.\n"
6459
"Please use collect_ignore in conftests or pytest_collection_modifyitems."

0 commit comments

Comments
 (0)