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

[Python] Remove / Update code that might not be required with Cython > 2 #45253

Open
raulcd opened this issue Jan 14, 2025 · 0 comments
Open

Comments

@raulcd
Copy link
Member

raulcd commented Jan 14, 2025

Describe the enhancement requested

When bumping Cython to >= 3, on:

We noticed there's a couple of places where there are comments related to some code required in order to make it compatible with both Cython 2 and 3:
#45238 (comment)

This can possibly be removed or simplified.

Basically:

cdef extern from "arrow/python/common.h" namespace "arrow::py" nogil:
cdef cppclass SharedPtrNoGIL[T](shared_ptr[T]):
# This looks like the only way to satisfy both Cython 2 and Cython 3
SharedPtrNoGIL& operator=(...)
cdef cppclass UniquePtrNoGIL[T, DELETER=*](unique_ptr[T, DELETER]):
UniquePtrNoGIL& operator=(...)

and

# Will be available in Cython 3, not backported
# ref: https://github.com/cython/cython/issues/3293#issuecomment-1223058101
cdef extern from "<optional>" namespace "std" nogil:
cdef cppclass nullopt_t:
nullopt_t()
cdef nullopt_t nullopt

This is not strictly required for bumping the required version so it can be tackled as a separate issue.

Component(s)

Python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant