Skip to content

Compiled wheels for Python 3.15 alpha to avoid severe CI slowdown #21229

Closed as not planned

Description

@pomponchik

Hi, thanks for maintaining mypy.

I'm running mypy in CI across several Python versions, including Python 3.15 alpha, and noticed a very large slowdown only on the newer interpreter where pip falls back to the pure-Python wheel.

Project context:

  • OS in the slow job: ubuntu-latest on GitHub Actions
  • Python version: 3.15.0-alpha.1
  • mypy version tested: 1.20.1
  • CI command: mypy --strict skelet and mypy tests --exclude tests/typing
  • The same CI matrix also runs Python 3.8 through 3.14 and 3.14t

What I observed:

  • On Python 3.14 and 3.14t, mypy==1.20.1 installs compiled wheels and runs quickly.
  • On Python 3.15.0-alpha.1, pip installs the pure-Python py3-none-any wheel.
  • The Python 3.15 alpha job is much slower than the other jobs, while the checked code and mypy commands are the same.

I also checked wheel selection with pip. For Python 3.14 free-threaded, a compiled wheel exists:

mypy-1.20.1-cp314-cp314t-manylinux2014_x86_64...

But for Python 3.15 alpha, pip falls back to:

mypy-1.20.1-py3-none-any.whl

This makes mypy noticeably slower in CI. In my project, moving from an older pure-Python mypy wheel to a compiled wheel reduced typing-related CI time dramatically on Python 3.14. The remaining slow job is now Python 3.15.0-alpha.1.

Would it be possible to publish compiled wheels for Python 3.15 alpha, for example cp315 Linux wheels, while Python 3.15 is still in alpha/beta? That would make it practical to keep testing projects against upcoming Python versions without paying the pure-Python mypy performance cost.

I understand that alpha Python support may be more maintenance work, so even a note about whether such wheels are planned would be helpful.

Thanks.

Activity

  1. hauntsaninja commented on Apr 14, 2026

    @hauntsaninja
    Collaborator

    Unfortunately, CPython reserves the right to break the ABI before the release candidate phase, which makes uploading wheels in the alpha and beta phase dicey. I've previously advocated for lengthening the RC period precisely for this reason; it's a bottleneck for testing much of the Python ecosystem.

    One thing that would be cool and would help here is if mypyc learnt to speak the stable ABI.

  2. pomponchik commented on Apr 15, 2026

    @pomponchik
    Author

    @hauntsaninja, maybe I could vote somewhere to give your initiative more weight? Or could this issue be linked to those discussions to add a specific case for discussion there?

  3. cdce8p commented on Apr 16, 2026

    @cdce8p
    Collaborator

    It should be possible to build compiled versions of mypy directly from the sdist with

    MYPY_USE_MYPYC=1 pip install --no-binary mypy mypy
    

    However, we normally only start fixing compiler errors with the first beta releases. Point being the current release won't compile on 3.15.0a8. See #21255 for the necessary changes.

  4. cdce8p commented on Apr 21, 2026

    @cdce8p
    Collaborator

    See #21255 for the necessary changes.

    This was released today as part of 1.20.2, so if you like you could compile mypy yourself. As mentioned above wheels for 3.15 will only be added / available in the first release after 3.15.0rc1. Going to close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions