Comparing v1.19.0...v1.19.1 · python/mypy

Commits on Dec 13, 2025

  1. Configuration menu

    Browse the repository at this point in the history

  2. Fix crash on typevar with forward ref used in other module (#20334)

    Fixes #20326
    
    Type variables with forward references in upper bound are known to be
    problematic. Existing mechanisms to work with them implicitly assumed
    that they are used in the same module where they are defined, which is
    not necessarily the case for "old-style" type variables that can be
    imported.
    
    Note that the simplification I made in `semanal_typeargs.py` would be
    probably sufficient to fix this, but that would be papering over the
    real issue, so I am making a bit more principled fix.
    Configuration menu

    Browse the repository at this point in the history

  3. Fix crash on star import of redefinition (#20333)

    Fixes #20327
    
    Fix is trivial, do not grab various internal/temporary symbols with star
    imports. This may create an invalid cross-reference (and is generally
    dangerous). Likely, this worked previously because we processed all
    fresh modules in queue, not just the dependencies of current SCC.
    Configuration menu

    Browse the repository at this point in the history

  4. Configuration menu

    Browse the repository at this point in the history

  5. Configuration menu

    Browse the repository at this point in the history

  6. Configuration menu

    Browse the repository at this point in the history

  7. Configuration menu

    Browse the repository at this point in the history

  8. Configuration menu

    Browse the repository at this point in the history

  9. Configuration menu

    Browse the repository at this point in the history

  10. Serialize raw errors in cache metas (#20372)

    Fixes #20353
    
    This makes us respect e.g. `--output json` for cached files without
    re-checking the files (which is the desired behavior for users, see
    issue). This is also a first step towards resolving the "foo defined
    here" conundrum for parallel checking.
    
    The fix is straightforward. The only question was whether to continue
    using `ErrorTuple`s or switch to a proper class. I decided to keep the
    tuples for now to minimize the scope of change.
    
    Note I am also adjusting generic "JSON" fixed-format helpers to natively
    support tuples (unlike real JSON). We already use tuples in few other
    places, so it makes sense to just make it "official" (this format is
    still internal to mypy obviously).
    Configuration menu

    Browse the repository at this point in the history