-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Move papersize="auto" deprecation to backend_bases. #26959
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
@@ -867,9 +867,6 @@ def _print_figure( | |||
# find the appropriate papertype | |||
width, height = self.figure.get_size_inches() | |||
if papertype == 'auto': | |||
_api.warn_deprecated("3.8", name="papertype='auto'", | |||
addendum="Pass an explicit paper type, 'figure', or " | |||
"omit the *papertype* argument entirely.") | |||
papertype = _get_papertype(*orientation.swap_if_landscape((width, height))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave a comment about this here, or it might be forgotten when removing the deprecation in 3.10.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And/or add a comment to the new deprecation site, because that’s where we look at during the removal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done.
@@ -1053,9 +1050,6 @@ def _print_figure_tex( | |||
self.figure.get_size_inches()) | |||
else: | |||
if papertype == 'auto': | |||
_api.warn_deprecated("3.8", name="papertype='auto'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing about a comment here.
This makes it easier for mplcairo (which also outputs PostScript natively) to inherit the deprecation and be able to run the matplotlib test suite both with matplotlib 3.7 (where there should be no warning) and with matplotlib 3.8 (where there should be a warning).
…959-on-v3.8.x Backport PR #26959 on branch v3.8.x (Move papersize="auto" deprecation to backend_bases.)
This makes it easier for mplcairo (which also outputs PostScript natively) to inherit the deprecation and be able to run the matplotlib test suite both with matplotlib 3.7 (where there should be no warning) and with matplotlib 3.8 (where there should be a warning).
PR summary
PR checklist