FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove `JpegImageFile.load_djpeg()` by akx · Pull Request #9916 · python-pillow/Pillow · GitHub

Remove JpegImageFile.load_djpeg() - #9916

Open
akx wants to merge 1 commit into
python-pillow:mainfrom
akx:remove-load-djpeg
Open

Remove JpegImageFile.load_djpeg()#9916
akx wants to merge 1 commit into
python-pillow:mainfrom
akx:remove-load-djpeg

Conversation

akx commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Sibling of #9901 (_save_netpbm() for GIFs) and #9084 (save_cjpeg() for JPEGs).

This PR proposes to remove the undocumented JpegImageFile.load_djpeg() function and the testing infrastructure for it.

akx marked this pull request as ready for review August 27, 2026 17:14

Copy link
Copy Markdown
Member

Could you make an argument for why this should be removed, rather than documented?

akx commented Aug 28, 2026
edited
Loading

Copy link
Copy Markdown
Contributor Author

@radarhere Sure! _save_cjpeg(), the save counterpart of this function, was removed without much ceremony by you in #9084.

This function might have had some value if it was automatically put into place if actual JPEG loading functions weren't available, but that has never been the case, so, like #9084, I'd call this unused.

To match Hugo's research comment for #9084:

  • This was added (unused, untested and undocumented) in PIL 1.1.1 (2000): hugovk/PIL@44fbc52
  • It has since then materially been touched thereafter only to
  • The only callers for this are tests: the aforementioned security test and one added in d283f77.

Also, there's this 2014 comment expressing desire to get rid of this function, so maybe a decade and change later that could be done. #731 (comment)

EDIT: GitHub Code Search seems to find a single call from 10 years ago, from a seemingly abandoned mirror of https://launchpad.net/qa-regression-testing.

radarhere added the Removal Removal of a feature, usually done in major releases label Aug 28, 2026

Copy link
Copy Markdown
Member

I think _save_cjpeg() starting with an underscore is a difference. I would suggest a deprecation, rather than a removal.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Removal Removal of a feature, usually done in major releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL