Bug 396849

Summary: Parsing valid Python 3.6 f-string syntax fails with "invalid syntax"
Product: [Developer tools] kdev-python Reporter: Matěj Laitl <matej>
Component: Language supportAssignee: Sven Brauch <mail>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.2.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Matěj Laitl 2018-07-25 14:27:36 UTC
Python 3.6 introduced new string formatting syntax, f-strings: https://docs.python.org/3/reference/lexical_analysis.html#f-strings, e.g.

number = 42
message = f'there is {number} apples'

This doesn't seem to be supported, at least with my setup. Is there some setting/configuration/unreleased version that could help?
Comment 1 Sven Brauch 2018-07-25 14:29:20 UTC
What linux distro is your package from? It seems like they built it against Python 3.5.
Comment 2 Matěj Laitl 2018-07-25 15:13:36 UTC
(In reply to Sven Brauch from comment #1)
> What linux distro is your package from? It seems like they built it against
> Python 3.5.

Gentoo, so it is my fault, because you can set Python version to build against and I've indeed build kdev-python against 3.5.

I'll rebuild, confirm, then close this.

Thanks for quick help, Sven!
Comment 3 Matěj Laitl 2018-07-25 15:18:44 UTC
Rebuilding indeed help.

Thanks and keep up the good work! :)