Remove broken Dib Class from aggdraw#120
Merged
djhoese merged 1 commit intopytroll:mainfrom Mar 2, 2026
Merged
Conversation
djhoese
reviewed
Mar 2, 2026
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Dibever 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 (andImageWinin Pillow provides the exact same Dib interface if anyone really wants it).This should simplify docs and maintenance going forward!