Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python 3.13 #1955

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

EliahKagan
Copy link
Contributor

@EliahKagan EliahKagan commented Aug 18, 2024

Python 3.13 is currently a release candidate (3.13.0rc1). Initially all this draft PR does is enable it for CI.

This is not ready to merge. There are two failures on CI:

On Windows, a test fails due to the change in 3.13 to os.path.isabs. I hope to fix that here, but I definitely have no objection if someone else wishes to fix it (which can supersede or, if desired, build on whatever ends up here). I'll also try to expand on that and related issues, here or elsewhere. It is not obvious what the best fix is. This is because the confusion that led to the old behavior of os.path.isabs (and the skew between its behavior and that of Path.is_absolute), as well as possibly other conceptually related issues, seem also to affect GitPython, including the code that leads to the current 3.13 test failure.

On all platforms, generating documentation fails (though the CI results don't show it for Windows because the unit test step fails first). This happens because 3.13 removes a number of deprecated modules, and one of them is imghdr, which the old version of Sphinx we've been using attempts to import. This is fixed in #1954, and I plan to rebase this PR if that is merged.


In addition, though possibly not in this PR, because we currently list every version we support in the metadata defined in setup.py, once there is good reason to believe that GitPython works properly on 3.13, it should be added. (This is purely informational, and unrelated to the version range used to determine whether and what versions of GitPython are installable for what versions of Python.)

That could be done either in this PR or subsequent to it, depending on whether the changes here are sufficient to provide that confidence. But I do not take it to be a goal of this PR to do that; once CI is passing without suppressing anything, I think this would be ready. Then we would have CI in place that would help with further changes aimed at improving 3.13 support or fixing 3.13-nonspecific problems discovered while investigating 3.13-specific matters.

It is currently a release candidate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant