Skip to content

Remove undocumented GifImagePlugin._save_netpbm - #9901

Open
akx wants to merge 2 commits into
python-pillow:mainfrom
akx:no-save-netpbm
Open

Remove undocumented GifImagePlugin._save_netpbm#9901
akx wants to merge 2 commits into
python-pillow:mainfrom
akx:no-save-netpbm

Conversation

@akx

@akx akx commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

This PR proposes to remove the undocumented (aside from the changelog for PIL 0.2a1 noting "netpbm save hack") GifImagePlugin._save_netpbm function.

@radarhere radarhere added Removal Removal of a feature, usually done in major releases and removed Removal Removal of a feature, usually done in major releases labels Aug 25, 2026
GifImagePlugin._save_netpbm()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``GifImagePlugin._save_netpbm()`` has been removed.

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.

If this function is unimportant enough that we don't need a deprecation period, then I'm also inclined to think it is unimportant enough that we don't need release notes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I've been bitten by libraries quietly removing functions (last in oracle/oci-python-sdk#878).

Augmented the changelog entry to include some history (since I had it at hand), and an alternate recipe. What do you think?

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.

If you're concerned about removing it without notifying users, then it sounds like a deprecation period is in order. #9186 deprecated the undocumented Image._show() function.

A deprecation period lasts at least a year, so for this PR, it would target Pillow 14.0.0.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not overly concerned about a proper deprecation period for an underscore-private feature that was never really documented.

So to avoid a deprecation period, I should remove the changelog entry?

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.

Looking further,

# Uncomment the following line if you wish to use NETPBM/PBMPLUS
# instead of the built-in "uncompressed" GIF encoder
# Image.register_save(GifImageFile.format, _save_netpbm)

seems similar to our rationale for adding a deprecation period to Image._showxv

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

GitHub Code Search seems to imply there is no code using _save_netpbm that is not in one of Pillow's own files).

For _showxv, a similar search today shows only one actual call in code uploaded 2 years ago while _showxv was removed in 4990404, 5 years ago.

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.

2 participants