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
Signature error with exceptval #1913
Comments
A couple of remarks:
Since you have a .pxd, you don't need the Decorators at all. Well, not in a .py file, at least. Not sure about .pyx.
There's no use in typing "self" since its type is obvious.
@cython.locals() does not change the signature. That's a known limitation, can't look up the ticket right now.
|
This is in a pyx. The pxd file contains only the small subset of functions exported. In fact, under the status quo, the
Makes sense, thanks.
I'm not sure what to make of this. Elsewhere I've been using (in .pyx files)
interchangeably with
In some of these cases I haven't bothered putting |
May I ask why you seem to prefer the rather verbose decorator syntax over the (IMHO) much more concise dedicated Cython syntax in .pyx files? If I were to start using a more Python-compatible syntax in .pyx files, I'd certainly prefer the PEP-484 syntax over |
A big part of it at this point is just trying to understand what's going on. Until very recently I was having no luck getting coverage working in non-trivial cython code, so the main motivation was getting pure-python compatibility in order to get coverage statistics. (other tooling e.g. flake8 was/is part of the motivation, but a much lower priority).
I'm largely working on pandas and statsmodels, which still support py2. |
Question is, do they have to support it uncompiled? If it's enough to serve Py2 with Cython compiled modules, you can happily use Py3 syntax in them (and compile them with |
Just upgraded to 0.27.1, psyched to try out
@cython.exceptval
. Tried it out onpandas._libs.tslib._Timestamp._compare_outside_nanorange
:Existing:
New:
build_ext
complained that_compare_outside_nanorange
is not declared in the pxd file, so I added it:build_ext
now produces the error messageSignature not compatible with previous declaration
. AFAICT the signatures should be compatible; am I missing something?The text was updated successfully, but these errors were encountered: