Support for Python 3.10 syntax

Hi, what is the timeline for Python 3.10 syntax support?

This is a big Python release that has several syntax improvements:
https://docs.python.org/3.10/whatsnew/3.10.html

https://bugs.python.org/issue12782

For example this valid python 3.10 code results in a python:ParsingError with SonarCloud:

def py310(pattern: str):
    match pattern.split('/'):
        case ('bar', 'foo'):
            print('bar first')
        case ('foo', 'bar'):
            print('foo first')
        case _:
            print('no match')

I understand that all these changes might not be readily supported in SonarCloud but a timeline will help us schedule our own upgrade to Python 3.10.

Thank you.

@Andrea_Guarino, @pynicolas FYI ^

Hey @sodul,

I can tell you that it’s on our radar for this quarter.

2 Likes

Hello @sodul ,
Thank you for your suggestion.
SonarCloud Python analyzer now supports Python 3.10 syntax
Don’t hesitate to give us more feedback :slight_smile:

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.