Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: python/mypy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2e6c87e
Choose a base ref
...
head repository: python/mypy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8aabf84
Choose a head ref
  • 4 commits
  • 13 files changed
  • 1 contributor

Commits on Jul 10, 2026

  1. [mypyc] Make attribute access memory safe on free-threaded builds (#2…

    …1705)
    
    This fixes memory unsafety when there is a race condition related to
    attribute get/set operations on a free-threaded build, for simple
    reference-based attributes only (`PyObject *`). This includes attributes
    with primitive types like `list`, `set` and `str` and `dict`, and native
    class types.
    
    The main idea is to use delayed decref for the old attribute value when
    assigning to an attribute. There are detailed comments explaining the
    approach in detail.
    
    This causes a ~5% slowdown in self check when using 3.14t. Currently it
    looks like a significant perf cost is unavoidable if we want to fix
    memory unsafety, but we can further optimize mypy to reduce the impact
    by introducing final attributes, for example.
    
    Remaining work includes fixing attributes with fixed-length tuple types
    and tagged integer types (in follow-up PRs).
    
    I used coding agent assist heavily.
    
    Work on mypyc/mypyc#1203.
    JukkaL committed Jul 10, 2026
    Configuration menu
    Copy the full SHA
    a9f62a3 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2026

  1. [mypyc] Update documentation of race conditions under free threading (#…

    …21726)
    
    Mypyc now gives additional thread safety guarantees.
    JukkaL committed Jul 13, 2026
    Configuration menu
    Copy the full SHA
    2c21546 View commit details
    Browse the repository at this point in the history
  2. Update changelog for 2.3 release (#21728)

    Release tracking issue: #21717
    JukkaL committed Jul 13, 2026
    Configuration menu
    Copy the full SHA
    4d8ad2a View commit details
    Browse the repository at this point in the history
  3. Drop +dev from version

    JukkaL committed Jul 13, 2026
    Configuration menu
    Copy the full SHA
    8aabf84 View commit details
    Browse the repository at this point in the history
Loading