pygit2 icon indicating copy to clipboard operation
pygit2 copied to clipboard

New Python versions always require a pygit2 upgrade

Open SpaceManiac opened this issue 4 years ago • 2 comments

I use pygit2 in a Python tool which is distributed to non-programmers on Windows. Every new Python release, I get support requests from people who installed the latest Python version (because they're installing Python for the first time) and the ever-so-slightly old version of pygit2 in the tool's requirements.txt. This has happened with 3.7, 3.8, and now 3.9.

Unfortunately the error messages for this situation are beyond useless, instructing users to install MSVC (a huge waste of time) and then to install libgit2 development headers (difficult to figure out how to do this).

Would it be feasible to either

  • back-publish wheels for some range of old pygit2 versions on each new Python release; or
  • use ctypes to allow for Python-version-independent binary wheels?

Regarding the latter, if you think it's feasible, I may be able to contribute some of the actual work.

SpaceManiac avatar Nov 09 '20 02:11 SpaceManiac

cffi might be capable of using the limited API/stable ABI. This means it might be possible to publish a wheel that works on multiple Python 3 versions including newly released ones. But it seems that pygit2 also has a manually written module that isn't using it.

segevfiner avatar Nov 10 '20 18:11 segevfiner

Python 3.10 will be released soon-ish.

The ABI for Python 3.10 is frozen since the first release candidate was released. So it should be possible to build wheels for 3.10 – it is as safe to use 3.10.0rc1 wheels for 3.10.0 final as it is to use 3.9.1 wheels for 3.9.2.

encukou avatar Aug 30 '21 20:08 encukou