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

Mark dlpack tensor deleter as noexcept to match PyCapsule_Destructor signature. #12921

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Mar 10, 2023

Description

This is a fix for a Cython problem that appears when building with Cython 3.0.0 beta 1. There are a bunch of warnings I'd like to fix as well, but this is the only hard error. The fix is to use noexcept in the deleter definition.

Error compiling Cython file:
------------------------------------------------------------
...
        )
    return pycapsule.PyCapsule_New(
        dlpack_tensor,
        'dltensor',
        dlmanaged_tensor_pycapsule_deleter
        ^
------------------------------------------------------------
/home/bdice/code/cudf/python/cudf/cudf/_lib/interop.pyx:69:8: Cannot assign type 'void (object) except *' to 'PyCapsule_Destructor'

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@bdice bdice requested a review from a team as a code owner March 10, 2023 06:19
@bdice bdice requested review from wence- and mroeschke March 10, 2023 06:19
@github-actions github-actions bot added the Python Affects Python cuDF API. label Mar 10, 2023
@bdice bdice changed the title Explicitly cast dlpack tensor deleter to PyCapsule_Destructor. Mark dlpack tensor deleter as noexcept to match PyCapsule_Destructor signature. Mar 14, 2023
@bdice bdice requested a review from shwina March 14, 2023 21:03
@bdice bdice added bug Something isn't working non-breaking Non-breaking change labels Mar 14, 2023
@bdice
Copy link
Contributor Author

bdice commented Mar 15, 2023

/merge

@rapids-bot rapids-bot bot merged commit a33e368 into rapidsai:branch-23.04 Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants