Skip to content

gh-91217: deprecate imghdr - #91461

Merged
warsaw merged 14 commits into
python:mainfrom
brettcannon:deprecate-imghdr
Apr 13, 2022
Merged

warsaw merged 14 commits into
python:mainfrom
brettcannon:deprecate-imghdr

Conversation

@brettcannon

@brettcannon brettcannon commented Apr 12, 2022 •

Copy link
Copy Markdown
Member

Automerge-Triggered-By: GH:warsaw

Comment thread Doc/whatsnew/3.11.rst Resolved
Comment thread Doc/library/email.mime.rst Resolved
Comment thread Lib/email/mime/image.py 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 Apr 12, 2022
Comment thread Doc/includes/email-mime.py Resolved
Comment thread Doc/includes/email-mime.py Resolved
Comment thread Doc/library/email.mime.rst Resolved
@bedevere-bot

Copy link
Copy Markdown

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

@brettcannon

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

@bedevere-bot

Copy link
Copy Markdown

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.

@warsaw warsaw left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown

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

@brettcannon
brettcannon deleted the deprecate-imghdr branch April 13, 2022 18:19
Comment thread Doc/includes/email-mime.py Resolved
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

5 participants