Skip to content

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

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Sep 29, 2023

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

@anntzer anntzer added this to the v3.8.1 milestone Sep 29, 2023
@@ -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)))
Copy link
Member

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.

Copy link
Member

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.

Copy link
Contributor Author

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'",
Copy link
Member

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).
@ksunden ksunden merged commit 464f39b into matplotlib:main Oct 2, 2023
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 2, 2023
@anntzer anntzer deleted the psa branch October 2, 2023 21:59
oscargus added a commit that referenced this pull request Oct 3, 2023
…959-on-v3.8.x

Backport PR #26959 on branch v3.8.x (Move papersize="auto" deprecation to backend_bases.)
@ksunden ksunden mentioned this pull request Nov 2, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants