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

Problems with "from xyz import *" #2621

Closed
AlexanderZvyagin opened this issue Sep 22, 2018 · 2 comments
Closed

Problems with "from xyz import *" #2621

AlexanderZvyagin opened this issue Sep 22, 2018 · 2 comments

Comments

@AlexanderZvyagin
Copy link

I have a problem with the following code:

from libc.math cimport NAN

# The file "empty.py" is really empty!!! 
# no problem, if the next line is commented out
from empty import *

cpdef float f():
    return NAN

And the compilation error message is:

cmsam/t.cpp: In function ‘int __pyx_import_star_set(PyObject*, PyObject*, char*)’:
cmsam/t.cpp:676:68: error: lvalue required as left operand of assignment
 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
                                                                    ^
cmsam/t.cpp:1071:11: note: in expansion of macro ‘__pyx_PyFloat_AsFloat’
     NAN = __pyx_PyFloat_AsFloat(o); if (unlikely((NAN == (float)-1) && PyErr_Occurred())) __PYX_ERR(1, 20, __pyx_L2_error)
           ^~~~~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1

This is a minor problem, I can perform explicit imports (without using "*").

Cython version '0.28.5'

@scoder scoder added this to the 0.29 milestone Sep 22, 2018
@scoder scoder closed this as completed in 2a8dd0c Sep 22, 2018
scoder added a commit that referenced this issue Sep 22, 2018
@scoder
Copy link
Contributor

scoder commented Sep 22, 2018

Thanks for the report. I've fixed it for 0.29.

@AlexanderZvyagin
Copy link
Author

wow, that was fast! :)

scoder added a commit that referenced this issue Sep 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants