Skip to content

DOC: fix deprecation warnings #23855

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
Sep 11, 2022
Merged

Conversation

StefRe
Copy link
Contributor

@StefRe StefRe commented Sep 10, 2022

PR Summary

  • ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead.
  • Passing the rotation parameter of init() positionally is deprecated since Matplotlib 3.6; the parameter will become keyword-only two minor releases later.

PR Checklist

Tests and Styling

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

Documentation

  • [N/A] New features are documented, with examples if plot related.
  • [N/A] New features have an entry in doc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] 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).

- ANTIALIAS is deprecated and will be removed in Pillow 10 (2023-07-01).
  Use Resampling.LANCZOS instead.
- Passing the rotation parameter of __init__() positionally is deprecated
  since Matplotlib 3.6; the parameter will become keyword-only two minor
  releases later.
@greglucas greglucas added this to the v3.6.0 milestone Sep 11, 2022
@greglucas greglucas merged commit 184911d into matplotlib:main Sep 11, 2022
@greglucas
Copy link
Contributor

Thanks, @StefRe!

meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Sep 11, 2022
@StefRe StefRe deleted the DOC/deprecations branch September 11, 2022 06:22
timhoffm pushed a commit that referenced this pull request Sep 11, 2022
Co-authored-by: Greg Lucas <greg.m.lucas@gmail.com>
@QuLogic
Copy link
Member

QuLogic commented Sep 13, 2022

This broke with Pillow 9.0.1, which we still support (our minimum is 6.2):

WARNING: .../matplotlib/tutorials/introductory/images.py failed to execute correctly: Traceback (most recent call last):                                                                                                                                                                                       
  File ".../matplotlib/tutorials/introductory/images.py", line 248, in <module>
    img.thumbnail((64, 64), Image.Resampling.LANCZOS)  # resizes image in-place
  File ".../conda/envs/mpl38/lib/python3.8/site-packages/PIL/Image.py", line 65, in __getattr__
    raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
AttributeError: module 'PIL.Image' has no attribute 'Resampling'

@oscargus
Copy link
Member

I added a fix in #23881 so if that is OK, there is no need to follow up @StefRe

melissawm pushed a commit to melissawm/matplotlib that referenced this pull request Dec 19, 2022
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