Skip to content

Inconsistent use of generics in type hints causes issues in Python 3.8 #2313

Closed
@OYCN

Description

@OYCN

Hi,

I've noticed that the codebase currently mixes built-in generics (e.g., list, set, dict) with typing module equivalents (e.g., List, Set, Dict) in type hints. This leads to runtime errors when using Python 3.8, where native generics like set[Tuple[str, Optional[int]]] are not yet supported.

UsedOpsets = set[Tuple[str, Optional[int]]]

SymbolicValue = Union[ir.Value, list[ir.Value], ir.Shape]

Is there any plan to:

  • Drop support for Python 3.8, or
  • Update type hints to consistently use typing generics for compatibility?

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