Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undeprecate draw aaline blend #2743

Merged

Conversation

oddbookworm
Copy link
Member

fixes #2739 and properly deprecates the blend argument so that if it's used, a warning will always be emitted instead of just false

@oddbookworm oddbookworm requested a review from a team as a code owner March 7, 2024 23:40
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

Perhaps the formatting changes that are unrelated to this PR should be a separate PR? It's probably the new version of clang-format messing things up. It has been causing my PRs to fail too

@oddbookworm
Copy link
Member Author

Perhaps the formatting changes that are unrelated to this PR should be a separate PR? It's probably the new version of clang-format messing things up. It has been causing my PRs to fail too

I opened #2744 to apply the formatting changes. I can rebase this pull when that merges

@Starbuck5
Copy link
Member

I think it’s fine to leave the feature removed (commits don’t need to be reverted). It’s just that the parameter should be un-removed and should always raise a depreciation warning.

@oddbookworm oddbookworm force-pushed the undeprecate-draw-aaline-blend branch from 674a0c2 to 9069359 Compare March 12, 2024 03:17
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR 🎉

src_c/draw.c Outdated
@@ -105,18 +105,29 @@ aaline(PyObject *self, PyObject *arg, PyObject *kwargs)
PyObject *colorobj, *start, *end;
SDL_Surface *surf = NULL;
float startx, starty, endx, endy;
PyObject *blend;
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this start as null?

Copy link
Member Author

Choose a reason for hiding this comment

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

oops

Copy link
Member

@Starbuck5 Starbuck5 left a comment

Choose a reason for hiding this comment

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

Alrighty, thanks! Code looks good, haven't tested locally.

@Starbuck5 Starbuck5 merged commit 9111d6c into pygame-community:main Mar 16, 2024
30 checks passed
@Starbuck5 Starbuck5 added this to the 2.5.0 milestone Mar 16, 2024
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.

Restore pygame.draw.aaline blend argument
3 participants