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

Recommend ast on Python 3.8+ #173

Merged
merged 3 commits into from Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
5 changes: 3 additions & 2 deletions setup.py
Expand Up @@ -90,8 +90,9 @@
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`.
On the other hand, `typed_ast` does not support Python 3.8 or higher code.
hauntsaninja marked this conversation as resolved.
Show resolved Hide resolved
We recommend to use `ast` on Python 3.8 or above.
""".strip()

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