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

Infra: Fix Python 3.9 on CI #3763

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Infra: Fix Python 3.9 on CI #3763

merged 1 commit into from
Apr 23, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Apr 23, 2024

Fixes #3760 (comment).

Re: actions/setup-python#696 (comment).

There's a couple of similar ways to do this, for this workflow the difference is mostly cosmetic.

Any preferences?


This PR: keep 3.9 in the matrix (it adds Windows, Ubuntu and macos-latest), then remove 3.9/macos-latest and include 3.9/macos-13:

diff
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 70a62762..5fef7979 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -39,6 +39,13 @@ jobs:
         - "windows-latest"
         - "macos-latest"
         - "ubuntu-latest"
+        # Python 3.9 is on macos-13 but not macos-latest (macos-14-arm64)
+        # https://github.com/actions/setup-python/issues/696#issuecomment-1637587760
+        exclude:
+        - { python-version: "3.9", os: "macos-latest" }
+        include:
+        - { python-version: "3.9", os: "macos-13" }
+
 
     steps:
       - uses: actions/checkout@v4

It runs 3.9/macos-13 last, the othe 3.9s stay at the top:

image

Benefit: only one moved to the end, still get to queue up the slowish 3.9/Windows sooner to give it a headstart.


Or remove 3.9 from the matrix, then add 3.9 and Windows, Ubuntu and macos-latest:

diff
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 70a62762..87e2026e 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -30,7 +30,6 @@ jobs:
       fail-fast: false
       matrix:
         python-version:
-        - "3.9"
         - "3.10"
         - "3.11"
         - "3.12"
@@ -39,6 +38,13 @@ jobs:
         - "windows-latest"
         - "macos-latest"
         - "ubuntu-latest"
+        # Python 3.9 is on macos-13 but not macos-latest (macos-14-arm64)
+        # https://github.com/actions/setup-python/issues/696#issuecomment-1637587760
+        include:
+        - { python-version: "3.9", os: "windows-latest" }
+        - { python-version: "3.9", os: "macos-13" }
+        - { python-version: "3.9", os: "ubuntu-latest" }
+
 
     steps:
       - uses: actions/checkout@v4

It runs all 3.9 jobs at the end:

image

Benefit: all 3.9 jobs kept together.


📚 Documentation preview 📚: https://pep-previews--3763.org.readthedocs.build/

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

I think this is fine. I'd even be OK with dropping 3.9 entirely here; it's not all that important for the PEP build scripts to have wide Python version support.

@hugovk
Copy link
Member Author

hugovk commented Apr 23, 2024

Yeah, I'd be fine dropping 3.9 too, but we decided a while back not to require the cutting edge so PEP authors could use a wider range of versions. Although 3.9/3.10 are hardly cutting edge by now :)

Anyway, this is an easy enough fix to keep them all for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants