-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
ENH: port time.pxd from cython #45864
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, looks like this doesn't build on windows?
building 'pandas._libs.tslibs.ctime' extension
ctime.c
pandas\_libs/tslibs/ctime.c(2383): error C2039: 'tm_zone': is not a member of 'tm'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\corecrt_wtime.h(26): note: see declaration of 'tm'
pandas\_libs/tslibs/ctime.c(2383): error C2198: 'PyBytes_FromString': too few arguments for call
pandas\_libs/tslibs/ctime.c(2386): error C2039: 'tm_gmtoff': is not a member of 'tm'
C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt\corecrt_wtime.h(26): note: see declaration of 'tm'
pandas\_libs/tslibs/ctime.c(2386): error C2198: '__Pyx_PyInt_From_long': too few arguments for call
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
Well that doesn't look good. @scoder area the analogous tests not run on any windows builds in the cython CI? |
https://github.com/cython/cython/blob/f0ccd6851e80654585fa6acb7a0626bf615857fe/Cython/Includes/libc/time.pxd Note that the field declarations shouldn't hurt as long as you're not trying to (auto-)convert the struct into a Python dict. So you can probably get by with adapting the |
|
Thanks @jbrockmendel |
* ENH: port time.pxd from cython * update API test * manually convert to dict for windows compat * mypy fixup
Until cython3 is out, we port it here. This will allow a cython implementation of dateutil's tzlocal, which will [yak-shaving] for non-nano dt64/td64.