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

Cleanup Lib/email/image.py after imghdr deprecation #91520

Closed
warsaw opened this issue Apr 14, 2022 · 1 comment
Closed

Cleanup Lib/email/image.py after imghdr deprecation #91520

warsaw opened this issue Apr 14, 2022 · 1 comment
Assignees
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir topic-email

Comments

@warsaw
Copy link
Member

warsaw commented Apr 14, 2022

Lib/email/image.py could use some cleanup after most of imghdr.py was inlined.

@warsaw warsaw self-assigned this Apr 14, 2022
@warsaw warsaw added tests Tests in the Lib/test dir stdlib Python modules in the Lib dir topic-email labels Apr 14, 2022
warsaw added a commit that referenced this issue 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 <[email protected]>

Co-authored-by: Oleg Iarygin <[email protected]>
@warsaw
Copy link
Member Author

warsaw commented Apr 27, 2022

Implemented

@warsaw warsaw closed this as completed Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir topic-email
Projects
None yet
Development

No branches or pull requests

1 participant