GitHubJacksonized

Support Python 3.13 on Muthaf*ckin' Windows by EliahKagan · Pull Request #1955 · gitpython-developers/GitPython

@EliahKagan
EliahKagan force-pushed the py313 branch 2 times, most recently from 96ceb75 to bae27f4 Compare August 18, 2024 20:03
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 2, 2025
This is analogous to the 3.7-related CI change in gitdb that was
part of gitpython-developers/gitdb#114, as
to part of gitpython-developers/smmap#58.

Since some tests are not yet passing on 3.13, this does not add
3.13 to CI, nor to the documentation of supported versions in
`setup.py`. Note that the list there is not enforced; GitPython can
already be installed on Python 3.13 and probably *mostly* works.

(See gitpython-developers#1955
for details on other changes that should be made to fully support
running GitPython on Python 3.13.)
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 2, 2025
Since gitpython-developers#1987, test jobs from `pythonpackage.yml` appear in an
unintuitive order, and some show an extra bool matrix variable in
their names while others don't (this corresponds to `experimental`,
which was always set to some value, but was set in different ways).

This fixes that by:

- Listing all tested versions, rather than introducing some in an
  `include` key. (The `include:`-introduced jobs didn't distinguish
  between originally-present matrix variables and those that are
  introduced based on the values of the original ones.)

- Replacing `os` with `os-type`, which has only the first part of
  the value for `runs-on:` (e.g., `ubuntu`), and adding `os-ver`
  to each matrix job, defaulting it to `latest`, but using `22.04`
  for Python 3.7 on Ubuntu.

This should also naturally extend to adding 3.13, with or without
setting `continue-on-error` to temporarily work around the problems
obseved in gitpython-developers#1955, but nothing 3.13-related is done in this commit.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 2, 2025
As this is being integrated, Python 3.13 is no longer a release
candidate, but this marks it experimental since that might also be
used temporarily to prevent some of the failures mentioned in gitpython-developers#1955
from failing the workflow.

But right now this allows the workflow to fail.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 2, 2025
Since gitpython-developers#1987, test jobs from `pythonpackage.yml` appear in an
unintuitive order, and some show an extra bool matrix variable in
their names while others don't (this corresponds to `experimental`,
which was always set to some value, but was set in different ways).

This fixes that by:

- Listing all tested versions, rather than introducing some in an
  `include` key. (The `include:`-introduced jobs didn't distinguish
  between originally-present matrix variables and those that are
  introduced based on the values of the original ones.)

- Replacing `os` with `os-type`, which has only the first part of
  the value for `runs-on:` (e.g., `ubuntu`), and adding `os-ver`
  to each matrix job, defaulting it to `latest`, but using `22.04`
  for Python 3.7 on Ubuntu.

This should also naturally extend to adding 3.13, with or without
setting `continue-on-error` to temporarily work around the problems
obseved in gitpython-developers#1955, but nothing 3.13-related is done in this commit.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 2, 2025
As this is being integrated, Python 3.13 is no longer a release
candidate, but this marks it experimental since that might also be
used temporarily to prevent some of the failures mentioned in gitpython-developers#1955
from failing the workflow.

But right now this allows the workflow to fail.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 2, 2025
It is specifically that combination that breaks some things. The
underlying cause is a change in `isabs` to correctly report that
paths on Windows that start with `\` that is not part of a
construction such as `\\?\` are not absolute paths. (See gitpython-developers#1955 and
links therein.) The change to `isabs` starts in 3.13, and it is
only applicable to Windows, so only that combination is affected.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 4, 2025
Since gitpython-developers#1987, test jobs from `pythonpackage.yml` appear in an
unintuitive order, and some show an extra bool matrix variable in
their names while others don't (this corresponds to `experimental`,
which was always set to some value, but was set in different ways).

This fixes that by:

- Listing all tested versions, rather than introducing some in an
  `include` key. (The `include:`-introduced jobs didn't distinguish
  between originally-present matrix variables and those that are
  introduced based on the values of the original ones.)

- Replacing `os` with `os-type`, which has only the first part of
  the value for `runs-on:` (e.g., `ubuntu`), and adding `os-ver`
  to each matrix job, defaulting it to `latest`, but using `22.04`
  for Python 3.7 on Ubuntu.

This should also naturally extend to adding 3.13, with or without
setting `continue-on-error` to temporarily work around the problems
obseved in gitpython-developers#1955, but nothing 3.13-related is done in this commit.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 4, 2025
As this is being integrated, Python 3.13 is no longer a release
candidate, but this marks it experimental since that might also be
used temporarily to prevent some of the failures mentioned in gitpython-developers#1955
from failing the workflow.

But right now this allows the workflow to fail.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 4, 2025
It is specifically that combination that breaks some things. The
underlying cause is a change in `isabs` to correctly report that
paths on Windows that start with `\` that is not part of a
construction such as `\\?\` are not absolute paths. (See gitpython-developers#1955 and
links therein.) The change to `isabs` starts in 3.13, and it is
only applicable to Windows, so only that combination is affected.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Jan 5, 2025
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Mar 7, 2025
As this is being integrated, Python 3.13 is no longer a release
candidate, but this marks it experimental since that might also be
used temporarily to prevent some of the failures mentioned in gitpython-developers#1955
from failing the workflow.

But right now this allows the workflow to fail.
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Mar 7, 2025
It is specifically that combination that breaks some things. The
underlying cause is a change in `isabs` to correctly report that
paths on Windows that start with `\` that is not part of a
construction such as `\\?\` are not absolute paths. (See gitpython-developers#1955 and
links therein.) The change to `isabs` starts in 3.13, and it is
only applicable to Windows, so only that combination is affected.
@EliahKagan
EliahKagan force-pushed the py313 branch 2 times, most recently from df91dfd to 65ff35f Compare March 7, 2025 02:28
As this is being integrated, Python 3.13 is no longer a release
candidate, but this marks it experimental since that might also be
used temporarily to prevent some of the failures mentioned in gitpython-developers#1955
from failing the workflow.

But right now this allows the workflow to fail.
It is specifically that combination that breaks some things. The
underlying cause is a change in `isabs` to correctly report that
paths on Windows that start with `\` that is not part of a
construction such as `\\?\` are not absolute paths. (See gitpython-developers#1955 and
links therein.) The change to `isabs` starts in 3.13, and it is
only applicable to Windows, so only that combination is affected.
The experiment 3.13 Windows job recently started getting `runs-on`
set to `windows-` rather than `windows-latest` (causing it to block
indefinitely waiting on a self-hosted runner with `windows-` as a
label). I don't know why this happens, since it looks like it did
not happen before rebasing from 65ff35f to 6060afd, but it happens
when force-pushing back to that OID from before the rebase. This
usually indicates a change in the runner software (or some other
part of the GHA infrastructure), but it could be that it happened
before and went unnoticed (then looked like a failure but was
actually a cancellation?).
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Mar 7, 2025
For now, this omits macOS and Windows from the 3.13t ("threaded")
tests.

The plan in gitpython-developers#2005 is to start without them, and no OS-specific
problems have been identified so far. In particular, in the
previous commit that adds 3.13t without excluding any operating
systems, all tests in the macOS job passed as expected, and the
Windows job had the same failure with the same message as in gitpython-developers#1955,
with no XFAIL changed to XPASS (which, if present, would suggest
GC differences meriting further exploration of 3.13t on Windows).
EliahKagan added a commit to EliahKagan/GitPython that referenced this f*ckin' pull request Mar 7, 2025
For now, this omits macOS and Windows from the 3.13t ("threaded")
tests.

The plan in gitpython-developers#2005 is to start without them, and no OS-specific
problems have been identified so far. In particular, in the
previous commit that adds 3.13t without excluding any operating
systems, all tests in the macOS job passed as expected, and the
Windows job had the same failure with the same message as in gitpython-developers#1955,
with no XFAIL changed to XPASS (which, if present, would suggest
GC differences meriting further exploration of 3.13t on Windows).
Byron pushed a commit to EliahKagan/GitPython that referenced this pull request Mar 12, 2025
For now, this omits macOS and Windows from the 3.13t ("threaded")
tests.

The plan in gitpython-developers#2005 is to start without them, and no OS-specific
problems have been identified so far. In particular, in the
previous commit that adds 3.13t without excluding any operating
systems, all tests in the macOS job passed as expected, and the
Windows job had the same failure with the same message as in gitpython-developers#1955,
with no XFAIL changed to XPASS (which, if present, would suggest
GC differences meriting further exploration of 3.13t on Windows).
@EliahKagan EliahKagan changed the goddamn title Support Python 3.13 Support Python 3.13 on Windows Apr 20, 2025
@EliahKagan EliahKagan linked an issue Sep 9, 2025 that may be closed by this muthaf*ckin' pull request
@Byron Byron closed this Jul 20, 2026
@EliahKagan EliahKagan mentioned this f*ckin' pull request Jul 24, 2026
@Byron Byron mentioned this f*ckin' pull request Jul 27, 2026
2 tasks done
Byron pushed a commit that referenced this muthaf*ckin' pull request Jul 28, 2026
This commit also makes the test-suite independent of the presence of a
local `master` branch.

- make index and submodule path normalization distinguish drive-rooted, drive-relative, UNC, and device paths on Windows
- confine normalized paths with `commonpath` instead of string-prefix checks
- normalize `includeIf gitdir` patterns to Git-style separators
- cover the other `isabs` consumers whose drive-rooted behavior correctly relies on Windows join semantics
- remove the Windows 3.13-3.15 CI exclusions and add 3.13-3.15 to tox
- make the pre-existing tests independent of a local `master` branch and linked-worktree-specific alternates

For context, the classifiers mentioned in the issue #2072 were introduced by 904aa71
(`Declare support for Python 3.13-3.14`) and 7d5370d (`Add support for Python
3.15`), both included in 3.1.56. This PR supplies the Windows path work that
those metadata changes did not include.

- paths absolute on the current drive
- drive-rooted paths such as `\directory` and `/directory`
- drive-relative paths such as `C:directory` (rejected where repository confinement is required)
- other-drive, UNC, and device paths
- traversal and adjacent-prefix escape attempts
- native and Git-style separators in conditional includes
- config includes, submodule gitfiles, linked worktree metadata, clone destinations, and Cygwin-path conversion

- Python 3.12.13, 3.13.14, 3.14.6, 3.14.6t, 3.15.0b4, and 3.15.0b4t installed locally with uv
- full test set passed for every interpreter in an independent clone without a
  local `master` branch; daemon-free suites ran in parallel and `test_remote.py`
  ran serially because its static local daemon endpoint cannot be shared across
  processes
- Ruff check and format
- mypy
- basedpyright
- all pre-commit hooks
Byron added a commit that referenced this pull request Jul 28, 2026
This commit also makes the test-suite independent of the presence of a
local `master` branch.

<!-- agent -->

- make index and submodule path normalization distinguish drive-rooted, drive-relative, UNC, and device paths on Windows
- confine normalized paths with `commonpath` instead of string-prefix checks
- normalize `includeIf gitdir` patterns to Git-style separators
- cover the other `isabs` consumers whose drive-rooted behavior correctly relies on Windows join semantics
- remove the Windows 3.13-3.15 CI exclusions and add 3.13-3.15 to tox
- make the pre-existing tests independent of a local `master` branch and linked-worktree-specific alternates

For context, the classifiers mentioned in the issue #2072 were introduced by 904aa71
(`Declare support for Python 3.13-3.14`) and 7d5370d (`Add support for Python
3.15`), both included in 3.1.56. This PR supplies the Windows path work that
those metadata changes did not include.

- paths absolute on the current drive
- drive-rooted paths such as `\directory` and `/directory`
- drive-relative paths such as `C:directory` (rejected where repository confinement is required)
- other-drive, UNC, and device paths
- traversal and adjacent-prefix escape attempts
- native and Git-style separators in conditional includes
- config includes, submodule gitfiles, linked worktree metadata, clone destinations, and Cygwin-path conversion

- Python 3.12.13, 3.13.14, 3.14.6, 3.14.6t, 3.15.0b4, and 3.15.0b4t installed locally with uv
- full test set passed for every interpreter in an independent clone without a
  local `master` branch; daemon-free suites ran in parallel and `test_remote.py`
  ran serially because its static local daemon endpoint cannot be shared across
  processes
- Ruff check and format
- mypy
- basedpyright
- all pre-commit hooks

Assisted-by: GPT 5.6
Co-authored-by: GPT 5.6 <[email protected]>
Byron added a commit that referenced this pull request Aug 4, 2026
This commit also makes the test-suite independent of the presence of a
local `master` branch.

<!-- agent -->

- make index and submodule path normalization distinguish drive-rooted, drive-relative, UNC, and device paths on Windows
- confine normalized paths with `commonpath` instead of string-prefix checks
- normalize `includeIf gitdir` patterns to Git-style separators
- cover the other `isabs` consumers whose drive-rooted behavior correctly relies on Windows join semantics
- remove the Windows 3.13-3.15 CI exclusions and add 3.13-3.15 to tox
- make the pre-existing tests independent of a local `master` branch and linked-worktree-specific alternates

For context, the classifiers mentioned in the issue #2072 were introduced by 904aa71
(`Declare support for Python 3.13-3.14`) and 7d5370d (`Add support for Python
3.15`), both included in 3.1.56. This PR supplies the Windows path work that
those metadata changes did not include.

- paths absolute on the current drive
- drive-rooted paths such as `\directory` and `/directory`
- drive-relative paths such as `C:directory` (rejected where repository confinement is required)
- other-drive, UNC, and device paths
- traversal and adjacent-prefix escape attempts
- native and Git-style separators in conditional includes
- config includes, submodule gitfiles, linked worktree metadata, clone destinations, and Cygwin-path conversion

- Python 3.12.13, 3.13.14, 3.14.6, 3.14.6t, 3.15.0b4, and 3.15.0b4t installed locally with uv
- full test set passed for every interpreter in an independent clone without a
  local `master` branch; daemon-free suites ran in parallel and `test_remote.py`
  ran serially because its static local daemon endpoint cannot be shared across
  processes
- Ruff check and format
- mypy
- basedpyright
- all pre-commit hooks

Assisted-by: GPT 5.6
Co-authored-by: GPT 5.6 <[email protected]>
Byron added a commit that referenced this pull request Aug 4, 2026
This commit also makes the test-suite independent of the presence of a
local `master` branch.

<!-- agent -->

- make index and submodule path normalization distinguish drive-rooted, drive-relative, UNC, and device paths on Windows
- confine normalized paths with `commonpath` instead of string-prefix checks
- normalize `includeIf gitdir` patterns to Git-style separators
- cover the other `isabs` consumers whose drive-rooted behavior correctly relies on Windows join semantics
- remove the Windows 3.13-3.15 CI exclusions and add 3.13-3.15 to tox
- make the pre-existing tests independent of a local `master` branch and linked-worktree-specific alternates

For context, the classifiers mentioned in the issue #2072 were introduced by 904aa71
(`Declare support for Python 3.13-3.14`) and 7d5370d (`Add support for Python
3.15`), both included in 3.1.56. This PR supplies the Windows path work that
those metadata changes did not include.

- paths absolute on the current drive
- drive-rooted paths such as `\directory` and `/directory`
- drive-relative paths such as `C:directory` (rejected where repository confinement is required)
- other-drive, UNC, and device paths
- traversal and adjacent-prefix escape attempts
- native and Git-style separators in conditional includes
- config includes, submodule gitfiles, linked worktree metadata, clone destinations, and Cygwin-path conversion

- Python 3.12.13, 3.13.14, 3.14.6, 3.14.6t, 3.15.0b4, and 3.15.0b4t installed locally with uv
- full test set passed for every interpreter in an independent clone without a
  local `master` branch; daemon-free suites ran in parallel and `test_remote.py`
  ran serially because its static local daemon endpoint cannot be shared across
  processes
- Ruff check and format
- mypy
- basedpyright
- all pre-commit hooks

Assisted-by: GPT 5.6
Co-authored-by: GPT 5.6 <[email protected]>

Originally published at github.com. Every curse word you see was added by the Samuel L. Jacksonizer, a parody site. Not affiliated with Samuel L. Jackson or github.com.