Skip to content

Change deprecation warnings into errors for 7.0 release, using a new mechanism #9309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 21, 2021

Conversation

bluetech
Copy link
Member

This fixes #9308. The first attempt #8837 ran into trouble because some deprecations weren't ready for removal. I make things work by adding PytestRemovedInX warnings. Please see the commit messages for more details.

The reason I worked on this is I'm eager to remove one deprecation - the FILLFUNCARGS - and don't want to wait until pytest 8.1 for that :)

bluetech and others added 2 commits November 14, 2021 23:57
Closes pytest-dev#7480.

This allows us to more easily follow our deprecation policy of turning
warnings into errors for the X.0 releases before complete removal in
X.1.

It also makes the deprecation timeline clear to both the users and
pytest developers -- it can be hard to keep track.

Note that the designation is not meant to be a binding contract - if the
time comes for removal of a specific deprecation but we decide it's too
soon, can just bump it to the next major.

Inspired by Django:
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#deprecating-a-feature
Per our backward compatibility policy.

Co-authored-by: Bruno Oliveira <[email protected]>
@bluetech bluetech added this to the 7.0 milestone Nov 14, 2021
Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for tackling this!

@bluetech bluetech merged commit df9e94f into pytest-dev:main Nov 21, 2021
The-Compiler added a commit to The-Compiler/pytest that referenced this pull request Nov 24, 2021
Follow-up to pytest-dev#9309.

The issue in the changelog broke the docs build with:

doc/en/_changelog_towncrier_draft.rst:47: WARNING: Inline literal start-string
without end-string.

The second change isn't as critical, but caused the text to be rendered as
monospace including the tilde (i.e. `~pytest.PytestDeprecationwarning`).
@The-Compiler
Copy link
Member

This breaks the docs build, follow up: #9336

The-Compiler added a commit that referenced this pull request Nov 25, 2021
Follow-up to #9309.

The issue in the changelog broke the docs build with:

doc/en/_changelog_towncrier_draft.rst:47: WARNING: Inline literal start-string
without end-string.

The second change isn't as critical, but caused the text to be rendered as
monospace including the tilde (i.e. `~pytest.PytestDeprecationwarning`).
@bluetech bluetech deleted the pytest7-deprecation-removals branch December 27, 2021 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change deprecation warnings into errors for 7.0
3 participants