Skip to content
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

gh-91217: deprecate imghdr #91461

Merged
merged 14 commits into from
Apr 13, 2022
Merged

gh-91217: deprecate imghdr #91461

merged 14 commits into from
Apr 13, 2022

Conversation

brettcannon
Copy link
Member

@brettcannon brettcannon commented Apr 12, 2022

Automerge-Triggered-By: GH:warsaw

Doc/whatsnew/3.11.rst Outdated Show resolved Hide resolved
Doc/library/email.mime.rst Outdated Show resolved Hide resolved
Lib/email/mime/image.py Outdated Show resolved Hide resolved
brettcannon and others added 3 commits April 12, 2022 12:09
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@brettcannon brettcannon changed the title gh-91217: deprecate-imghdr gh-91217: deprecate imghdr Apr 12, 2022
Doc/includes/email-mime.py Outdated Show resolved Hide resolved
Doc/includes/email-mime.py Outdated Show resolved Hide resolved
Doc/library/email.mime.rst Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@brettcannon
Copy link
Member Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@warsaw: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from warsaw April 13, 2022 02:31
Remove unnecessary `warnings` import.
Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'd like to do a cleaning pass through the inlined code, but I'll do that in a follow up PR.

@bedevere-bot
Copy link

@warsaw: Please replace # with GH- in the commit message next time. Thanks!

@brettcannon brettcannon deleted the deprecate-imghdr branch April 13, 2022 18:19
warsaw added a commit to warsaw/cpython that referenced this pull request Apr 14, 2022
warsaw added a commit that referenced this pull request Apr 15, 2022
* Rewrite imghdr inlining for clarity and completeness

* Move MIMEImage class back closer to the top of the file since it's the
  important thing.
* Use a decorate to mark a given rule function and simplify the rule function
  names for clarity.
* Copy over all the imghdr test data files into the email package's test data
  directory.  This way when imghdr is actually removed, it won't affect the
  MIMEImage guessing tests.
* Rewrite and extend the MIMEImage tests to test for all supported
  auto-detected MIME image subtypes.
* Remove the now redundant PyBanner048.gif data file.

* See #91461 (comment)

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
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.

5 participants