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

Update CI to Python 3.10 #33108

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/affected_tests.yml
parameters:
artifactName: 'safari-preview-affected-tests'
Expand All @@ -58,7 +58,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/affected_tests.yml
parameters:
checkoutCommit: 'HEAD^1'
Expand All @@ -79,7 +79,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/checkout.yml
- script: |
set -eux -o pipefail
Expand All @@ -100,7 +100,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/pip_install.yml
parameters:
Expand Down Expand Up @@ -143,21 +143,21 @@ jobs:
directory: tools/
toxenv: py37

- job: tools_unittest_mac_py39
displayName: 'tools/ unittests: macOS + Python 3.9'
- job: tools_unittest_mac_py310
displayName: 'tools/ unittests: macOS + Python 3.10'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
vmImage: 'macOS-11'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/
toxenv: py39
toxenv: py310

- job: wptrunner_unittest_mac_py37
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.7'
Expand All @@ -175,21 +175,21 @@ jobs:
directory: tools/wptrunner/
toxenv: py37

- job: wptrunner_unittest_mac_py39
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.9'
- job: wptrunner_unittest_mac_py310
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.10'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
vmImage: 'macOS-11'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/wptrunner/
toxenv: py39
toxenv: py310

- job: wpt_integration_mac_py37
displayName: 'tools/wpt/ tests: macOS + Python 3.7'
Expand All @@ -211,8 +211,8 @@ jobs:
directory: tools/wpt/
toxenv: py37

- job: wpt_integration_mac_py39
displayName: 'tools/wpt/ tests: macOS + Python 3.9'
- job: wpt_integration_mac_py310
displayName: 'tools/wpt/ tests: macOS + Python 3.10'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
Expand All @@ -221,15 +221,15 @@ jobs:
# full checkout required
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/install_chrome.yml
- template: tools/ci/azure/install_firefox.yml
- template: tools/ci/azure/update_hosts.yml
- template: tools/ci/azure/update_manifest.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/wpt/
toxenv: py39
toxenv: py310

- job: tools_unittest_win_py37
displayName: 'tools/ unittests: Windows + Python 3.6'
Expand All @@ -250,22 +250,22 @@ jobs:
directory: tools/
toxenv: py37

- job: tools_unittest_win_py39
displayName: 'tools/ unittests: Windows + Python 3.9'
- job: tools_unittest_win_py310
displayName: 'tools/ unittests: Windows + Python 3.10'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
pool:
vmImage: 'windows-2019'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
addToPath: false
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/
toxenv: py39
toxenv: py310

- job: wptrunner_unittest_win_py36
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.6'
Expand All @@ -284,22 +284,22 @@ jobs:
directory: tools/wptrunner/
toxenv: py36

- job: wptrunner_unittest_win_py39
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.9'
- job: wptrunner_unittest_win_py310
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.10'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
pool:
vmImage: 'windows-2019'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
addToPath: false
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/wptrunner/
toxenv: py39
toxenv: py310

- job: wpt_integration_win_py36
displayName: 'tools/wpt/ tests: Windows + Python 3.6'
Expand All @@ -323,8 +323,8 @@ jobs:
directory: tools/wpt/
toxenv: py36

- job: wpt_integration_win_py39
displayName: 'tools/wpt/ tests: Windows + Python 3.9'
- job: wpt_integration_win_py310
displayName: 'tools/wpt/ tests: Windows + Python 3.10'
dependsOn: decision
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
pool:
Expand All @@ -333,7 +333,7 @@ jobs:
# full checkout required
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
# currently just using the outdated Chrome/Firefox on the VM rather than
# figuring out how to install Chrome Dev channel on Windows
# - template: tools/ci/azure/install_chrome.yml
Expand All @@ -343,7 +343,7 @@ jobs:
- template: tools/ci/azure/tox_pytest.yml
parameters:
directory: tools/wpt/
toxenv: py39
toxenv: py310

- job: infrastructure_win10
displayName: 'infrastructure/ tests: Windows 10'
Expand Down Expand Up @@ -493,7 +493,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/pip_install.yml
parameters:
Expand Down Expand Up @@ -533,7 +533,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
versionSpec: '3.10'
- template: tools/ci/azure/checkout.yml
- template: tools/ci/azure/pip_install.yml
parameters:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
# Documentation is generated using Python 3.9 due to spinx-js not
# supporting 3.10: https://github.com/mozilla/sphinx-js/issues/186
python-version: '3.9'
- name: Set up Node
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
python-version: '3.10'
- name: Checkout
uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regen_certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
python-version: '3.10'
- name: Checkout
uses: actions/checkout@v3
- name: Regenerate certs
Expand Down
3 changes: 2 additions & 1 deletion docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true

# General requirements not in the base image
# Documentation is generated using Python 3.9 due to spinx-js not
# supporting 3.10: https://github.com/mozilla/sphinx-js/issues/186
RUN apt-get -qqy update \
&& apt-get -qqy install git npm python3.9 python3.9-venv

Expand Down
2 changes: 1 addition & 1 deletion resources/test/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36,py37,py38,py39
envlist = py36,py37,py38,py39,py310
skipsdist=True

[testenv]
Expand Down
10 changes: 5 additions & 5 deletions tools/ci/azure/install_python.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
steps:
- powershell: |
$pythonPath = 'C:\Python39'
$pythonPath = 'C:\Python310'
$pythonInstallerLogPath = 'python_installer.log'
$installArgs = "/passive /log $pythonInstallerLogPath TargetDir=$pythonPath"

Write-Host "Downloading python installer exe"
$downloadPath = 'python_installer.exe'
Start-BitsTransfer -Source https://www.python.org/ftp/python/3.9.4/python-3.9.4-amd64.exe -Destination $downloadPath
Start-BitsTransfer -Source https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe -Destination $downloadPath
$hash = (Get-FileHash $downloadPath).Hash.ToLower()
$expectedHash = "58e6bb9d08fd250c1defb7a7a7247993b4ea349518ba877abb6364de85029e04"
$expectedHash = "42b181e9b5f424472212742a187260d4edc73b7683ae83460c974508130e08ad"
if ($hash.Equals($expectedHash)) {
Write-Host "$downloadPath hash verified"
} else {
Expand All @@ -27,8 +27,8 @@ steps:
Write-Host "$downloadPath finished. Exit code was: $($p.ExitCode)"

Write-Host "Adding Python dirs to path"
Write-Host "##vso[task.prependpath]C:\Python39"
Write-Host "##vso[task.prependpath]C:\Python39\Scripts"
Write-Host "##vso[task.prependpath]C:\Python310"
Write-Host "##vso[task.prependpath]C:\Python310\Scripts"

Write-Host "Dumping install log file:"
Get-Content -Path "python_installer.log"
Expand Down
28 changes: 14 additions & 14 deletions tools/ci/tc/tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ components:
TOXENV: py36
PY_COLORS: 0

tox-python3_9:
tox-python3_10:
env:
TOXENV: py39
TOXENV: py310
PY_COLORS: 0
install:
- python3.9
- python3.9-distutils
- python3.9-dev
- python3.10
- python3.10-distutils
- python3.10-dev

tests-affected:
options:
Expand Down Expand Up @@ -420,13 +420,13 @@ tasks:
run-job:
- tools_unittest

- tools/ unittests (Python 3.9):
- tools/ unittests (Python 3.10):
description: >-
Unit tests for tools running under Python 3.9, excluding wptrunner
Unit tests for tools running under Python 3.10, excluding wptrunner
use:
- wpt-base
- trigger-pr
- tox-python3_9
- tox-python3_10
command: ./tools/ci/ci_tools_unittest.sh
env:
HYPOTHESIS_PROFILE: ci
Expand Down Expand Up @@ -458,13 +458,13 @@ tasks:
run-job:
- wpt_integration

- tools/ integration tests (Python 3.9):
- tools/ integration tests (Python 3.10):
description: >-
Integration tests for tools running under Python 3.9
Integration tests for tools running under Python 3.10
use:
- wpt-base
- trigger-pr
- tox-python3_9
- tox-python3_10
command: ./tools/ci/ci_tools_integration_test.sh
install:
- libnss3-tools
Expand Down Expand Up @@ -501,13 +501,13 @@ tasks:
run-job:
- resources_unittest

- resources/ tests (Python 3.9):
- resources/ tests (Python 3.10):
description: >-
Tests for testharness.js and other files in resources/ under Python 3.9
Tests for testharness.js and other files in resources/ under Python 3.10
use:
- wpt-base
- trigger-pr
- tox-python3_9
- tox-python3_10
command: ./tools/ci/ci_resources_unittest.sh
install:
- libnss3-tools
Expand Down
6 changes: 3 additions & 3 deletions tools/ci/tc/tests/test_valid.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ def test_verify_payload():
("pr_event.json", True, {".taskcluster.yml", ".travis.yml", "tools/ci/start.sh"},
['lint',
'tools/ unittests (Python 3.6)',
'tools/ unittests (Python 3.9)',
'tools/ unittests (Python 3.10)',
'tools/ integration tests (Python 3.6)',
'tools/ integration tests (Python 3.9)',
'tools/ integration tests (Python 3.10)',
'resources/ tests (Python 3.6)',
'resources/ tests (Python 3.9)',
'resources/ tests (Python 3.10)',
'download-firefox-nightly',
'infrastructure/ tests',
'sink-task']),
Expand Down
2 changes: 1 addition & 1 deletion tools/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36,py37,py38,py39,{py36,py37,py38,py39}-{flake8,mypy}
envlist = py36,py37,py38,py39,py310,{py36,py37,py38,py39,py310}-{flake8,mypy}
skipsdist=True
skip_missing_interpreters=False

Expand Down
2 changes: 1 addition & 1 deletion tools/wave/tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py36,py37,py38,py39
envlist = py36,py37,py38,py39,py310
skipsdist=True
skip_missing_interpreters = False

Expand Down
5 changes: 4 additions & 1 deletion tools/webtransport/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
aioquic==0.9.15
# aioquic 0.9.15 is the last to support Python 3.6, but doesn't have prebuilt
# wheels for Python 3.10, so use a different version depending on Python.
aioquic==0.9.15; python_version == '3.6'
aioquic==0.9.19; python_version != '3.6'
Loading