Skip to content

Commit e40bf1d

Browse files
committed
Add a changelog for TerminalWriter changes
1 parent d8558e8 commit e40bf1d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

changelog/7135.breaking.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Pytest now uses its own ``TerminalWriter`` class instead of using the one from the ``py`` library.
2+
Plugins generally access this class through ``TerminalReporter.writer``, ``TerminalReporter.write()``
3+
(and similar methods), or ``_pytest.config.create_terminal_writer()``.
4+
5+
The following breaking changes were made:
6+
7+
- Output (``write()`` method and others) no longer flush implicitly; the flushing behavior
8+
of the underlying file is respected. To flush explicitly (for example, if you
9+
want output to be shown before an end-of-line is printed), use ``write(flush=True)`` or
10+
``terminal_writer.flush()``.
11+
- Explicit Windows console support was removed, delegated to the colorama library.
12+
- Support for writing ``bytes`` was removed.
13+
- The ``reline`` method and ``chars_on_current_line`` property were removed.
14+
- The ``stringio`` and ``encoding`` arguments was removed.
15+
- Support for passing a callable instead of a file was removed.

0 commit comments

Comments
 (0)