-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Add pytest==7.0.0 on requirements/testing/minver.txt #25563
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
Conversation
Looks like the behavior of using pytest.warns(matches="...")
without a specific warning type specified was introduced in pytest 7.0.
As this is a dev dependency, I'm perfectly fine putting a stricter window on the minimum version than I suggested in #25562, especially as that has evidently practically speaking already been required for some time.
For reference, this behavior was changed in pytest-dev/pytest#8677, which closed pytest-dev/pytest#8645, which appears in the changelog for pytest v7.0.0 (technically the rc version, but wouldn't pin minver to a prerelease)
Well that reduced the number of failures! It looks like expected_warning
became an optional argument to pytest.warns
at pytest-dev/pytest#8677, which I think went in at v7.0.0. I’m not clear what to do about this one though:
E DeprecationWarning: pkg_resources is deprecated as an API
[x-post with @ksunden]
We should be a little cautious about bumping pytest too far so that we do not make life difficult for down-stream packagers who may want to test the installed package with their packaged pytest.
However it sounds like we have already done that by accident so in this case I think we should lean to updating the min versions (in code and documentation) to match reality, add this test to keep it from happening again and then follow the 1yr support rule.
We also specify the min version in the dev guide, so that should be updated too.
https://matplotlib.org/devdocs/devel/dependencies.html#dependencies-for-testing-matplotlib
So if Im correct updating the minversion to 6.2.0 should do the job?
@aalocked I think we need to try 7.0.0.
76fdaae
to
9208621
Compare
Updating to 7.0.0 did pass all the checks. What are your thoughts?
Seems good to me. Could you also update it to 7.0.0 in the documentation file?
https://github.com/aalocked/matplotlib/blob/updating-requirements/doc/devel/dependencies.rst#dependencies-for-testing-matplotlib
Please also update the title and original post of this pull request.
417377a
to
ec213ad
Compare
Thank you @aalocked and congratulations on your first merged Matplotlib PR 🎉 I hope we hear from you again!
Thank you. It was fun! Hoping to contribute more!
Uh oh!
There was an error while loading. Please reload this page.
PR Summary
Added pytest==7.0.0
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst