Skip to content

inspect.getfullargspec still needs from __future__ import annotations #149975

@bersbersbers

Description

@bersbersbers

Bug report

Bug description:

This issue arose from micheles/decorator#177. In essence, inspect.getfullargspec still needs from __future__ import annotations. Example:

from inspect import getfullargspec
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from collections.abc import Sequence

def foo(ints: Sequence[int]) -> None:
    pass

print(getfullargspec(foo))
# TypeError: unsupported callable

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions