From 3562614f68635145f084608c8a1ebdf098ee292e Mon Sep 17 00:00:00 2001 From: Damian Shaw Date: Sat, 23 Aug 2025 14:23:01 -0400 Subject: [PATCH 1/5] Update CI from `ubuntu-22.04` to `ubuntu-latest` --- .github/workflows/ci.yml | 14 +++++++------- .readthedocs.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd61018ad01..a59da303aa9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ concurrency: jobs: docs: name: docs - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 @@ -36,7 +36,7 @@ jobs: - run: nox -s docs determine-changes: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest outputs: tests: ${{ steps.filter.outputs.tests }} vendoring: ${{ steps.filter.outputs.vendoring }} @@ -67,7 +67,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-22.04, windows-latest] + os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v5 @@ -86,7 +86,7 @@ jobs: vendoring: name: vendoring - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest needs: [determine-changes] if: >- @@ -115,7 +115,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-22.04, macos-latest] + os: [ubuntu-latest, macos-latest] python: - "3.9" - "3.10" @@ -132,7 +132,7 @@ jobs: allow-prereleases: true - name: Install Ubuntu dependencies - if: matrix.os == 'ubuntu-22.04' + if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update sudo apt-get install bzr @@ -261,7 +261,7 @@ jobs: - tests-zipapp - vendoring - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed diff --git a/.readthedocs.yml b/.readthedocs.yml index 6919e0f5abf..03659fef2c3 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,7 +1,7 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-latest tools: python: "3.11" jobs: From 02ce8a7fec590efce79375bc2dabe87287282dcd Mon Sep 17 00:00:00 2001 From: Damian Shaw Date: Sat, 23 Aug 2025 14:27:41 -0400 Subject: [PATCH 2/5] Use proper OS name for read the docs CI --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 03659fef2c3..80825152cf0 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,7 +1,7 @@ version: 2 build: - os: ubuntu-latest + os: ubuntu-lts-latest tools: python: "3.11" jobs: From c5b5b17f132c29723e7ebe41820f397961bddbd1 Mon Sep 17 00:00:00 2001 From: Damian Shaw Date: Sat, 23 Aug 2025 14:28:46 -0400 Subject: [PATCH 3/5] Add subversion to system dependencies for Ubuntu --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a59da303aa9..d42ee210db7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install bzr + sudo apt-get install bzr subversion - name: Install MacOS dependencies if: runner.os == 'macOS' From 4d045497f3887eaff7c481779c0a7d016ec251ce Mon Sep 17 00:00:00 2001 From: Damian Shaw Date: Sat, 23 Aug 2025 15:01:01 -0400 Subject: [PATCH 4/5] Use newer `brz` drop in replacement instead of no longer maintainer `bzr` in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d42ee210db7..85dc0940b5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,7 +135,7 @@ jobs: if: matrix.os == 'ubuntu-latest' run: | sudo apt-get update - sudo apt-get install bzr subversion + sudo apt-get install brz subversion - name: Install MacOS dependencies if: runner.os == 'macOS' From 2b345f08e649bc24219b0661d849590416d72df5 Mon Sep 17 00:00:00 2001 From: Damian Shaw Date: Sat, 23 Aug 2025 15:01:28 -0400 Subject: [PATCH 5/5] Debug externally managed failures --- tests/functional/test_pep668.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/functional/test_pep668.py b/tests/functional/test_pep668.py index 5672e52d94b..553c11bdeb3 100644 --- a/tests/functional/test_pep668.py +++ b/tests/functional/test_pep668.py @@ -13,15 +13,24 @@ def patch_check_externally_managed(virtualenv: VirtualEnvironment) -> None: # Since the tests are run from a virtual environment, and we can't # guarantee access to the actual stdlib location (where EXTERNALLY-MANAGED # needs to go into), we patch the check to always raise a simple message. + + # Allow user site packages so that --user doesn't fail early + virtualenv.user_site_packages = True + virtualenv.sitecustomize = textwrap.dedent( """\ - from pip._internal.exceptions import ExternallyManagedEnvironment - from pip._internal.utils import misc + try: + from pip._internal.exceptions import ExternallyManagedEnvironment + from pip._internal.utils import misc - def check_externally_managed(): - raise ExternallyManagedEnvironment("I am externally managed") + def check_externally_managed(): + raise ExternallyManagedEnvironment("I am externally managed") - misc.check_externally_managed = check_externally_managed + misc.check_externally_managed = check_externally_managed + except ImportError: + # pip modules not available at sitecustomize time + # This can happen in CI environments with different timing + pass """ )