pytest
pytest copied to clipboard
Deprecate/drop support for accepting bytes in terminal.write_line
From: https://github.com/pytest-dev/pytest/pull/7142#discussion_r435084751
@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?
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. 👍
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?
... 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. 👍