Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@ jobs:
strategy:
matrix:
os-type: [ubuntu, macos, windows]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.13t", "3.14", "3.14t"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t", "3.15", "3.15t"]
exclude:
- os-type: macos
python-version: "3.7" # Not available for the ARM-based macOS runners.
- os-type: macos
python-version: "3.13t"
- os-type: macos
python-version: "3.14t"
- os-type: macos
python-version: "3.15t"
- os-type: windows
python-version: "3.13" # FIXME: Fix and enable Python 3.13 and 3.14 on Windows (#1955).
- os-type: windows
python-version: "3.13t"
python-version: "3.13" # FIXME: Fix and enable Python 3.13-3.15 on Windows (#1955).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EliahKagan I wonder if this comment is still valid? We have been running on Windows for a while, even though maybe not with all tests enabled.

My hope would be that with the improvements to deterministic destruction, more tests can work as filehandles will be closed more reliably.

@EliahKagan EliahKagan Jul 24, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The semantics of os.path.isabs changed in Python 3.13 on Windows. This had caused the behavior of code like index.remove('/only/looks/absolute') to differ, such that it was not immediately obvious what the behavior should be. It caused a test to fail, but that could not reasonably be fixed without figuring out what ought to actually happen.

I think it's very likely that GitPython has or had bugs that would make this behavior wrong both before and after the chage, though I am not sure. Really, all uses of os.path.isabs, including when spelling it osp.isabs after import os.path as osp, should be audited, and also compared to the uses of the is_absolute method of Path, which I believe had always regarded paths beginning with a single separator as non-absolute on Windows.

I had meant to fix this in #1955 but that ended up stalling due to my inability to put much time into GitPython at the time, and I very much agree with its closure--I should've myself closed it much earlier, to make clearer to others that they should feel welcome to contribute tests and fixes.

To be clear, paths on Windows that start with a single / or \ are indeed not absolute, because they are relative to the current drive. (A path that starts with a single / on a Unix-like system is of course absolute.) However, it may be that existing code in GitPython also assumes that, even on Windows, all relative paths are relative to a specific directory, rather than unconditionally specifying a root directory but relative to the current drive. So the way GitPython handles relative and absolute paths in general, including but not limited to when it uses os.path.isabs or pathlib.Path.is_absolute or related functions, should be examined in case there are bugs.

I suspect that, these days, all of this can be examined, and any findings rechecked and remediated, fairly efficiently.

- os-type: windows
python-version: "3.14"
- os-type: windows
python-version: "3.14t"
- os-type: windows
python-version: "3.15"
- os-type: windows
python-version: "3.15t"
include:
- os-ver: latest
- os-type: ubuntu
Expand All @@ -44,6 +46,10 @@ jobs:
- python-version: "3.8"
build-docs: false
- experimental: false
- python-version: "3.15"
experimental: true
- python-version: "3.15t"
experimental: true

fail-fast: false

Expand Down
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,8 @@ def _stamp_version(filename: str) -> None:
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
],
)
Loading