Skip to content

pyi parser crashes on file that imports typing.Literal inside version check #757

@rchen152

Description

@rchen152

See python/typeshed#4807. The pytype test failed with the following error:

free(): invalid pointer
/home/runner/work/_temp/c2a28e77-7168-488e-8f26-da1cbba538c8.sh: line 1:  2734 Aborted                 (core dumped) ./tests/pytype_test.py

srittau fixed the failure with the following change: python/typeshed@02dfcc6, which modified:

if sys.version_info >= (3, 9):
    from typing import Literal

to:

from typing_extensions import Literal

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions