Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
tacaswell merged 3 commits into matplotlib:main from aalocked:updating-requirements
Mar 28, 2023

Conversation

Copy link

@aalocked aalocked commented Mar 27, 2023
edited
Loading

PR Summary

Added pytest==7.0.0

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

@aalocked aalocked changed the title (削除) adding pytest==6.2.0 (削除ここまで) (追記) Add pytest==6.2.0 on requirements (追記ここまで) Mar 27, 2023
@aalocked aalocked changed the title (削除) Add pytest==6.2.0 on requirements (削除ここまで) (追記) Add pytest==6.2.0 on requirements/testing/minver.txt (追記ここまで) Mar 27, 2023
Copy link
Member

ksunden commented Mar 27, 2023

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)

Copy link
Member

rcomer commented Mar 27, 2023
edited
Loading

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]

Copy link
Member

ksunden commented Mar 27, 2023

minversion = 3.6

Note that since the version has changed, the original source of "3.6" from #23154 should also be updated

tacaswell reacted with thumbs up emoji

Copy link
Member

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.

@tacaswell tacaswell added this to the v3.8.0 milestone Mar 27, 2023
Copy link
Member

rcomer commented Mar 28, 2023

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

Copy link
Author

So if Im correct updating the minversion to 6.2.0 should do the job?

Copy link
Member

rcomer commented Mar 28, 2023

@aalocked I think we need to try 7.0.0.

Copy link
Author

Updating to 7.0.0 did pass all the checks. What are your thoughts?

rcomer reacted with thumbs up emoji

Copy link
Member

rcomer commented Mar 28, 2023

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.

@aalocked aalocked changed the title (削除) Add pytest==6.2.0 on requirements/testing/minver.txt (削除ここまで) (追記) Add pytest==7.0.0 on requirements/testing/minver.txt (追記ここまで) Mar 28, 2023
@tacaswell tacaswell merged commit 070477c into matplotlib:main Mar 28, 2023
Copy link
Member

Thank you @aalocked and congratulations on your first merged Matplotlib PR 🎉 I hope we hear from you again!

rcomer reacted with hooray emoji aalocked reacted with heart emoji

Copy link
Author

Thank you. It was fun! Hoping to contribute more!

rcomer reacted with thumbs up emoji

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

@rcomer rcomer rcomer approved these changes

Assignees
No one assigned
Projects
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

[MNT]: requirements/testing/minver.txt could also test oldest-supported pytest version

AltStyle によって変換されたページ (->オリジナル) /