Skip to content

Python issue with import from typing #2611

@ImanHosseini

Description

@ImanHosseini

Python's TextIO used to be in typing.io so you would do:

from typing.io import TextIO

Since Python 3.6, TextIO is now in typing directly so the above (which ANTLR does) would trigger an error, it should be changed to [for 3.6+]:

from typing import TextIO

(also the underlying reason for #2193)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions