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

0.28b1: (spurious?) Warning when extension name deliberately doesn't match python name #2128

Closed
jamadden opened this issue Mar 4, 2018 · 1 comment

Comments

@jamadden
Copy link
Contributor

jamadden commented Mar 4, 2018

(First, let me say that Cython is fantastic. I've been using git checkouts of 0.28a much more in gevent 1.3a2 and it has led to many improvements. Thanks!)

One of the new features (called a bugfix) in Cython 0.28 is the ability to have an Extension that compiles a .py file to a different extension name (#2038). This is extremely useful for creating optional accelerator modules (especially on PyPy). gevent has been using it as such (and it's made my life much easier, thanks!).

However, when you do so, you get a warning:

# setup.py
from Cython.Build import cythonize
from setuptools import Extension

foo = Extension(name='_foo',
                sources=['foo.py'])

cythonize([foo])
$ python setup.py
Warning: Extension name '_foo' does not match fully qualified name 'foo' of 'foo.py'

Is this warning still necessary now that the generated code is correct? Or am I doing something wrong?

I could see the argument that in the usual case the warning could be useful to avoid mistakes, but then it would be nice to have a way to silence the warning when it's done deliberately.

If there's something easy to do here I could try to work up a PR.

@scoder scoder closed this as completed in f3d3f82 Mar 4, 2018
@scoder scoder added this to the 0.28 milestone Mar 4, 2018
@jamadden
Copy link
Contributor Author

jamadden commented Mar 4, 2018

Thanks!

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