René's URL Explorer Experiment


Title: Support Python 3.13 on Windows by EliahKagan · Pull Request #1955 · gitpython-developers/GitPython · GitHub

Open Graph Title: Support Python 3.13 on Windows by EliahKagan · Pull Request #1955 · gitpython-developers/GitPython

X Title: Support Python 3.13 on Windows by EliahKagan · Pull Request #1955 · gitpython-developers/GitPython

Description: Tasks for full Python 3.13 support (the "Audit all ..." tasks can arguably be deferred if necessary): All platforms: Upgrade Sphinx packages to not use imghdr (#1954) All platforms: In CI mypy step, fix --python-version operand to omit trailing t (#2040) Windows: Figure out what index.remove('/only/looks/absolute') should do on Windows Windows: Audit all other uses of os.path.isabs in GitPython Windows: Audit all choices GitPython makes based on whether paths are absolute or relative All platforms: Add Python 3.13 setup.py classifier (though it's not needed for installation) All platforms: Add py313 to the env_list in tox.ini (can do at any time, if tested out) Python 3.13 has been out for a few months now (and even has a patch release, 3.13.1), but I have not yet gotten to finishing this. I believe GitPython already mostly works on Python 3.13, including the recently released current version of GitPython as well as other recent-past versions. But there was a change to the behavior of os.path.isabs on Windows in Python 3.13 that affects some functionality. The problem affects only Windows; GitPython should already completely work with Python 3.13 on other operating systems, though of course it is possible that other version-specific bugs are not yet discovered. Unlike on Unix-like systems, most paths on Windows that begin with a directory separator are actually relative paths, because a path that begins with a single \ or /--rather than, for example, \\?\, \\.\, or \\hostname\--is relative to the root of the current drive (unless it begins with \??\ and is used in a context where that syntax is accepted). But ordinary drive-relative \ paths are reported as absolute in os.path.isabs prior to Python 3.13, even though pathlib.Path functions do not misreport them in this way. This rightly causes one test to fail. In addition, this points to a likely area of confusion when handling paths in Windows, and the code covered by the failing test, as well as other code that checks through os.path funcitons or pathlib.Path methods if paths are absolute or relative on Windows should be examined. I believe it is to avoid breaking code that relies on the old behavior that earlier versions of Python have not been updated to fix os.path.isabs for these kinds of paths. But any code that relies on that is likely to be doing the wrong thing. More broadly, any code that assume a path is absolute if and only if it begins with a directory separator is likely to be doing the wrong thing on Windows, even if it does not make use of library functions that encapsulate this assumption. The original pull request description follows, including some elaboration related to the tasks. 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.

Open Graph Description: Tasks for full Python 3.13 support (the "Audit all ..." tasks can arguably be deferred if necessary): All platforms: Upgrade Sphinx packages to not use imghdr (#1954) All platforms: In...

X Description: Tasks for full Python 3.13 support (the "Audit all ..." tasks can arguably be deferred if necessary): All platforms: Upgrade Sphinx packages to not use imghdr (#1954) All platf...

Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1955

X: @github

direct link

Domain: redirect.github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:3497590b-b072-2e46-79ec-82561ad47d88
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDE06:111C42:1F9D06:2AC54D:6969674B
html-safe-nonceee7fb150578e458f70ef4c0f07e59df65e2e7d241770920f1b8f91c255ecff98
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTA2OjExMUM0MjoxRjlEMDY6MkFDNTREOjY5Njk2NzRCIiwidmlzaXRvcl9pZCI6IjI5OTUyMjY2MjI1MjUyNjk4MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaceccaf6f309c1bbf90f7747aabfa32fe3cb13c6372c7d6704a46832ed228bde83
hovercard-subject-tagpull_request:2024274722
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/1955/files
twitter:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
og:image:altTasks for full Python 3.13 support (the "Audit all ..." tasks can arguably be deferred if necessary): All platforms: Upgrade Sphinx packages to not use imghdr (#1954) All platforms: In...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonec6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files#start-of-content
https://redirect.github.com/
Sign in https://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1955%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://redirect.github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1955%2Ffiles
Sign up https://redirect.github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=gitpython-developers%2FGitPython
Reloadhttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
Reloadhttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
Reloadhttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
gitpython-developers https://redirect.github.com/gitpython-developers
GitPythonhttps://redirect.github.com/gitpython-developers/GitPython
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
Notifications https://redirect.github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 964 https://redirect.github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5k https://redirect.github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://redirect.github.com/gitpython-developers/GitPython
Issues 169 https://redirect.github.com/gitpython-developers/GitPython/issues
Pull requests 8 https://redirect.github.com/gitpython-developers/GitPython/pulls
Discussions https://redirect.github.com/gitpython-developers/GitPython/discussions
Actions https://redirect.github.com/gitpython-developers/GitPython/actions
Security Uh oh! There was an error while loading. Please reload this page. https://redirect.github.com/gitpython-developers/GitPython/security
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
Insights https://redirect.github.com/gitpython-developers/GitPython/pulse
Code https://redirect.github.com/gitpython-developers/GitPython
Issues https://redirect.github.com/gitpython-developers/GitPython/issues
Pull requests https://redirect.github.com/gitpython-developers/GitPython/pulls
Discussions https://redirect.github.com/gitpython-developers/GitPython/discussions
Actions https://redirect.github.com/gitpython-developers/GitPython/actions
Security https://redirect.github.com/gitpython-developers/GitPython/security
Insights https://redirect.github.com/gitpython-developers/GitPython/pulse
Sign up for GitHub https://redirect.github.com/signup?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://redirect.github.com/login?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
EliahKaganhttps://redirect.github.com/EliahKagan
gitpython-developers:mainhttps://redirect.github.com/gitpython-developers/GitPython/tree/main
EliahKagan:py313https://redirect.github.com/EliahKagan/GitPython/tree/py313
Conversation 2 https://redirect.github.com/gitpython-developers/GitPython/pull/1955
Commits 4 https://redirect.github.com/gitpython-developers/GitPython/pull/1955/commits
Checks 25 https://redirect.github.com/gitpython-developers/GitPython/pull/1955/checks
Files changed 1 https://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
Support Python 3.13 on Windows https://redirect.github.com/gitpython-developers/GitPython/pull/1955/files#top
Show all changes 4 commits https://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
cd336f4 Test Python 3.13 on CI EliahKagan Aug 9, 2024 https://redirect.github.com/gitpython-developers/GitPython/pull/1955/commits/cd336f4eff6ad72631ab1f54ff406ed854cfe69f
6060afd Set job-level continue-on-error for Python 3.13 on Windows EliahKagan Jan 2, 2025 https://redirect.github.com/gitpython-developers/GitPython/pull/1955/commits/6060afd5a3bea3a054932a25f8e363bb1cb1fd0f
e340d1c Inelegantly fix a problem where `os-ver` is empty EliahKagan Mar 7, 2025 https://redirect.github.com/gitpython-developers/GitPython/pull/1955/commits/e340d1c9048bdb26a6ac67406e32dc6575d6648b
0b5dca7 Slighty reorganize matrix `include:` for clarity EliahKagan Mar 7, 2025 https://redirect.github.com/gitpython-developers/GitPython/pull/1955/commits/0b5dca7db138687a4254cc71e7563d4d9dd89f2c
Clear filters https://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
.github/workflows/pythonpackage.ymlhttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files#diff-ee68bef8369ed7bc5460a288e72d62152784762ef66851e07bf134c4075a08f0
View file https://redirect.github.com/gitpython-developers/GitPython/blob/0b5dca7db138687a4254cc71e7563d4d9dd89f2c/.github/workflows/pythonpackage.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://redirect.github.com/gitpython-developers/GitPython/pull/1955/{{ revealButtonHref }}
https://redirect.github.com/gitpython-developers/GitPython/pull/1955/files#diff-ee68bef8369ed7bc5460a288e72d62152784762ef66851e07bf134c4075a08f0
https://redirect.github.com/gitpython-developers/GitPython/pull/1955/files#diff-ee68bef8369ed7bc5460a288e72d62152784762ef66851e07bf134c4075a08f0
Please reload this pagehttps://redirect.github.com/gitpython-developers/GitPython/pull/1955/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.