Skip to content

Deprecate/drop support for accepting bytes in terminal.write_line #7323

Open

Description

@nicoddemus

Activity

  1. added this to the 7.0 milestone on Jun 5, 2020
  2. avats-dev commented on Oct 3, 2020

    @avats-dev

    @nicoddemus Also this one too, can you help out a bit? I think I have to add DeprecationWarning here

    def write_line(self, line: Union[str, bytes], **markup: bool) -> None:
    if not isinstance(line, str):
    line = str(line, errors="replace")
    self.ensure_newline()
    self._tw.line(line, **markup)
    , right?

  3. nicoddemus commented on Oct 4, 2020

    @nicoddemus
    MemberAuthor

    Hi @avats-dev,

    Thanks for the offer!

    Generally yes, but the process is a bit more involved:

    • Add the warning message in src/_pytest/deprecated.py.
    • Add a test in testing/deprecated_test.py.
    • Issue the warning in the location you posted.
    • Add a CHANGELOG entry style deprecation.
    • Add yourself to authors.

    I might have forgotten something, but don't hesitate in open the PR, we can discuss last minute changes there. 👍

  4. avats-dev commented on Oct 4, 2020

    @avats-dev

    Ok @nicoddemus , thanks for the insights. I'll open a PR soon with the changes. Also, we're deprecating here but we can also drop this as mentioned in the issue, so would that be alright?

  5. nicoddemus commented on Oct 4, 2020

    @nicoddemus
    MemberAuthor

    ... but we can also drop this as mentioned in the issue, so would that be alright?

    Our policy is to deprecate it first and only drop it in the next major release, so we really should deprecate it first. 👍

  6. modified the milestones: 8.0, 9.0 on Jan 16, 2024
  7. modified the milestones: 9.0, 10.0 on Nov 5, 2025
  8. added a commit that references this issue on Oct 18, 2026
    bcd2548
  9. LuanaPBueno commented on Oct 18, 2026

    @LuanaPBueno

    Opened pytest-dev/pytest#15202 for this, following the steps above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: deprecationfeature that will be removed in the future

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions