Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Commit

Permalink
Recommend ast on Python 3.8+ (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
srittau committed Nov 10, 2021
1 parent 1232867 commit 129b2b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Expand Up @@ -9,8 +9,9 @@ parser similar to the standard `ast` library. Unlike `ast` up to Python 3.7, th
comments and are independent of the version of Python under which they are run.
The `typed_ast` parsers produce the standard Python AST (plus type comments),
and are both fast and correct, as they are based on the CPython 2.7 and 3.7
parsers. `typed_ast` runs on CPython 3.6-3.10 on Linux, OS X and Windows,
although starting with Python 3.8, we recommend to use the native `ast` parser
parsers. `typed_ast` runs on CPython 3.6-3.10 on Linux, OS X and Windows.

**Note:** Starting with Python 3.8, we recommend to use the native `ast` parser
(see below).

## Development Philosophy
Expand Down
6 changes: 4 additions & 2 deletions setup.py
Expand Up @@ -90,8 +90,10 @@
Python AST (plus type comments), and are both fast and correct, as they are
based on the CPython 2.7 and 3.7 parsers.
`typed_ast` does not support Python 3.8 or higher code. Use the `ast`
module from Python 3.8 or above for that.
**Note:** The `ast` module of Python 3.8+ supports all features of `typed_ast`.
`typed_ast` does not support parsing code that uses syntax introduced in
Python 3.8 onwards.
We recommend using `ast` on Python 3.8 or above.
""".strip()

_version_re = re.compile(r'__version__\s+=\s+(?P<version>.*)')
Expand Down

0 comments on commit 129b2b3

Please sign in to comment.