From cd336f4eff6ad72631ab1f54ff406ed854cfe69f Mon Sep 17 00:00:00 2001
From: Eliah Kagan <degeneracypressure@gmail.com>
Date: Thu, 8 Aug 2024 21:16:10 -0400
Subject: [PATCH 1/4] Test Python 3.13 on CI

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 #1955
from failing the workflow.

But right now this allows the workflow to fail.
---
 .github/workflows/pythonpackage.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index 4850f252c..f1e5fa0f4 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -25,6 +25,8 @@ jobs:
           python-version: "3.7"
           os-ver: "22.04"
         - experimental: false
+        - python-version: "3.13"
+          experimental: true
 
       fail-fast: false
 

From 6060afd5a3bea3a054932a25f8e363bb1cb1fd0f Mon Sep 17 00:00:00 2001
From: Eliah Kagan <degeneracypressure@gmail.com>
Date: Thu, 2 Jan 2025 08:25:58 -0500
Subject: [PATCH 2/4] Set job-level continue-on-error for Python 3.13 on
 Windows

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 #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.
---
 .github/workflows/pythonpackage.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index f1e5fa0f4..9289e9bc1 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -25,13 +25,16 @@ jobs:
           python-version: "3.7"
           os-ver: "22.04"
         - experimental: false
-        - python-version: "3.13"
+        - os-type: windows
+          python-version: "3.13"
           experimental: true
 
       fail-fast: false
 
     runs-on: ${{ matrix.os-type }}-${{ matrix.os-ver }}
 
+    continue-on-error: ${{ matrix.experimental }}
+
     defaults:
       run:
         shell: bash --noprofile --norc -exo pipefail {0}

From e340d1c9048bdb26a6ac67406e32dc6575d6648b Mon Sep 17 00:00:00 2001
From: Eliah Kagan <degeneracypressure@gmail.com>
Date: Thu, 6 Mar 2025 22:03:47 -0500
Subject: [PATCH 3/4] Inelegantly fix a problem where `os-ver` is empty

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?).
---
 .github/workflows/pythonpackage.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index 9289e9bc1..e15ba8870 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -27,6 +27,7 @@ jobs:
         - experimental: false
         - os-type: windows
           python-version: "3.13"
+          os-ver: latest  # Somehow the fallback (`- os-ver: latest` by itself) no longer covers this.
           experimental: true
 
       fail-fast: false

From 0b5dca7db138687a4254cc71e7563d4d9dd89f2c Mon Sep 17 00:00:00 2001
From: Eliah Kagan <degeneracypressure@gmail.com>
Date: Thu, 6 Mar 2025 22:33:32 -0500
Subject: [PATCH 4/4] Slighty reorganize matrix `include:` for clarity

---
 .github/workflows/pythonpackage.yml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml
index e15ba8870..0d5c0d267 100644
--- a/.github/workflows/pythonpackage.yml
+++ b/.github/workflows/pythonpackage.yml
@@ -20,14 +20,17 @@ jobs:
         - os-type: windows
           python-version: "3.13"  # FIXME: Fix and enable Python 3.13 on Windows (#1955).
         include:
+        # Defaults, added to all automatically generated jobs.
         - os-ver: latest
+        - experimental: false
+        # Customized jobs.
         - os-type: ubuntu
           python-version: "3.7"
           os-ver: "22.04"
-        - experimental: false
+          experimental: false
         - os-type: windows
           python-version: "3.13"
-          os-ver: latest  # Somehow the fallback (`- os-ver: latest` by itself) no longer covers this.
+          os-ver: latest
           experimental: true
 
       fail-fast: false