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 in setting __module__ #985
Comments
@bhy commented This is due to PyFunction_New creates the PyFunction with the module set as NULL. We should call PyFunction_NewEx, which accepts a PyObject as module name. |
@bhy changed cc to |
@robertwb commented It may be worth creating the PyObject? module name at module load time (do we do that already), and simply re-using that, rather than re-creating it for every function. Binding functions need to be changed as well. |
@bhy changed owner from Patch for review: |
@bhy changed resolution to |
I seem to still see this in cython 0.29.32 (it's fixed in Cython-3.0.0a11) |
ah this only applies to cdef classes eg: import cython
@cython.cclass
class Function:
@cython.ccall
def evaluate(self, x: float) -> float:
return 0 I get the
but not in 0.29.32:
|
ah it's the compiler directive http://docs.cython.org/en/latest/src/userguide/source_files_and_compilation.html#compiler-directives #1750 (comment) |
At 2010-05-17T10:33:38Z @bhy added attachment fix_T422.patch
Migrated from http://trac.cython.org/ticket/422
The text was updated successfully, but these errors were encountered: