GitPython icon indicating copy to clipboard operation
GitPython copied to clipboard

Request to Declare Python 3.13 Compatibility on PyPI

Open grokas-splunk opened this issue 3 months ago • 4 comments

Hey GitPython maintainers,

I am reaching out on behalf of Splunk SOAR, as part of our internal migration effort to Python 3.13.

What we’re requesting

  • Confirm whether this package is compatible with Python 3.13 (which I can see it is)
    • I can see CI tests being ran and passing against Python 3.13
  • Update the package metadata to reflect Python 3.13 compatibility for easier tracking and recognition, and publish a new PyPI release

Thanks a ton for your support in this matter.

Best, Splunk SOAR Engineering Team

grokas-splunk avatar Sep 08 '25 21:09 grokas-splunk

GitPython is compatible with Python 3.13 on Unix-like systems, and it is believed to be mostly compatible with Python 3.13 on Windows, but there is an incompatibility due to a Windows-specific breaking change in Python 3.13 related to how one of the standard library functions classifies paths as relative or absolute.

In practice, I think it is highly likely to work already for most users on Windows, but we do have a failing test on 3.13 on Windows, and there may be realistic scenarios where users on Windows would encounter problems with GitPython on Python 3.13--either in connection with the code exercised by that test, or in connection with other code that no test currently exercises in a way that relates to the incompatibility. (Regarding CI, we run CI on Python 3.13, but not with that version on Windows currently.)

See #1955 for full details. I hope to get to this sometime soon, especially with Python 3.14 being just around the corner, but unfortunately I do not know when I'll get to it. Alternatively, if someone else wants to complete that, it would definitely be fine with me. I think that, at a minimum, the three "Windows:" steps related to absolute paths should be done before adding the classifier that explicitly declares Python 3.13 compatibility.

I can imagine an argument for considering Windows to be a secondary platform, such that it would not have to wait on this. But I think many users of software that depends on GitPython are likely running Windows, so that would probably not be a good idea. @Byron please let me know if you have a position on this.

Regarding the metadata, please note that while we do currently list trove classifiers indicating compatibility with some versions of Python that are well tested and specifically believed to be compatible, the actual hard specification states no upper bound and permits installation on Python 3.13 on all systems:

https://github.com/gitpython-developers/GitPython/blob/2d4c54154bc984f5dafde1b23e377e2dc3214cb8/setup.py#L77

However, I understand that's not a declaration that, in practice, there is no degradation on 3.13. Accordingly, I understand that this, by itself, is probably not what you're looking for.

EliahKagan avatar Sep 09 '25 01:09 EliahKagan

Thanks for looping me in.

It's probably not possible to state compatibility for non-Windows systems only? Alternatively, is it possible to state experimental (or otherwise degraded) support?

Any of the above would work today. Otherwise, I'd also want to wait until the issues on Windows have been resolved, probably something that has to happen on our side unless Python is recognising this as a bug - to use it's a regression for sure.

Byron avatar Sep 09 '25 07:09 Byron

unless Python is recognising this as a bug

The breaking change from Python 3.12 to Python 3.13 on Windows in os.path.isabs was intentional, improves correctness of isabs itself (paths that start with only one directory separator on Windows are not absolute, because they are relative to the current drive), and makes os.path functionality more consistent with pathlib.Path. So I think the change is, overall, an improvement in Python's standard library, and won't likely be regarded as a bug there.

EliahKagan avatar Sep 09 '25 13:09 EliahKagan

I see, so so GitPython would have to adjust its usage to be compatible.

Byron avatar Sep 09 '25 15:09 Byron