ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Fix Released
|
Low
|
scoder |
Bug Description
Importing lxml.etree produces an ImportWarning on Python 3.6. These warnings are suppressed by default, so to see them you have to set PYTHONWARNINGS=
Steps to reproduce:
$ python3.6 -Wd
Python 3.6.0+ (default, Dec 27 2016, 08:48:59)
[GCC 6.2.0 20161005] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml.etree
...
return f(*args, **kwds)
Version information:
Python : sys.version_
lxml.etree : (4, 1, 1, 0)
libxml used : (2, 9, 7)
libxml compiled : (2, 9, 7)
libxslt used : (1, 1, 32)
libxslt compiled : (1, 1, 32)
Changed in lxml: | |
milestone: | none → 4.2.6 |
status: | Fix Committed → Fix Released |
If I set PYTHONWARNINGS= error:: ImportWarning, I can see a full traceback, which is:
File "<stdin>", line 1, in <module> etree.pyx" , line 93, in init lxml.etree _elementpath. py", line 56, in init lxml._elementpath
File "src/lxml/
File "src/lxml/