Summary: | Fails to build against Python 3.8 | ||
---|---|---|---|
Product: | [Developer tools] kdev-python | Reporter: | Jan Grulich <jgrulich> |
Component: | Language support | Assignee: | Francis Herne <mail> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | geiger.david68210, heiko.becker, johnz, mail |
Priority: | HI | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/kde/kdev-python/commit/e23fa8f15af89a8bd4bd84dd96b5fd7017457516 | Version Fixed In: | 5.5.0 |
Bug Depends on: | |||
Bug Blocks: | 419290 |
Description
Jan Grulich
2019-09-16 08:54:11 UTC
As usual, the ast API in 3.8 has incompatible changes. I'm looking at it now. Same issue here on Mageia Cauldron with Python 3.8. Git commit e23fa8f15af89a8bd4bd84dd96b5fd7017457516 by Francis Herne. Committed on 23/10/2019 at 14:08. Pushed by flherne into branch 'master'. Initial Python 3.8 support. This allows kdev-python to be built and run against CPython 3.8, and if so to parse files containing 3.8 syntax. FIXED-IN: 5.5.0 M +2 -2 CMakeLists.txt M +9 -1 duchain/declarationbuilder.cpp M +1 -0 duchain/declarationbuilder.h M +4 -0 duchain/expressionvisitor.cpp M +1 -0 duchain/expressionvisitor.h M +19 -0 duchain/tests/pyduchaintest.cpp M +6 -1 parser/ast.cpp M +9 -0 parser/ast.h M +6 -0 parser/astbuilder.cpp M +6 -0 parser/astdefaultvisitor.cpp M +2 -0 parser/astdefaultvisitor.h M +1 -0 parser/astvisitor.cpp M +1 -0 parser/astvisitor.h M +7 -4 parser/conversionGenerator.py M +36 -0 parser/generated.h R +49 -6 parser/python38.sdef [from: parser/python36.sdef - 082% similarity] M +5 -0 parser/tests/pyasttest.cpp https://invent.kde.org/kde/kdev-python/commit/e23fa8f15af89a8bd4bd84dd96b5fd7017457516 Note: the patch linked also applies cleanly against 5.4.x, pending a 5.5 release. Testing now. Confirmed on Mageia Cauldron that now kdev-python build against python 3.8. Thanks! The PyKDE4 documentation (khtml.py and kdecore.py) still contain invalid syntax for python 3.8 kdevelop-python-5.4.2_2: configuring ... Byte-compiling python code in usr/share/kdevpythonsupport... *** Error compiling 'usr/share/kdevpythonsupport/documentation_files/PyKDE4/kdecore.py'... File "usr/share/kdevpythonsupport/documentation_files/PyKDE4/kdecore.py", line 315 def setExecutesAsync(self, async): ^ SyntaxError: invalid syntax *** Error compiling 'usr/share/kdevpythonsupport/documentation_files/PyKDE4/khtml.py'... File "usr/share/kdevpythonsupport/documentation_files/PyKDE4/khtml.py", line 1622 def async(self): ^ SyntaxError: invalid syntax And a bunch of warnings for others: usr/share/kdevpythonsupport/documentation_files/numpy.py:33741: SyntaxWarning: 'NoneType' object is not callable; perhaps you missed a comma? return None() Those files should not be byte-compiled. They are never intended to be executed; kdev-python parses them as-is to provide information about the relevant modules. Compiling or executing them in any other way will not do anything useful and may cause problems. |