From 395de4ea62276cc97585fe9493c244c777cfa03b Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Tue, 19 May 2026 14:15:26 +0530 Subject: [PATCH 1/6] CHORE: Update Python versions, drop EOL 3.10, upgrade Ubuntu 22.04->24.04 in test matrix --- .../variables/common-variables.yml | 2 +- eng/pipelines/pr-validation-pipeline.yml | 20 ++++++++++--------- pyproject.toml | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/OneBranchPipelines/variables/common-variables.yml b/OneBranchPipelines/variables/common-variables.yml index 3597f4192..08d47fded 100644 --- a/OneBranchPipelines/variables/common-variables.yml +++ b/OneBranchPipelines/variables/common-variables.yml @@ -16,7 +16,7 @@ variables: # Python versions to build - name: PYTHON_VERSIONS - value: '3.10,3.11,3.12,3.13' + value: '3.11,3.12,3.13,3.14' # Package name - name: PACKAGE_NAME diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index b70b1ac77..cb1bb8cb9 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -469,16 +469,18 @@ jobs: SQL2022: sqlServerImage: 'mcr.microsoft.com/mssql/server:2022-latest' sqlVersion: 'SQL2022' + pythonVersion: '3.13' SQL2025: sqlServerImage: 'mcr.microsoft.com/mssql/server:2025-latest' sqlVersion: 'SQL2025' + pythonVersion: '3.14' steps: - task: UsePythonVersion@0 inputs: - versionSpec: '3.13' + versionSpec: '$(pythonVersion)' addToPath: true - displayName: 'Use Python 3.13 on macOS' + displayName: 'Use Python $(pythonVersion) on macOS' - script: | brew update @@ -640,18 +642,18 @@ jobs: strategy: matrix: Ubuntu: - dockerImage: 'ubuntu:22.04' + dockerImage: 'ubuntu:24.04' distroName: 'Ubuntu' sqlServerImage: 'mcr.microsoft.com/mssql/server:2022-latest' useAzureSQL: 'false' Ubuntu_SQL2025: - dockerImage: 'ubuntu:22.04' + dockerImage: 'ubuntu:24.04' distroName: 'Ubuntu-SQL2025' sqlServerImage: 'mcr.microsoft.com/mssql/server:2025-latest' useAzureSQL: 'false' ${{ if ne(variables['AZURE_CONNECTION_STRING'], '') }}: Ubuntu_AzureSQL: - dockerImage: 'ubuntu:22.04' + dockerImage: 'ubuntu:24.04' distroName: 'Ubuntu-AzureSQL' sqlServerImage: '' useAzureSQL: 'true' @@ -742,7 +744,7 @@ jobs: # Download the package to configure the Microsoft repo if [ '$(distroName)' = 'Ubuntu' ]; then - curl -sSL -O https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb + curl -sSL -O https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb else # Debian 12 curl -sSL -O https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb @@ -898,7 +900,7 @@ jobs: # Add Microsoft repository curl -sSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - - curl -sSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list > /etc/apt/sources.list.d/mssql-release.list + curl -sSL https://packages.microsoft.com/config/ubuntu/24.04/prod.list > /etc/apt/sources.list.d/mssql-release.list # Update package lists apt-get update -qq @@ -968,7 +970,7 @@ jobs: strategy: matrix: Ubuntu_ARM64: - dockerImage: 'ubuntu:22.04' + dockerImage: 'ubuntu:24.04' distroName: 'Ubuntu' archName: 'arm64' Debian_ARM64: @@ -1066,7 +1068,7 @@ jobs: # Download the package to configure the Microsoft repo if [ '$(distroName)' = 'Ubuntu' ]; then - curl -sSL -O https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb + curl -sSL -O https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb else # Debian 12 curl -sSL -O https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb diff --git a/pyproject.toml b/pyproject.toml index 538a4a992..d41dfc13d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 100 -target-version = ['py38', 'py39', 'py310', 'py311'] +target-version = ['py311', 'py312', 'py313', 'py314'] include = '\.pyi?$' extend-exclude = ''' /( From d481253cdc79eafff7d60f277f8cfd20810279bd Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 27 May 2026 09:39:47 +0530 Subject: [PATCH 2/6] FIX: Address Copilot review comments - use Python 3.13 for macOS and fix Ubuntu distroName pattern matching --- eng/pipelines/pr-validation-pipeline.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index cb1bb8cb9..84c046fbf 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -473,7 +473,7 @@ jobs: SQL2025: sqlServerImage: 'mcr.microsoft.com/mssql/server:2025-latest' sqlVersion: 'SQL2025' - pythonVersion: '3.14' + pythonVersion: '3.13' steps: - task: UsePythonVersion@0 @@ -743,7 +743,7 @@ jobs: export DEBIAN_FRONTEND=noninteractive # Download the package to configure the Microsoft repo - if [ '$(distroName)' = 'Ubuntu' ]; then + if [[ '$(distroName)' =~ ^Ubuntu ]]; then curl -sSL -O https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb else # Debian 12 @@ -1067,7 +1067,7 @@ jobs: export DEBIAN_FRONTEND=noninteractive # Download the package to configure the Microsoft repo - if [ '$(distroName)' = 'Ubuntu' ]; then + if [[ '$(distroName)' =~ ^Ubuntu ]]; then curl -sSL -O https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb else # Debian 12 From 709c47eb06020dcfead545b6e9a9bfeb3805feb5 Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 27 May 2026 09:47:23 +0530 Subject: [PATCH 3/6] FIX: Keep Python 3.10 in target-version and build matrix for consistency with setup.py --- OneBranchPipelines/variables/common-variables.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OneBranchPipelines/variables/common-variables.yml b/OneBranchPipelines/variables/common-variables.yml index 08d47fded..c0548a26e 100644 --- a/OneBranchPipelines/variables/common-variables.yml +++ b/OneBranchPipelines/variables/common-variables.yml @@ -16,7 +16,7 @@ variables: # Python versions to build - name: PYTHON_VERSIONS - value: '3.11,3.12,3.13,3.14' + value: '3.10,3.11,3.12,3.13,3.14' # Package name - name: PACKAGE_NAME diff --git a/pyproject.toml b/pyproject.toml index d41dfc13d..3a8c2ec1a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 100 -target-version = ['py311', 'py312', 'py313', 'py314'] +target-version = ['py310', 'py311', 'py312', 'py313', 'py314'] include = '\.pyi?$' extend-exclude = ''' /( From 37e9dbc80ed6b9cadb50b0d2b9253ea349e65748 Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 27 May 2026 11:02:24 +0530 Subject: [PATCH 4/6] FEAT: Add Python 3.14 support for macOS SQL2025 job with custom installation --- eng/pipelines/pr-validation-pipeline.yml | 38 +++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index 84c046fbf..097acb7c3 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -473,13 +473,49 @@ jobs: SQL2025: sqlServerImage: 'mcr.microsoft.com/mssql/server:2025-latest' sqlVersion: 'SQL2025' - pythonVersion: '3.13' + pythonVersion: '3.14' steps: + # Python 3.14 Installation for macOS: Download from python.org (not yet in UsePythonVersion@0) + - script: | + if [ "$(pythonVersion)" = "3.14" ]; then + echo "Python 3.14 detected - downloading from python.org..." + + # Download Python 3.14 universal2 installer + PYTHON_PKG="python-3.14.0-macos11.pkg" + curl -o "$PYTHON_PKG" "https://www.python.org/ftp/python/3.14.0/$PYTHON_PKG" + + # Install Python + sudo installer -pkg "$PYTHON_PKG" -target / + + # Python 3.14 is installed to /Library/Frameworks/Python.framework/Versions/3.14 + PYTHON_PATH="/Library/Frameworks/Python.framework/Versions/3.14/bin" + + # Add to PATH + echo "##vso[task.prependpath]$PYTHON_PATH" + + # Verify installation + "$PYTHON_PATH/python3.14" --version + "$PYTHON_PATH/python3.14" -c "import sys; print('Python:', sys.executable)" + + # Create symlink for convenience + sudo ln -sf "$PYTHON_PATH/python3.14" /usr/local/bin/python + sudo ln -sf "$PYTHON_PATH/python3.14" /usr/local/bin/python3 + + # Cleanup + rm -f "$PYTHON_PKG" + + echo "Python 3.14 installation completed" + fi + condition: eq(variables['pythonVersion'], '3.14') + displayName: 'Install Python 3.14 from python.org' + + # Python 3.10-3.13: Use standard Azure Pipelines task - task: UsePythonVersion@0 inputs: versionSpec: '$(pythonVersion)' addToPath: true + condition: ne(variables['pythonVersion'], '3.14') displayName: 'Use Python $(pythonVersion) on macOS' - script: | From bcff2282b1742f424d281c7bc0904d7b82508425 Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 27 May 2026 13:44:04 +0530 Subject: [PATCH 5/6] FIX: Revert Ubuntu ARM64 to 22.04 to avoid 1-hour timeout - keep x86_64 on 24.04 --- eng/pipelines/pr-validation-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index 097acb7c3..d1455da9b 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -1006,7 +1006,7 @@ jobs: strategy: matrix: Ubuntu_ARM64: - dockerImage: 'ubuntu:24.04' + dockerImage: 'ubuntu:22.04' distroName: 'Ubuntu' archName: 'arm64' Debian_ARM64: @@ -1104,7 +1104,7 @@ jobs: # Download the package to configure the Microsoft repo if [[ '$(distroName)' =~ ^Ubuntu ]]; then - curl -sSL -O https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb + curl -sSL -O https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb else # Debian 12 curl -sSL -O https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb From 767fe76bfa29616dcc9055599b11b63718536e84 Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 27 May 2026 14:12:28 +0530 Subject: [PATCH 6/6] FIX: Simplify macOS Python 3.14 installation to use UsePythonVersion@0 like build pipeline --- eng/pipelines/pr-validation-pipeline.yml | 36 ------------------------ 1 file changed, 36 deletions(-) diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index d1455da9b..5f6efbc10 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -476,46 +476,10 @@ jobs: pythonVersion: '3.14' steps: - # Python 3.14 Installation for macOS: Download from python.org (not yet in UsePythonVersion@0) - - script: | - if [ "$(pythonVersion)" = "3.14" ]; then - echo "Python 3.14 detected - downloading from python.org..." - - # Download Python 3.14 universal2 installer - PYTHON_PKG="python-3.14.0-macos11.pkg" - curl -o "$PYTHON_PKG" "https://www.python.org/ftp/python/3.14.0/$PYTHON_PKG" - - # Install Python - sudo installer -pkg "$PYTHON_PKG" -target / - - # Python 3.14 is installed to /Library/Frameworks/Python.framework/Versions/3.14 - PYTHON_PATH="/Library/Frameworks/Python.framework/Versions/3.14/bin" - - # Add to PATH - echo "##vso[task.prependpath]$PYTHON_PATH" - - # Verify installation - "$PYTHON_PATH/python3.14" --version - "$PYTHON_PATH/python3.14" -c "import sys; print('Python:', sys.executable)" - - # Create symlink for convenience - sudo ln -sf "$PYTHON_PATH/python3.14" /usr/local/bin/python - sudo ln -sf "$PYTHON_PATH/python3.14" /usr/local/bin/python3 - - # Cleanup - rm -f "$PYTHON_PKG" - - echo "Python 3.14 installation completed" - fi - condition: eq(variables['pythonVersion'], '3.14') - displayName: 'Install Python 3.14 from python.org' - - # Python 3.10-3.13: Use standard Azure Pipelines task - task: UsePythonVersion@0 inputs: versionSpec: '$(pythonVersion)' addToPath: true - condition: ne(variables['pythonVersion'], '3.14') displayName: 'Use Python $(pythonVersion) on macOS' - script: |