PyPI / polars / 2.1.0

polars 2.1.0

Source
https://github.com/pola-rs/polars
Artifact scanned
polars-2.1.0-py3-none-any.whl (wheel · 890.1 KB · SHA-256 63c50ce3533f…)
Compared with
polars-2.0.0-py3-none-any.whl (0 signals introduced since)
Files
221 scanned, 5 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 1 warn · 5 info
Scan time
10.2 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 6 of 6 warn and critical signals; 5 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-27 18:12

Signals

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

  1. warn dynamic-execution polars/io/delta/_dataset.py:174:37

    `eval` called on a non-literal expression (ast pass, confidence 0.70)

    
                    pa_predicate_expr = eval(
                        pyarrow_predicate,
                        {
    likely benign LLM, confidence 0.60 Evaluates a predicate string with a restricted namespace to build a pyarrow filter expression.
    Reasoning

    eval is applied to a pyarrow predicate string with a restricted globals dictionary. Evaluating predicate strings is a known risk, but here it appears to translate a filter expression from the Delta table into a pyarrow expression, which is the expected behaviour. The snippet is truncated and does not show the source of the string.

  2. info warn → info by review frame-introspection polars/_utils/various.py:520:19

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

    
        stack_frame = inspect.currentframe()
        stack_frame = getattr(stack_frame, "f_back", None)
        try:
    likely benign LLM, confidence 0.90 Reads the caller's stack frame via inspect.currentframe and f_back.
    Reasoning

    inspect.currentframe followed by f_back is a standard way to look up the calling frame. The snippet shows no decoding, process spawning, or network access, so this is ordinary library introspection.

  3. info critical → info by review dynamic-execution polars/_utils/various.py:676:17

    `subprocess.run` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)

                    cmd = cmd.replace("%file%", file.name)
                    subprocess.run(cmd, shell=True)
                return None
    likely benign LLM, confidence 0.70 Runs a configured shell command template with a temporary file substituted in, likely to open the file in a viewer.
    Reasoning

    subprocess.run with shell=True runs a command built from a template where %file% is replaced by a temp file name. This looks like a user-configured viewer or open command, which is a legitimate pattern. Shell=True with a non-literal string is still risky, and the snippet does not show where cmd comes from, so this is not fully settled.

  4. info warn → info by review frame-introspection polars/_warnings.py:21:13

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

        # https://stackoverflow.com/questions/17407119/python-inspect-stack-is-slow
        frame = inspect.currentframe()
        n = 0
        try:
    likely benign LLM, confidence 0.90 Walks the call stack with currentframe to find the warning stack level.
    Reasoning

    The comment links to a Stack Overflow discussion on inspect.stack being slow, and the code walks frames with a counter. This is the usual approach for choosing the stacklevel of a warning. No malicious behaviour is visible.

  5. info warn → info by review frame-introspection polars/functions/col.py:387:21

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

    
                frame = inspect.currentframe()
                while frame is not None:
                    if (frame := frame.f_back) is not None:
    likely benign LLM, confidence 0.85 Iterates up the call stack via f_back to inspect calling frames.
    Reasoning

    A loop over frame.f_back until None is a caller-walking pattern, here used to inspect the calling context. Nothing in the snippet is dynamic execution or exfiltration.

  6. info critical → info by review dynamic-import polars/io/database/_executor.py:141:15

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

            """Check the module version against a minimum required version."""
            mod = __import__(module_name)
            with suppress(AttributeError):
                module_version: tuple[int, ...] | None = None
    likely benign LLM, confidence 0.80 Dynamically imports a database driver module by name to check its version.
    Reasoning

    __import__ is used to load a driver module for a version check, wrapped in suppress(AttributeError). The module_name is presumably drawn from a fixed set of known database driver names, which is a common pattern for optional dependencies. The snippet does not show the source of module_name, so this is not fully certain.

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 polars-2.1.0-py3-none-any.whl https://files.pythonhosted.org/packages/d5/d4/e696a46c74ec8cac6434764deaf72f7edcc2e91c2145a9b3f61900a7aa7a/polars-2.1.0-py3-none-any.whl
printf '%s  %s\n' 63c50ce3533f5a03d17c3a2a24f1d0e0c7eda98fbde4268a3cba900d34060e67 polars-2.1.0-py3-none-any.whl | shasum -a 256 -c -
unzip -q polars-2.1.0-py3-none-any.whl -d pkg
disclude scan --untrusted --severity info pkg