You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see this in Python 3.6 test suites. Is this safe to ignore or should be fixed somehow? Should we move this to astropy-helpers? I am not sure where this is coming from.
Maybe we can do something about these? Like a specific version of Cython that doesn't have this issue when I do the release? (still no Cython installed here though, this is with pip installed 2.0rc1).
bsipocz@tegla2:~$ PYTHONWARNINGS='error::ImportWarning' python3.6 -c 'import astropy;astropy.test()'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/sw/lib/python3.6/site-packages/astropy/utils/decorators.py", line 874, in test
func = make_function_with_signature(func, name=name, **wrapped_args)
File "/sw/lib/python3.6/site-packages/astropy/tests/runner.py", line 225, in test
return runner.run_tests(**kwargs)
File "/sw/lib/python3.6/site-packages/astropy/tests/runner.py", line 517, in run_tests
from ..table import Table # pylint: disable=W0611
File "/sw/lib/python3.6/site-packages/astropy/table/__init__.py", line 44, in <module>
from .column import Column, MaskedColumn, StringTruncateWarning, ColumnInfo
File "/sw/lib/python3.6/site-packages/astropy/table/column.py", line 28, in <module>
from .np_utils import fix_column_name
File "/sw/lib/python3.6/site-packages/astropy/table/np_utils.py", line 19, in <module>
from . import _np_utils
File "astropy/table/_np_utils.pyx", line 8, in init astropy.table._np_utils (astropy/table/_np_utils.c:5760)
ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
There was a fix in Cython 0.27 but disabled since ("Reopening since the implementation in 0.27.0 is not complete and was disabled in 0.27.1" : cython/cython#1715).
This is only to bump this issue: i have just started a fresh install in the course of upgrading from 2.7 to 3.6, and am encountering this error. It seems only to throw a warning; i have not noticed any other adverse effects.
Yes, you can certainly ignore this warning. Ultimately this will go away seamlessly once addressed upstream (and we just keep it open in the meantime to avoid duplicate reports opened for it).
This is OBE since astropy no longer supports Python 3.6, and I can't reproduce it. There is a similar/maybe related issue at pypa/setuptools#1111 which I can see if I set -Werror::ImportWarning but the issue is already worked around upstream, and is only a problem when I explicitly convert the warning to an error.
@saimn - Cython hasn't been pinned to a minimum version in our tox, would you think we should just do that, even though it's not necessarily a requirement in setup.cfg?
OK, fair enough, so we won't fail for building astropy, but could run into the issue when using a binary of other packages that might have been built with older versions?
Activity
bsipocz commentedon Jun 26, 2017
@pllim - do you still see this? (I'm not sure what the problem was here, but maybe the helpers update had a good side effect...)
pllim commentedon Jun 27, 2017
I'll check when I get the chance and let you know. 😄
saimn commentedon Jun 27, 2017
I also see these warnings, so did a quick debugging:
It is a Cython issue (cython/cython#1753 , cython/cython#1720) related to a new warning in Python 3.6 (http://bugs.python.org/issue25791).
cython/cython#1720 gives some workaround, i will try.
saimn commentedon Jun 27, 2017
Hmm, adding the
from __future__ import absolute_importdoes not work, the warning is triggered by Cython itself.pllim commentedon Jun 28, 2017
Wow, good investigative work, @saimn !
pllim commentedon Jun 28, 2017
So, since this is caused by bug upstream, should we close this issue here?
bsipocz commentedon Jun 29, 2017
Hmm, some of these may come from Cython, but the ones in #6303 are definitely not as I don't have Cython installed there while I was testing the RC.
bsipocz commentedon Jun 29, 2017
Maybe we can do something about these? Like a specific version of Cython that doesn't have this issue when I do the release? (still no Cython installed here though, this is with pip installed 2.0rc1).
saimn commentedon Jun 29, 2017
I think it happens inside the C code generated by Cython (see
astropy/table/_np_utils.c:5760above), so even if you don't have Cython installed.saimn commentedon Jun 29, 2017
re @pllim :
The workarounds didn't work for me, and it seems not so easy to fix on Cython's side, so maybe the warning could be filtered ?
5 remaining items
pllim commentedon Nov 30, 2017
I think this is still an issue until it is fixed upstream, so keeping this open for now.
saimn commentedon Nov 30, 2017
There was a fix in Cython 0.27 but disabled since ("Reopening since the implementation in 0.27.0 is not complete and was disabled in 0.27.1" : cython/cython#1715).
entaylor commentedon Jan 5, 2018
This is only to bump this issue: i have just started a fresh install in the course of upgrading from 2.7 to 3.6, and am encountering this error. It seems only to throw a warning; i have not noticed any other adverse effects.
bsipocz commentedon Jan 5, 2018
Yes, you can certainly ignore this warning. Ultimately this will go away seamlessly once addressed upstream (and we just keep it open in the meantime to avoid duplicate reports opened for it).
embray commentedon Jul 8, 2021
This is OBE since astropy no longer supports Python 3.6, and I can't reproduce it. There is a similar/maybe related issue at pypa/setuptools#1111 which I can see if I set
-Werror::ImportWarningbut the issue is already worked around upstream, and is only a problem when I explicitly convert the warning to an error.pllim commentedon Jul 8, 2021
We no longer see it because we are ignoring it in pytest.
astropy/setup.cfg
Line 134 in a97b833
Does this mean we can remove this from ignore list?
bsipocz commentedon Jul 8, 2021
IMO we should remove it from the ignore list, or not close but update the description here if the warning is still raised in newer versions
pllim commentedon Jul 8, 2021
Testing in #11928 🤞
saimn commentedon Jul 8, 2021
It seems this was fixed in Cython 0.29 : https://github.com/cython/cython/blob/master/CHANGES.rst#029-2018-10-14
bsipocz commentedon Jul 8, 2021
@saimn - Cython hasn't been pinned to a minimum version in our tox, would you think we should just do that, even though it's not necessarily a requirement in setup.cfg?
saimn commentedon Jul 8, 2021
@pllim - It is pinned in
pyproject.toml.bsipocz commentedon Jul 8, 2021
OK, fair enough, so we won't fail for building astropy, but could run into the issue when using a binary of other packages that might have been built with older versions?
saimn commentedon Jul 8, 2021
Sorry I thought it was pllim above 😁
Yes I guess this could happen, but the cython releases is old enough now that we should be safe.