D4936: Restore compile-time support for Python 3.4.3+

Francis Herne noreply at phabricator.kde.org
Sat Mar 4 19:05:09 UTC 2017


flherne created this revision.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  Since https://phabricator.kde.org/R53:6d0b76463b6d6d1d94d39327bae7ca28fa585e43 (~5.0-beta1) the minimum Python version has been 3.5.0,
   but OpenSUSE Leap want to use KDevelop 5 and still have Python 3.4.
  
  There are major breaking changes between 3.4.2 and 3.4.3, so earlier
   versions will not be supported.
  
  Now supported are 3.4.3+, 3.5.x and 3.6.x.
  
  Syntax from Python versions newer than the one kdev-python is compiled
   against will not be recognised and will cause false-positive errors
   to be displayed to users. Please use the most recent version unless
   there are unavoidable reasons to use an older one.
  
  ---------
  
  In function calls:
  
  - 'stararg' is replaced by a StarredAst at the end of 'arguments'.
  - 'kwargs' is replaced by a KeywordAst at the end of 'keywords'.
  
  A new CODE block in python36.sdef converts 3.4-style AST to the newer
   format used by Python 3.5+ and within kdev-python. The conversion
   script is tweaked to allow both CODE and SINCE on the same line, and
   a new BEFORE directive (inverse of SINCE).
  
  Operator @ (__matmul__) is inserted into the middle of the enum, so all
   operators listed later have a different index.
  
  All other AST changes are just new additions.

TEST PLAN
  No new tests. No test changes with Python 3.5+.
  All tests pass with 3.4 except those using newer syntax.

REPOSITORY
  R53 KDevelop: Python Support

REVISION DETAIL
  https://phabricator.kde.org/D4936

AFFECTED FILES
  CMakeLists.txt
  duchain/tests/pyduchaintest.cpp
  parser/ast.h
  parser/conversionGenerator.py
  parser/generated.h
  parser/python36.sdef
  parser/tests/pyasttest.cpp

To: flherne, brauch
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170304/b0b7dbac/attachment.html>


More information about the KDevelop-devel mailing list