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

BUG: Pandas doesn't build with Cython3.0 pre-release #36421

Closed
realead opened this issue Sep 17, 2020 · 1 comment
Closed

BUG: Pandas doesn't build with Cython3.0 pre-release #36421

realead opened this issue Sep 17, 2020 · 1 comment
Labels
Build Library building on various platforms Dependencies Required and optional dependencies Duplicate Report Duplicate issue or pull request

Comments

@realead
Copy link
Contributor

realead commented Sep 17, 2020

This line :

self.buf.data = self.values.data

will no longer build once Cython3.0 is released, due to this change: cython/cython@22a49f4#diff-24bcfc3298e43281fed97318a554550dL247.

data is no longer

ctypedef class numpy.ndarray [object PyArrayObject, check_size ignore]:
    ....
    char * data

but

ctypedef class numpy.ndarray [object PyArrayObject, check_size ignore]:
             ...
            @property
            cdef inline char* data(self) nogil:
                """The pointer to the data buffer as a char*.
                This is provided for legacy reasons to avoid direct struct field access.
                For new code that needs this access, you probably want to cast the result
                of `PyArray_DATA()` instead.
                """
                return PyArray_BYTES(self)

Error:

Error compiling Cython file:
    ------------------------------------------------------------
    ...
            self.buf.data = self.values.data    
    
    pandas\_libs\reduction.pyx:472:15: Assignment to a read-only property

Expected:

Should build.

@realead realead added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 17, 2020
@jreback
Copy link
Contributor

jreback commented Sep 17, 2020

dup of #34213

you are welcome to help on the linked prs and issues

@jreback jreback added this to the No action milestone Sep 17, 2020
@jreback jreback added Duplicate Report Duplicate issue or pull request Dependencies Required and optional dependencies Build Library building on various platforms and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 17, 2020
@jreback jreback closed this as completed Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Dependencies Required and optional dependencies Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants