Skip to content

Remove broken Dib Class from aggdraw#120

Merged
djhoese merged 1 commit intopytroll:mainfrom
a-hurst:remove_dib
Mar 2, 2026
Merged

Remove broken Dib Class from aggdraw#120
djhoese merged 1 commit intopytroll:mainfrom
a-hurst:remove_dib

Conversation

@a-hurst
Copy link
Contributor

@a-hurst a-hurst commented Mar 1, 2026

As proposed in #119, this PR removes the Dib class completely from aggdraw.

Currently, Python hard segfaults when attempting to free up memory from any created Dib object. To see how long this bug has existed I tried aggdraw 1.3.15 on Python 3.10 (32-bit, to see if it was a 32/64 issue) as well as aggdraw 1.3.11 on Python 2.7 (to see if it was a Python 3 issue): it works fine on 2.7 but segfaults on 3.10, suggesting this major bug has existed since Python 3 support was added almost a decade ago!

Given that no one has ever reported this in all that time, and that I can find zero examples of aggdraw.Dib ever being used in a single GitHub project, I think it's safe to say that it can be removed without worrying about breaking anyone's code. Also even if the bug could be trivially fixed, it seems like a vestigial thing to maintain given how many cross-platform options there are for drawing to window surfaces these days (and ImageWin in Pillow provides the exact same Dib interface if anyone really wants it).

This should simplify docs and maintenance going forward!

@a-hurst a-hurst requested a review from mraspaud as a code owner March 1, 2026 22:21
@djhoese djhoese added the bug label Mar 2, 2026
@djhoese djhoese self-assigned this Mar 2, 2026
@djhoese djhoese merged commit 7af6652 into pytroll:main Mar 2, 2026
17 checks passed
@djhoese djhoese changed the title Remove Dib Class from aggdraw Remove broken Dib Class from aggdraw Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants