Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError under Python 3.9 #297

Closed
Zac-HD opened this issue May 14, 2020 · 3 comments
Closed

ImportError under Python 3.9 #297

Zac-HD opened this issue May 14, 2020 · 3 comments
Assignees

Comments

@Zac-HD
Copy link
Contributor

Zac-HD commented May 14, 2020

Via Zac-HD/stdlib-property-tests#12, attempting to import libcst fails on Python 3.9 with

Traceback (most recent call last):
  File "t.py", line 3, in <module>
    import libcst
  File "libcst/__init__.py", line 187, in <module>
    from libcst._parser.entrypoints import parse_expression, parse_module, parse_statement
  File "libcst/_parser/entrypoints.py", line 25, in <module>
    _DEFAULT_PARTIAL_PARSER_CONFIG: PartialParserConfig = PartialParserConfig()
  File "<string>", line 8, in __init__
  File "libcst/_parser/types/config.py", line 132, in __post_init__
    raise ValueError(
ValueError: LibCST can only parse code using one of the following versions of
		    Python's grammar: 3.0, 3.1, 3.3, 3.5, 3.6, 3.7, 3.8. More versions may 
		    be supported by future releases.

Given that I'm using libcst in hypothesmith to test (among other things) pre-release Python versions, it would be lovely if libcst defaulted to the newest known grammar on newer-than-known Python versions rather than raising an error on import 😄

@edison12a
Copy link

I'm getting this error too when using MonkeyType
cc: @carljm

@edison12a
Copy link

What can we do to make the change happen?
Does it need testing? expansion?
@jimmylai

@Zac-HD
Copy link
Contributor Author

Zac-HD commented Jul 30, 2020

Closed by #306.

(@thatch - the magic auto-close syntax only works in the PR description, not latter comments)

@Zac-HD Zac-HD closed this as completed Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants