Skip to content

Supporting feature_version=... #124

@gvanrossum

Description

@gvanrossum

Split off #95 -- this is a separate task.

Passing feature_version=(3, N) (or feature_version=N) to ast.parse() enables a few changes in the tokenizer and ast.c to support older Python versions. The primary motivation is to handle the three different stages of support for the async and await keywords, which is required by mypy.

Most of the logic is in the tokenizer, but we'll have to check ast.c for other tests for feature_version (e.g. there's also a test for @, the matrix multiply operator).

Metadata

Metadata

Assignees

Labels

3.9.0b1Needs to be fixed/implemented until the 3.9.0b1 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions