Skip to content

Add support for Python 3.15 - #1498

Open
dosisod wants to merge 2 commits into
libgit2:masterfrom
dosisod:python-3.15
Open

dosisod wants to merge 2 commits into
libgit2:masterfrom
dosisod:python-3.15

Conversation

@dosisod

@dosisod dosisod commented Oct 11, 2026

Copy link
Copy Markdown

This PR adds support for Python 3.15. The cibuildwheel package had to be updated in order for Python 3.15 wheels to build. The relevant documentation has also been updated to indicate support for Python 3.15.

All tests and wheel builds are passing on my fork, except Windows wheels are failing at the "repair wheel" phase. It seems unrelated to the Python updates, as Python 3.11 is failing. Maybe the Windows wheel builds will work on this repo?

Happy to make changes as needed!

@jdavid

jdavid commented Oct 12, 2026

Copy link
Copy Markdown
Member

Follows Kimi's review regarding the Windows failure.


Blocking: Windows wheel jobs fail (all 3 arches, all Python versions, including cp311)

The error is delvewheel: FileNotFoundError: Unable to find library: git2.dll at the repair
step. Root cause, confirmed by reading both cibuildwheel versions:

  • cibuildwheel 3.x: the Windows default repair-wheel-command is an empty string, so no
    repair ever ran on Windows (cibuildwheel 3.4.1 resources/defaults.toml). setup.py:99
    (BuildWithDLLs) already copies git2.dll into the wheel, so wheels were self-contained
    without repair.

  • cibuildwheel 4.x: the Windows default changed to delvewheel repair -w {dest_dir} -v
    {wheel} (4.3.1 resources/defaults.toml:73). delvewheel now analyzes pygit2/_libgit2.pyd,
    sees it imports git2.dll, and cannot locate it: without --ignore-existing delvewheel
    disables its in-wheel search (dll_utils.py:340 — the casemap is only built when that
    flag is set), and C:\libgit2_install
    *\bin is not on PATH. I also diffed delvewheel
    1.13.1 → 1.13.2 (newly pinned by cibuildwheel 4.3.1's constraints): only UTF-8 encoding
    fixes, no discovery changes — so the regression is purely the cibuildwheel 4.x default,
    not a delvewheel bug.

Suggested fix — restore the previous behavior in pyproject.toml:

  [tool.cibuildwheel.windows]
  repair-wheel-command = ""

I verified cibuildwheel 4.3.1 honors an explicit empty string (options.py:914 reads it
with ignore_empty=False) and skips repair in that case (platforms/windows.py:561), moving
the built wheel as-is — exactly the 3.x behavior, with git2.dll still bundled by setup.py.

An alternative is delvewheel repair --ignore-existing -w {dest_dir} {wheel}, which makes
delvewheel recognize the in-wheel git2.dll and still repair any other external deps —
arguably better long-term, but it changes the wheel layout/metadata compared to what you
ship today. Either way, this needs to be resolved in this PR; it can't be waved through as
a pre-existing failure (master's wheels run from 2026-09-30 is fully green).

@jdavid

jdavid commented Oct 12, 2026

Copy link
Copy Markdown
Member

Also, the compatibility table in install.rst is wrong, the next release will be 1.21.0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants