Skip to content

Commit d2ea9e2

Browse files
committed
Remove report_log in favor of pytest-reportlog
Fix #6180
1 parent 99f4878 commit d2ea9e2

File tree

10 files changed

+11
-207
lines changed

10 files changed

+11
-207
lines changed

changelog/4488.feature.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
New ``--report-log=FILE`` option that writes *report logs* into a file as the test session executes.
1+
The pytest team has created the `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__
2+
plugin, which provides a new ``--report-log=FILE`` option that writes *report logs* into a file as the test session executes.
23

34
Each line of the report log contains a self contained JSON object corresponding to a testing event,
45
such as a collection or a test result report. The file is guaranteed to be flushed after writing
56
each line, so systems can read and process events in real-time.
67

7-
This option is meant to replace ``--resultlog``, which is deprecated and meant to be removed
8-
in a future release. If you use ``--resultlog``, please try out ``--report-log`` and
8+
The plugin is meant to replace the ``--resultlog`` option, which is deprecated and meant to be removed
9+
in a future release. If you use ``--resultlog``, please try out ``pytest-reportlog`` and
910
provide feedback.

doc/en/contents.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ Full pytest documentation
2727
unittest
2828
nose
2929
xunit_setup
30-
report_log
3130
plugins
3231
writing_plugins
3332
logging

doc/en/deprecations.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ The ``--result-log`` option produces a stream of test reports which can be
6464
analysed at runtime, but it uses a custom format which requires users to implement their own
6565
parser.
6666

67-
The :ref:`--report-log <report_log>` option provides a more standard and extensible alternative, producing
67+
The `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__ plugin provides a ``--report-log`` option, a more standard and extensible alternative, producing
6868
one JSON object per-line, and should cover the same use cases. Please try it out and provide feedback.
6969

70-
The plan is remove the ``--result-log`` option in pytest 6.0 after ``--result-log`` proves satisfactory
71-
to all users and is deemed stable.
70+
The plan is remove the ``--result-log`` option in pytest 6.0 if ``pytest-reportlog`` proves satisfactory
71+
to all users and is deemed stable. The ``pytest-reportlog`` plugin might even be merged into the core
72+
at some point, depending on the plans for the plugins and number of users using it.
7273

7374

7475
Removed Features

doc/en/report_log.rst

Lines changed: 0 additions & 70 deletions
This file was deleted.

doc/en/usage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ by the `PyPy-test`_ web page to show test results over several revisions.
692692

693693
This option is rarely used and is scheduled for removal in pytest 6.0.
694694

695-
If you use this option, consider using the new :ref:`--result-log <report_log>`.
695+
If you use this option, consider using the new `pytest-reportlog <https://github.com/pytest-dev/pytest-reportlog>`__ plugin instead.
696696

697697
See `the deprecation docs <https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log>`__
698698
for more information.

src/_pytest/config/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ def directory_arg(path, optname):
154154
"assertion",
155155
"junitxml",
156156
"resultlog",
157-
"report_log",
158157
"doctest",
159158
"cacheprovider",
160159
"freeze_support",

src/_pytest/deprecated.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
RESULT_LOG = PytestDeprecationWarning(
29-
"--result-log is deprecated and scheduled for removal in pytest 6.0.\n"
29+
"--result-log is deprecated, please try the new pytest-reportlog plugin.\n"
3030
"See https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log for more information."
3131
)
3232

src/_pytest/report_log.py

Lines changed: 0 additions & 72 deletions
This file was deleted.

testing/deprecated_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test():
1616
result = testdir.runpytest("--result-log=%s" % testdir.tmpdir.join("result.log"))
1717
result.stdout.fnmatch_lines(
1818
[
19-
"*--result-log is deprecated and scheduled for removal in pytest 6.0*",
19+
"*--result-log is deprecated, please try the new pytest-reportlog plugin.",
2020
"*See https://docs.pytest.org/en/latest/deprecations.html#result-log-result-log for more information*",
2121
]
2222
)

testing/test_report_log.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)