From 0e250b7983c44cc69d6ff39a019c3f5abb386702 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Wed, 29 Jul 2026 18:11:32 -0700 Subject: [PATCH 1/3] Use use-python-version.yml --- .../templates/stages/python-analyze-weekly.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/eng/pipelines/templates/stages/python-analyze-weekly.yml b/eng/pipelines/templates/stages/python-analyze-weekly.yml index 06976f300a98..18fa0e42f87c 100644 --- a/eng/pipelines/templates/stages/python-analyze-weekly.yml +++ b/eng/pipelines/templates/stages/python-analyze-weekly.yml @@ -28,9 +28,8 @@ stages: os: linux steps: - - task: UsePythonVersion@0 - displayName: 'Use Python 3.10' - inputs: + - template: /eng/pipelines/templates/steps/use-python-version.yml + parameters: versionSpec: '3.10' # Authenticate pip to the configured Azure DevOps feed before installs. @@ -102,9 +101,8 @@ stages: GH_TOKEN: $(GH_TOKEN) SYSTEM_ACCESSTOKEN: $(System.AccessToken) - - task: UsePythonVersion@0 - displayName: 'Use Python 3.13 for docs generation' - inputs: + - template: /eng/pipelines/templates/steps/use-python-version.yml + parameters: versionSpec: '3.13' - script: | From 70c4af29007e0d2f71ca7c14f3387a57f4bd2422 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Wed, 29 Jul 2026 19:27:29 -0700 Subject: [PATCH 2/3] Remove default PIP_EXTRA_INDEX_URL from variabbles.py --- .../azure-sdk-tools/ci_tools/variables.py | 1 - .../azure-sdk-tools/tests/test_variables.py | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 eng/tools/azure-sdk-tools/tests/test_variables.py diff --git a/eng/tools/azure-sdk-tools/ci_tools/variables.py b/eng/tools/azure-sdk-tools/ci_tools/variables.py index 5732d3deb9f0..5a1d4dd658a9 100644 --- a/eng/tools/azure-sdk-tools/ci_tools/variables.py +++ b/eng/tools/azure-sdk-tools/ci_tools/variables.py @@ -102,7 +102,6 @@ def in_analyze_weekly() -> int: "VIRTUALENV_WHEEL": "0.45.1", "VIRTUALENV_PIP": "24.0", "VIRTUALENV_SETUPTOOLS": "75.3.2", - "PIP_EXTRA_INDEX_URL": "https://pypi.python.org/simple", # I haven't spent much time looking to see if a variable exists when invoking uv run. there might be one already that we can depend # on for get_pip_command adjustment. "IN_UV": "1", diff --git a/eng/tools/azure-sdk-tools/tests/test_variables.py b/eng/tools/azure-sdk-tools/tests/test_variables.py new file mode 100644 index 000000000000..a18582056a96 --- /dev/null +++ b/eng/tools/azure-sdk-tools/tests/test_variables.py @@ -0,0 +1,20 @@ +import os + +from ci_tools.variables import set_envvar_defaults + + +def test_set_envvar_defaults_does_not_add_public_pypi_extra_index(monkeypatch): + monkeypatch.delenv("PIP_EXTRA_INDEX_URL", raising=False) + + set_envvar_defaults() + + assert "PIP_EXTRA_INDEX_URL" not in os.environ + + +def test_set_envvar_defaults_preserves_explicit_extra_index(monkeypatch): + extra_index = "https://contoso.example/simple" + monkeypatch.setenv("PIP_EXTRA_INDEX_URL", extra_index) + + set_envvar_defaults() + + assert os.environ["PIP_EXTRA_INDEX_URL"] == extra_index \ No newline at end of file From 716ba439167c34c419024c2c5cc1d6d67a811ff5 Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Thu, 30 Jul 2026 11:40:53 -0700 Subject: [PATCH 3/3] Disable additional indexes --- eng/pipelines/templates/stages/python-analyze-weekly.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/templates/stages/python-analyze-weekly.yml b/eng/pipelines/templates/stages/python-analyze-weekly.yml index 18fa0e42f87c..d736f8a2382b 100644 --- a/eng/pipelines/templates/stages/python-analyze-weekly.yml +++ b/eng/pipelines/templates/stages/python-analyze-weekly.yml @@ -28,15 +28,16 @@ stages: os: linux steps: - - template: /eng/pipelines/templates/steps/use-python-version.yml + - template: /eng/pipelines/templates/steps/use-python-version.yml parameters: versionSpec: '3.10' # Authenticate pip to the configured Azure DevOps feed before installs. - - template: /eng/pipelines/templates/steps/auth-dev-feed.yml + - template: /eng/common/pipelines/templates/steps/python-auth-dev-feed.yml parameters: DevFeedName: ${{ parameters.DevFeedName }} EnableTwineAuth: false + DisableAdditionalIndexes : true - script: | python -m pip install -r eng/ci_tools.txt