PyPI / google-genai / 2.33.0

google-genai 2.33.0

Source
https://github.com/googleapis/python-genai
Artifact scanned
google_genai-2.33.0-py3-none-any.whl (wheel · 1.2 MB · SHA-256 f3f8ab696b35…)
Compared with
google_genai-2.32.0-py3-none-any.whl (0 signals introduced since)
Files
596 scanned, 5 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 16 info
Scan time
11.7 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 13 of 13 warn and critical signals; 13 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 16:12

Signals

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

  1. info warn → info by review dynamic-attribute google/genai/__init__.py:51:5

    reach-by-name through `globals` (ast pass, confidence 0.60)

        module = importlib.import_module(f'.{name}', __name__)
        globals()[name] = module
        return module
      raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
    dismissed LLM, confidence 0.92 Lazy submodule loader implemented via module __getattr__ that caches results in globals().
    Reasoning

    This is the standard PEP 562 module-level __getattr__ pattern: it lazily imports a submodule by name, caches it in globals(), and raises AttributeError otherwise. The import target is a relative submodule of the same package, so nothing here is hidden or dangerous.

  2. info warn → info by review frame-introspection google/genai/_replay_api_client.py:211:19

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

      """Prints the current file path and line number."""
      current_frame = inspect.currentframe()
      if (
          current_frame is not None
    dismissed LLM, confidence 0.90 Debug helper that prints the current file and line number using frame introspection.
    Reasoning

    inspect.currentframe() is used only to read the caller's file path and line number for a debug print. This is ordinary logging/diagnostic code with no execution or exfiltration.

  3. info warn → info by review frame-introspection google/genai/tests/common/test_common.py:53:17

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

      with warnings.catch_warnings(record=True) as captured_warnings:
        call_line = inspect.currentframe().f_lineno + 1
        func()
    dismissed LLM, confidence 0.92 Test code that reads the caller's line number to check where a warning was raised.
    Reasoning

    In a test helper, the frame's line number is taken so the test can assert which line emitted a warning. This is a routine testing technique.

  4. info warn → info by review encoding-hex google/genai/tests/models/test_compute_tokens.py:84:69

    16 consecutive `\xNN` escapes (entropy 3.8 bits/byte) (raw pass, confidence 0.65)

            decoded_tokens
            == b'\xe8\xbf\x99\xe6\x98\xaf\xe4\xb8\x80\xe6\x9d\xa1unicode\xe6\xb5\x8b\xe8\xaf\x95\xf0\x9f\xa4\xaa\xe2\x9d\xa4\xe2\x98\x85'
        )
        assert decoded_tokens.decode('utf-8') == _UNICODE_STRING
    dismissed LLM, confidence 0.93 Test assertion comparing decoded tokens to the UTF-8 bytes of a multilingual string.
    Reasoning

    The byte literal is the UTF-8 encoding of a Chinese/English/emoji test string, used to assert round-tripping of decoded tokens. Hex escapes for multibyte UTF-8 are the expected way to write such fixtures; there is no decoding or execution.

  5. info warn → info by review payload-bytes-literal google/genai/tests/transformers/test_bytes.py:8:5

    concatenated bytes literal contains 35 `\xNN` escapes (92% of content) — binary payload shape (ast pass, confidence 0.85)

    _RAW_BYTES = (
        b'\xfb\xf6\x9bq\xd7\x9f\x82\x18\xa3\x92Y\xa7\xa2\x9a\xab\xb2\xdb\xaf\xc3\x1c\xb3\x00\x10\x83\x10Q\x87'
        b' \x92\x8b0\xd3\x8fA\x14\x93QU\x97a\x9d5\xdb~9\xeb\xbf='
    )
    likely benign LLM, confidence 0.85 Test fixture containing a fixed binary byte sequence for bytes-transformer tests.
    Reasoning

    The bytes literal is an opaque binary fixture used to test bytes handling in transformers. The same fixture appears in several test files, consistent with shared test data. It is not executed or decoded into code.

  6. info warn → info by review payload-bytes-literal google/genai/tests/types/test_bytes_internal.py:36:5

    concatenated bytes literal contains 35 `\xNN` escapes (92% of content) — binary payload shape (ast pass, confidence 0.85)

    _RAW_BYTES = (
        b'\xfb\xf6\x9bq\xd7\x9f\x82\x18\xa3\x92Y\xa7\xa2\x9a\xab\xb2\xdb\xaf\xc3\x1c\xb3\x00\x10\x83\x10Q\x87'
        b' \x92\x8b0\xd3\x8fA\x14\x93QU\x97a\x9d5\xdb~9\xeb\xbf='
    )
    likely benign LLM, confidence 0.85 Test fixture with raw binary bytes for internal bytes type tests.
    Reasoning

    This is the same binary test fixture as in the other bytes tests, used to exercise internal bytes handling. Nothing in the snippet executes or decodes it into behavior.

  7. info warn → info by review payload-bytes-literal google/genai/tests/types/test_bytes_type.py:30:5

    concatenated bytes literal contains 35 `\xNN` escapes (92% of content) — binary payload shape (ast pass, confidence 0.85)

    _RAW_BYTES = (
        b'\xfb\xf6\x9bq\xd7\x9f\x82\x18\xa3\x92Y\xa7\xa2\x9a\xab\xb2\xdb\xaf\xc3\x1c\xb3\x00\x10\x83\x10Q\x87'
        b' \x92\x8b0\xd3\x8fA\x14\x93QU\x97a\x9d5\xdb~9\xeb\xbf='
    )
    likely benign LLM, confidence 0.85 Test fixture with raw binary bytes for bytes type tests.
    Reasoning

    The shared binary fixture is used as test data for the bytes type. It is passive data with no decoding, execution, or network activity.

  8. info warn → info by review dynamic-attribute google/genai/types.py:83:7

    reach-by-name through `globals` (ast pass, confidence 0.60)

        except ImportError:
          globals()[name] = None
          return None
        globals()[name] = ClientSession
    dismissed LLM, confidence 0.90 Optional-dependency lazy loader for ClientSession that caches the result in globals().
    Reasoning

    This is a lazy optional-import pattern: a module-level __getattr__ tries an import, caches None on ImportError, and otherwise caches the imported symbol in globals(). The names are fixed, package-internal MCP types, so this is a normal optional-dependency mechanism.

  9. info warn → info by review dynamic-attribute google/genai/types.py:85:5

    reach-by-name through `globals` (ast pass, confidence 0.60)

          return None
        globals()[name] = ClientSession
        return ClientSession
      if name == 'McpCallToolResult':
    dismissed LLM, confidence 0.90 Caches and returns the lazily imported ClientSession symbol.
    Reasoning

    Same optional-dependency lazy loading pattern: the imported ClientSession is cached in globals() and returned. Nothing suspicious is present.

  10. info warn → info by review dynamic-attribute google/genai/types.py:91:7

    reach-by-name through `globals` (ast pass, confidence 0.60)

        except ImportError:
          globals()[name] = None
          return None
        globals()[name] = CallToolResult
    dismissed LLM, confidence 0.90 Optional-dependency lazy loader for CallToolResult that caches the result in globals().
    Reasoning

    Standard optional-import fallback that sets None on ImportError and otherwise caches CallToolResult in globals(). This is ordinary lazy loading of an optional MCP dependency.

  11. info warn → info by review dynamic-attribute google/genai/types.py:93:5

    reach-by-name through `globals` (ast pass, confidence 0.60)

          return None
        globals()[name] = CallToolResult
        return CallToolResult
      if name == 'mcp_types':
    dismissed LLM, confidence 0.90 Caches and returns the lazily imported CallToolResult symbol.
    Reasoning

    Continues the same lazy-loading pattern for CallToolResult, returning the cached symbol. This is benign module plumbing.

  12. info warn → info by review dynamic-attribute google/genai/types.py:99:7

    reach-by-name through `globals` (ast pass, confidence 0.60)

        except ImportError:
          globals()[name] = None
          return None
        globals()[name] = mcp_types
    dismissed LLM, confidence 0.90 Optional-dependency lazy loader for the mcp_types module that caches the result in globals().
    Reasoning

    Same optional-import pattern for the mcp_types module, with None on ImportError and caching in globals(). This is normal lazy loading and not a dropper.

  13. info warn → info by review dynamic-attribute google/genai/types.py:101:5

    reach-by-name through `globals` (ast pass, confidence 0.60)

          return None
        globals()[name] = mcp_types
        return mcp_types
      raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
    dismissed LLM, confidence 0.90 Caches and returns the lazily imported mcp_types module, else raises AttributeError.
    Reasoning

    The module-level __getattr__ caches and returns mcp_types, then raises AttributeError for unknown names. This is the standard way to lazily expose optional modules.

  14. info high-complexity google/genai/types.py:829:6

    compression ratio 0.881 is >2σ above file mean 0.681 (raw pass, confidence 0.50)

      REGEX_CONTAINS = 'REGEX_CONTAINS'
      """Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`."""
      PARTIAL_MATCH = 'PARTIAL_MATCH'
  15. info high-complexity google/genai/types.py:15245:22

    compression ratio 0.824 is >2σ above file mean 0.681 (raw pass, confidence 0.50)

          default=None,
          description="""Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.""",
      )
  16. info high-complexity google/genai/types.py:15256:6

    compression ratio 0.824 is >2σ above file mean 0.681 (raw pass, confidence 0.50)

      input_uri: Optional[str]
      """Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`."""

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 google_genai-2.33.0-py3-none-any.whl https://files.pythonhosted.org/packages/ba/3b/9ae8e16c5b2177bfdec1c64769a93eea9093de684e0bbb95c10c77645fef/google_genai-2.33.0-py3-none-any.whl
printf '%s  %s\n' f3f8ab696b35caf95c222e05268740c1ccd6934257890506be73b126150d3b14 google_genai-2.33.0-py3-none-any.whl | shasum -a 256 -c -
unzip -q google_genai-2.33.0-py3-none-any.whl -d pkg
disclude scan --untrusted --severity info pkg