Skip to content

gh-91217: deprecate imghdr#91461

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

gh-91217: deprecate imghdr#91461
warsaw merged 14 commits intopython:mainfrom
brettcannon:deprecate-imghdr

Conversation

@brettcannon
Copy link
Copy Markdown
Member

@brettcannon brettcannon commented Apr 12, 2022

Automerge-Triggered-By: GH:warsaw

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
@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.
Copy link
Copy Markdown
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
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
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