pytest icon indicating copy to clipboard operation
pytest copied to clipboard

Deprecate/drop support for accepting bytes in terminal.write_line

Open nicoddemus opened this issue 5 years ago • 4 comments

From: https://github.com/pytest-dev/pytest/pull/7142#discussion_r435084751

nicoddemus avatar Jun 05 '20 11:06 nicoddemus

@nicoddemus Also this one too, can you help out a bit? I think I have to add DeprecationWarning here https://github.com/pytest-dev/pytest/blob/133e8af4ee79b41d23fc274c350843ed050fb93e/src/_pytest/terminal.py#L424-L428 , right?

avats-dev avatar Oct 03 '20 18:10 avats-dev

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. 👍

nicoddemus avatar Oct 04 '20 11:10 nicoddemus

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?

avats-dev avatar Oct 04 '20 13:10 avats-dev

... 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. 👍

nicoddemus avatar Oct 04 '20 13:10 nicoddemus