Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MNT: make print_figure kwarg wrapper support py311 #21705

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 28, 2021

Conversation

tacaswell
Copy link
Member

PR Summary

Do not fully understand what changed, but without this change walk_stack
would start 2 frames higher (in the test module, not in backend_bases) which
would mean we never saw the frame with print_figure and hence was getting
warnings which we converted to failures on a vast majority of the tests.

I suspect that this is related to the fast-Python work and avoiding making
unneeded structures during the calls, but chased that theory down yet.

Discovered on a commit between py311a2 and py311a3.

This will need a followup PR to main that rips out almost all of this code. We should have ripped it out in mpl35, but do not think we should do that in a patch release so also updated the deprecation date.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • New features are documented, with examples if plot related.
  • New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented in doc/api/next_api_changes/ (follow instructions in README.rst there).
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).

Do not fully understand what changed, but without this change `walk_stack`
would start 2 frames higher (in the test module, not in backend_bases) which
would mean we never saw the frame with `print_figure` and hence was getting
warnings which we converted to failures on a vast majority of the tests.

I suspect that this is related to the fast-Python work and avoiding making
unneeded structures during the calls, but chased that theory down yet.

Discovered on a commit between py311a2 and py311a3.
We should have pulled this out in mpl3.5
@tacaswell tacaswell added this to the v3.5.1 milestone Nov 22, 2021
@anntzer
Copy link
Contributor

anntzer commented Nov 22, 2021

#21395 is a possible implementation of the followup (which I agree is too large for a patch release).

@tacaswell
Copy link
Member Author

Ah, great, I missed that PR existed. Glad I did not waste time trying to sort out how to do that removal :)

@dstansby dstansby merged commit 28a5f6d into matplotlib:main Nov 28, 2021
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Nov 28, 2021
dstansby added a commit that referenced this pull request Nov 28, 2021
…705-on-v3.5.x

Backport PR #21705 on branch v3.5.x (MNT: make print_figure kwarg wrapper support py311)
@tacaswell tacaswell deleted the py311 branch December 1, 2021 20:50
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.

4 participants