Skip to content

Fix minor cython warning #54816

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

Merged
merged 2 commits into from
Aug 28, 2023
Merged

Fix minor cython warning #54816

merged 2 commits into from
Aug 28, 2023

Conversation

mroeschke
Copy link
Member

Fixes

2023-08-26T19:21:26.6203637Z   warning: /home/runner/work/pandas/pandas/pandas/_libs/writers.pyx:123:50: Unknown type declaration 'Py_ssize_t' in annotation, ignoring
2023-08-26T19:21:26.6253780Z   warning: /home/runner/work/pandas/pandas/pandas/_libs/writers.pyx:123:50: Unknown type declaration 'Py_ssize_t' in annotation, ignoring
2023-08-26T19:21:26.6254699Z   warning: /home/runner/work/pandas/pandas/pandas/_libs/writers.pyx:123:50: Unknown type declaration 'Py_ssize_t' in annotation, ignoring

@mroeschke mroeschke added the IO CSV read_csv, to_csv label Aug 28, 2023
@mroeschke mroeschke requested a review from WillAyd as a code owner August 28, 2023 16:10
@WillAyd
Copy link
Member

WillAyd commented Aug 28, 2023

Instead of importing like this can we namespace it? I'm a little wary of how confusing this is with the c type

@mroeschke
Copy link
Member Author

Is that the general way we should be import Py_ssize_t? We import like this in a few places

% grep -R --include="*.pyx" "from cython cimport Py_ssize_t"
./pandas/_libs/sas.pyx:from cython cimport Py_ssize_t
./pandas/_libs/interval.pyx:from cython cimport Py_ssize_t
./pandas/_libs/join.pyx:from cython cimport Py_ssize_t
./pandas/_libs/byteswap.pyx:from cython cimport Py_ssize_t
./pandas/_libs/properties.pyx:from cython cimport Py_ssize_t
./pandas/_libs/reshape.pyx:from cython cimport Py_ssize_t
./pandas/_libs/missing.pyx:from cython cimport Py_ssize_t
./pandas/_libs/tslibs/fields.pyx:from cython cimport Py_ssize_t
./pandas/_libs/tslibs/tzconversion.pyx:from cython cimport Py_ssize_t
./pandas/_libs/tslibs/parsing.pyx:from cython cimport Py_ssize_t
./pandas/_libs/algos.pyx:from cython cimport Py_ssize_t
./pandas/_libs/internals.pyx:from cython cimport Py_ssize_t
./pandas/_libs/ops.pyx:from cython cimport Py_ssize_t
./pandas/_libs/parsers.pyx:from cython cimport Py_ssize_t

(if so might be good for a follow up?)

@WillAyd
Copy link
Member

WillAyd commented Aug 28, 2023

Ah I see. Carry on then - lgtm

@mroeschke mroeschke added this to the 2.2 milestone Aug 28, 2023
@mroeschke mroeschke merged commit 4e622bb into pandas-dev:main Aug 28, 2023
@mroeschke mroeschke deleted the cy/import branch August 28, 2023 19:35
mroeschke added a commit to mroeschke/pandas that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants