PyPI / typing-extensions / 4.16.0
typing-extensions 4.16.0
- Source
- https://github.com/python/typing_extensions
- Tag scanned
4.16.0- Compared with
4.15.0(1 signals introduced since)- Files
- 12 scanned, 5 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 12 info
- Scan time
- 9.4 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 12 of 12 warn and critical signals; 12 demoted to info.
- Disclude version
- 4.1.0
- Scanned (UTC)
- 2026-10-21 20:04
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
info
critical→ info by reviewframe-introspectionsrc/typing_extensions.py:170:16new in this releasereturn # For platforms without _getframe() passlikely benign Caller-module lookup via sys._getframe with AttributeError and ValueError handling.Reasoning
This is the standard fallback for sys._getframe in typing_extensions, used to find the caller's module name for deprecation or default module handling. Its exceptions are caught and it is widely used in stdlib-style code. The anti-analysis label is a false positive from the co-occurrence of sys.exit or exec elsewhere in the file.
-
)likely benign exec of a locally built test snippet in a typing_extensions test.Reasoning
The file is the typing_extensions test suite. The exec(code, {}) call runs a locally built code string to check error messages when subclassing, a common test technique. The pickle import is incidental and the snippet shows no payload decoding.
-
)likely benign Same exec call in the typing_extensions test suite, flagged as dynamic execution.Reasoning
This is the dynamic-execution signal on the same exec(code, {}) call. It runs test-generated code in an empty namespace inside a unit test, consistent with testing typing behavior.
-
likely benign exec of a dedented test class definition gated by Python version.
Reasoning
The exec wraps a textwrap.dedent of a literal class definition gated on Python version, a standard pattern for testing syntax that older interpreters cannot parse. Nothing in the snippet is obfuscated or reaches the network.
-
likely benign exec of literal test code defining a PEP 695 generic protocol.
Reasoning
The exec runs a literal dedented test string defining a generic protocol, gated by hasattr(typing, 'TypeAliasType'). This is version-conditional test scaffolding in a typing library's test suite.
-
= returnlikely benign Test helper that execs class source in a namespace and returns the class.Reasoning
The helper builds a namespace and execs a code string, returning the named class. This is a test utility for creating classes from source. The namespace is local and nothing in the snippet suggests malicious intent.
-
likely benign Test runs the interpreter with -OO on a file via a shell command.
Reasoning
shell=True is used with an f-string of sys.executable, the -OO flag and a test file path. The inputs are internal, not attacker-controlled, and the call sits in a test checking optimized-mode behavior. It is poor practice but not malicious.
-
)likely benign exec of test code in a typing_extensions test for no-bivariant behavior.Reasoning
This is the same exec(code, {}) test pattern as the other findings in the typing_extensions test suite, here testing no-bivariant behavior.
-
=likely benign exec of a literal PEP 695 class definition in a test.Reasoning
A literal textwrap.dedent string defining a PEP 695 generic class is exec'd in a test namespace. This is standard version-gated test code for the typing library.
-
= # - Catch AttributeError: not all Python implementations have sys._getframe() # - Catch ValueError: maybe we're called from an unexpected modulelikely benign Frame lookup for caller module in typing_extensions, guarded for portability.Reasoning
sys._getframe(2) is used to locate the calling module for a typing construct, with comments explaining the AttributeError and ValueError handling for other implementations. This is ordinary library code, not anti-analysis.
-
= returnlikely benign eval of string annotations during type hint resolution.Reasoning
eval is applied to string annotation values inside get_type_hints-style evaluation, which is the documented behavior of forward references in the typing module. The inputs are source annotations, not untrusted network data, so this matches the library's intended design.
-
= = = True =likely benign Evaluation of a ForwardRef's compiled code during type resolution.Reasoning
This evaluates a ForwardRef's compiled code object with supplied globals and locals to resolve its value. This is the standard forward-reference evaluation in typing, and the code comes from annotations in the source, not from an external payload.
Reproduce This Scan
Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
&&