-
Notifications
You must be signed in to change notification settings - Fork 915
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
Cython enums for null_equality and nan_equality redeclare 'UNEQUAL', raising a warning during builds. #9462
Comments
Yep I think we've discussed this before and come to the conclusion that waiting for scoped enum support in Cython is fine unless this conflict actually starts causing problems. |
This issue has been labeled |
This issue has been labeled |
…arnings. (#12947) Closes #9462. ``` warning: cudf/_lib/cpp/types.pxd:51:8: 'UNEQUAL' redeclared ``` We've been dealing with warnings like this for as long as I've worked on cudf. I think it'd be good to fix this by renaming the Cython enum. We don't rely on this name very much at the Cython/Python level, so it's a small change. (This has been irking me for a long time and I want to see this warning go away in the build logs.) Authors: - Bradley Dice (https://github.com/bdice) Approvers: - https://github.com/brandon-b-miller URL: #12947
The Cython enums
null_equality
andnan_equality
both have an enum value namedUNEQUAL
.cudf/python/cudf/cudf/_lib/cpp/types.pxd
Lines 45 to 51 in 74763ba
When building the cuDF Python code, I see an error message repeated many times:
This issue of repeated
enum
names has been previously discussed on StackOverflow: https://stackoverflow.com/questions/50653853/duplicate-enum-member-names-in-cython-redeclaration-errorLooking at the compiled C++, I see that this Cython code...
cudf/python/cudf/cudf/_lib/lists.pyx
Lines 90 to 95 in 74763ba
... translates into this C++, which seems fine.
Therefore, the issue that the warning is trying to alert us about is not a problem because of our use of explicit C names in the pxd file, like
"cudf::nan_equality::UNEQUAL"
.Discussing with @shwina, we identified two paths forward to remove this warning:
enum class
which does not have this scoping issue.NAN_ALL_EQUAL
,NAN_UNEQUAL
.For now, @shwina and I agreed that we should take no action and wait for Cython 3.0 (option 1).
The text was updated successfully, but these errors were encountered: