Skip to content

Mark StubHandler.open() as abstract - #9872

Open
radarhere wants to merge 5 commits into
python-pillow:mainfrom
radarhere:zero_stub
Open

Mark StubHandler.open() as abstract#9872
radarhere wants to merge 5 commits into
python-pillow:mainfrom
radarhere:zero_stub

Conversation

@radarhere

@radarhereradarhere commented Aug 17, 2026

Copy link
Copy Markdown
Member

Within our stub plugins, we use (1, 1) as a placeholder size.

# make something up
self._mode="F"
self._size=1, 1

  1. I think (0, 0) might more clearly indicate that there's nothing there yet.
  2. What if we added a requirement that when the handler is implemented, image size must be set (to something more than (0, 0))? To communicate this better, we could also mark StubHandler.open() as abstract.

@radarhere
radarhereforce-pushed the zero_stub branch 4 times, most recently from 2d979ff to dbc1a11CompareAugust 18, 2026 21:44
@radarhereradarhere changed the title Use (0, 0) as placeholder size in stubsMark StubHandler.open() as abstractAug 18, 2026
Sign up for freeto 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.

1 participant

@radarhere