PyPI / mypy-extensions / 1.1.0

mypy-extensions 1.1.0

Source
https://github.com/python/mypy_extensions
Artifact scanned
mypy_extensions-1.1.0-py3-none-any.whl (wheel · 4.8 KB · SHA-256 1be4cccdb0f2…)
Compared with
mypy_extensions-1.0.0-py3-none-any.whl (0 signals introduced since)
Files
1 scanned, 4 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 2 info
Scan time
3.0 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 2 of 2 warn and critical signals; 2 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 04:51

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info warn → info by review frame-introspection mypy_extensions.py:18:12

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        try:
            if sys._getframe(1).f_globals['__name__'] not in ['abc', 'functools', 'typing']:
                # Typed dicts are only for static structural subtyping.
                raise TypeError('TypedDict does not support instance and class checks')
    likely benign LLM, confidence 0.95 Frame introspection in mypy_extensions' TypedDict metaclass to restrict instance and class checks to the stdlib typing machinery.
    Reasoning

    This is the well-known mypy_extensions TypedDict metaclass guard that uses sys._getframe(1) to check the caller's module name and forbid isinstance/issubclass checks on TypedDict. It is a legitimate, documented pattern in a widely used typing library, with no decoding, execution, or network activity.

  2. info warn → info by review frame-introspection mypy_extensions.py:41:28

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            # Setting correct module is necessary to make typed dict classes pickleable.
            ns['__module__'] = sys._getframe(1).f_globals.get('__name__', '__main__')
        except (AttributeError, ValueError):
            pass
    likely benign LLM, confidence 0.95 Reads the caller's module name via sys._getframe to set __module__ on a generated TypedDict class for pickle compatibility.
    Reasoning

    This sets the __module__ of a dynamically created TypedDict class from the caller's frame globals so that pickling works. It is standard, benign library code inside a try block that tolerates AttributeError and ValueError. Nothing here is obfuscated or malicious.

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.3.0
curl -fsSL -o mypy_extensions-1.1.0-py3-none-any.whl https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl
printf '%s  %s\n' 1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505 mypy_extensions-1.1.0-py3-none-any.whl | shasum -a 256 -c -
unzip -q mypy_extensions-1.1.0-py3-none-any.whl -d pkg
disclude scan --untrusted --severity info pkg