Skip to content

Segmentation fault for TypeVar("T", bound=Callable[..., "T"]) #16940

Open
@g-braeunlich

Description

@g-braeunlich

Crash Report

mypy runs into a segfault when using a TypeVar like this:

T = TypeVar("T", bound=Callable[..., "T"])

Traceback

Unfortunately, nothing useful shows up:

$ mypy --show-traceback /tmp/err.py 
Segmentation fault

To Reproduce

$ mypy /tmp/err.py 
Segmentation fault
from typing import TypeVar
from collections.abc import Callable

T = TypeVar("T", bound=Callable[..., "T"])

Your Environment

  • Mypy version used: mypy 1.8.0 (compiled: yes)
  • Mypy command-line flags: mypy /tmp/err.py
  • Mypy configuration options from mypy.ini (and other config files): none
  • Python version used: Python 3.11.7
  • Operating system and version: Calculate Linux Desktop 23 Cinnamon (Distributor ID: Gentoo)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions