Skip to content

Commit 475d2a3

Browse files
stephenmcgruermoz-wptsync-bot
authored andcommitted
Bug 1689501 [wpt PR 27379] - [python3] Remove Python 2 tasks from the CI, a=testonly
Automatic update from web-platform-tests [python3] Bring py3-flake8.ini up-to-date with py27-flake8.ini -- [taskcluster] Remove python2 tasks from Taskcluster CI Step 3 of https://github.com/web-platform-tests/rfcs/blob/master/rfcs/py_3.md -- [Azure Pipelines] Remove Python 2 from Azure Pipelines CI Step 3 of https://github.com/web-platform-tests/rfcs/blob/master/rfcs/py_3.md -- [python3] Update the bare minimum docs for dropping Py2 support There are probably references still remaining to Python 2, but this should remove the most egregious cases. -- wpt-commits: a3e8c672b0f5c63f0023d0f69871785788f85c2d, 7abcd71cdc84a5d17047079a1daceb04edb2da3e, 6b197f497940666c041294367adf52eddb2faa25, cc214bb6cd8a525ea104c7311e9f2f3b0cb65fbd wpt-pr: 27379
1 parent e6f8d2f commit 475d2a3

File tree

11 files changed

+13
-249
lines changed

11 files changed

+13
-249
lines changed

testing/web-platform/tests/.azure-pipelines.yml

-126
Original file line numberDiff line numberDiff line change
@@ -117,24 +117,6 @@ jobs:
117117
displayName: 'Run tests (Safari Technology Preview)'
118118
- template: tools/ci/azure/publish_logs.yml
119119

120-
- job: tools_unittest_mac
121-
displayName: 'tools/ unittests: macOS'
122-
dependsOn: decision
123-
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
124-
pool:
125-
vmImage: 'macOS-10.15'
126-
variables:
127-
HYPOTHESIS_PROFILE: ci
128-
steps:
129-
- task: UsePythonVersion@0
130-
inputs:
131-
versionSpec: '2.7.x'
132-
- template: tools/ci/azure/checkout.yml
133-
- template: tools/ci/azure/tox_pytest.yml
134-
parameters:
135-
directory: tools/
136-
toxenv: py27
137-
138120
- job: tools_unittest_mac_py36
139121
displayName: 'tools/ unittests: macOS + Python 3.6'
140122
dependsOn: decision
@@ -167,24 +149,6 @@ jobs:
167149
directory: tools/
168150
toxenv: py38
169151

170-
- job: wptrunner_unittest_mac
171-
displayName: 'tools/wptrunner/ unittests: macOS'
172-
dependsOn: decision
173-
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
174-
pool:
175-
vmImage: 'macOS-10.15'
176-
variables:
177-
HYPOTHESIS_PROFILE: ci
178-
steps:
179-
- task: UsePythonVersion@0
180-
inputs:
181-
versionSpec: '2.7.x'
182-
- template: tools/ci/azure/checkout.yml
183-
- template: tools/ci/azure/tox_pytest.yml
184-
parameters:
185-
directory: tools/wptrunner/
186-
toxenv: py27
187-
188152
- job: wptrunner_unittest_mac_py36
189153
displayName: 'tools/wptrunner/ unittests: macOS + Python 3.6'
190154
dependsOn: decision
@@ -217,32 +181,6 @@ jobs:
217181
directory: tools/wptrunner/
218182
toxenv: py38
219183

220-
- job: wpt_integration_mac
221-
displayName: 'tools/wpt/ tests: macOS'
222-
dependsOn: decision
223-
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
224-
pool:
225-
vmImage: 'macOS-10.15'
226-
variables:
227-
HYPOTHESIS_PROFILE: ci
228-
steps:
229-
# full checkout required
230-
- task: UsePythonVersion@0
231-
inputs:
232-
versionSpec: '2.7.x'
233-
- template: tools/ci/azure/install_chrome.yml
234-
- template: tools/ci/azure/install_firefox.yml
235-
- template: tools/ci/azure/update_hosts.yml
236-
parameters:
237-
pyflag: --py2
238-
- template: tools/ci/azure/update_manifest.yml
239-
parameters:
240-
pyflag: --py2
241-
- template: tools/ci/azure/tox_pytest.yml
242-
parameters:
243-
directory: tools/wpt/
244-
toxenv: py27
245-
246184
- job: wpt_integration_mac_py36
247185
displayName: 'tools/wpt/ tests: macOS + Python 3.6'
248186
dependsOn: decision
@@ -283,24 +221,6 @@ jobs:
283221
directory: tools/wpt/
284222
toxenv: py38
285223

286-
- job: tools_unittest_win
287-
displayName: 'tools/ unittests: Windows'
288-
dependsOn: decision
289-
condition: dependencies.decision.outputs['test_jobs.tools_unittest']
290-
pool:
291-
vmImage: 'windows-2019'
292-
variables:
293-
HYPOTHESIS_PROFILE: ci
294-
steps:
295-
- task: UsePythonVersion@0
296-
inputs:
297-
versionSpec: '2.7.x'
298-
- template: tools/ci/azure/checkout.yml
299-
- template: tools/ci/azure/tox_pytest.yml
300-
parameters:
301-
directory: tools/
302-
toxenv: py27
303-
304224
- job: tools_unittest_win_py36
305225
displayName: 'tools/ unittests: Windows + Python 3.6'
306226
dependsOn: decision
@@ -337,24 +257,6 @@ jobs:
337257
directory: tools/
338258
toxenv: py38
339259

340-
- job: wptrunner_unittest_win
341-
displayName: 'tools/wptrunner/ unittests: Windows'
342-
dependsOn: decision
343-
condition: dependencies.decision.outputs['test_jobs.wptrunner_unittest']
344-
pool:
345-
vmImage: 'windows-2019'
346-
variables:
347-
HYPOTHESIS_PROFILE: ci
348-
steps:
349-
- task: UsePythonVersion@0
350-
inputs:
351-
versionSpec: '2.7.x'
352-
- template: tools/ci/azure/checkout.yml
353-
- template: tools/ci/azure/tox_pytest.yml
354-
parameters:
355-
directory: tools/wptrunner/
356-
toxenv: py27
357-
358260
- job: wptrunner_unittest_win_py36
359261
displayName: 'tools/wptrunner/ unittests: Windows + Python 3.6'
360262
dependsOn: decision
@@ -389,34 +291,6 @@ jobs:
389291
directory: tools/wptrunner/
390292
toxenv: py38
391293

392-
- job: wpt_integration_win
393-
displayName: 'tools/wpt/ tests: Windows'
394-
dependsOn: decision
395-
condition: dependencies.decision.outputs['test_jobs.wpt_integration']
396-
pool:
397-
vmImage: 'windows-2019'
398-
variables:
399-
HYPOTHESIS_PROFILE: ci
400-
steps:
401-
# full checkout required
402-
- task: UsePythonVersion@0
403-
inputs:
404-
versionSpec: '2.7.x'
405-
# currently just using the outdated Chrome/Firefox on the VM rather than
406-
# figuring out how to install Chrome Dev channel on Windows
407-
# - template: tools/ci/azure/install_chrome.yml
408-
# - template: tools/ci/azure/install_firefox.yml
409-
- template: tools/ci/azure/update_hosts.yml
410-
parameters:
411-
pyflag: --py2
412-
- template: tools/ci/azure/update_manifest.yml
413-
parameters:
414-
pyflag: --py2
415-
- template: tools/ci/azure/tox_pytest.yml
416-
parameters:
417-
directory: tools/wpt/
418-
toxenv: py27
419-
420294
- job: wpt_integration_win_py36
421295
displayName: 'tools/wpt/ tests: Windows + Python 3.6'
422296
dependsOn: decision

testing/web-platform/tests/docs/running-tests/from-local-system.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ The tests are designed to be run from your local computer.
77
Running the tests requires `python`, `pip` and `virtualenv`, as well as updating
88
the system `hosts` file.
99

10-
Python 3 is supported and preferred, but for now it is still possible to use
11-
Python 2.7 if necessary.
10+
WPT requires Python 3.6 or higher.
1211

1312
The required setup is different depending on your operating system.
1413

@@ -45,10 +44,10 @@ See also [additional setup required to run Safari](safari.md).
4544

4645
### Windows Setup
4746

48-
Download and install [Python 2.7](https://www.python.org/downloads). The
47+
Download and install [Python 3](https://www.python.org/downloads). The
4948
installer includes `pip` by default.
5049

51-
Add `C:\Python27` and `C:\Python27\Scripts` to your `%Path%`
50+
Add `C:\Python39` and `C:\Python39\Scripts` to your `%Path%`
5251
[environment variable](http://www.computerhope.com/issues/ch000549.htm).
5352

5453
Finally, install `virtualenv`:

testing/web-platform/tests/docs/writing-tests/h2tests.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Writing H2 Tests
22

3-
> <b>Important:</b> The HTTP/2.0 server requires you to have Python 2.7.10+
4-
and OpenSSL 1.0.2+. This is because HTTP/2.0 is negotiated using the
3+
> <b>Important:</b> The HTTP/2.0 server requires you to have
4+
OpenSSL 1.0.2+. This is because HTTP/2.0 is negotiated using the
55
[TLS ALPN](https://tools.ietf.org/html/rfc7301) extension, which is only supported in [OpenSSL 1.0.2](https://www.openssl.org/news/openssl-1.0.2-notes.html) and up.
66

77
These instructions assume you are already familiar with the testing
@@ -153,4 +153,4 @@ the HEADER and CONTINUATION frames are constructed in the same way.
153153
Ends the stream with the given ID, or the one that request was made on if no ID given.
154154

155155
- <b>Parameters</b>
156-
- <b>stream_id</b>: Id of stream to send frame on. Will use the request stream ID if None
156+
- <b>stream_id</b>: Id of stream to send frame on. Will use the request stream ID if None

testing/web-platform/tests/docs/writing-tests/lint-tool.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ TRAILING WHITESPACE:example/*
6161

6262
Similarly, you can also
6363
use
64-
[shell-style wildcards](https://docs.python.org/2/library/fnmatch.html) to
64+
[shell-style wildcards](https://docs.python.org/library/fnmatch.html) to
6565
express other filename patterns or directory-name patterns.
6666

6767
Finally, to ignore just one line in a file, use the following format:

testing/web-platform/tests/docs/writing-tests/python-handlers/index.md

-15
Original file line numberDiff line numberDiff line change
@@ -81,21 +81,6 @@ css/css-align/resources/__init__.py
8181
This requirement will be removed once we move to Python 3, due to
8282
[PEP 420](https://www.python.org/dev/peps/pep-0420/).
8383

84-
### Python3 compatibility
85-
86-
Even though Python3 is not fully supported at this point, some work is being
87-
done to add compatibility for it. This is why you can see in multiple places
88-
the use of the `six` python module which is meant to provide a set of simple
89-
utilities that work for both generation of python (see
90-
[docs](https://six.readthedocs.io/)). The module is vendored in
91-
tools/third_party/six/six.py.
92-
93-
When an handler is added, it should be at least syntax-compatible with Python3.
94-
You can check that by running:
95-
```
96-
python3 -m py_compile <path/to/handler.py>
97-
```
98-
9984
## Example: Dynamic HTTP headers
10085

10186
The following code defines a Python handler that allows the requester to

testing/web-platform/tests/docs/writing-tests/server-features.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ by default and needs to be run using `./wpt serve --h2` in order to enable it.
127127
The HTTP/2.0 server supports handlers that work per-frame; these, along with the
128128
API are documented in [Writing H2 Tests](h2tests).
129129

130-
> <b>Important:</b> The HTTP/2.0 server requires you to have Python 2.7.10+
131-
and OpenSSL 1.0.2+. This is because HTTP/2.0 is negotiated using the
130+
> <b>Important:</b> The HTTP/2.0 server requires you to have
131+
OpenSSL 1.0.2+. This is because HTTP/2.0 is negotiated using the
132132
[TLS ALPN](https://tools.ietf.org/html/rfc7301) extension, which is only
133133
supported in
134134
[OpenSSL 1.0.2](https://www.openssl.org/news/openssl-1.0.2-notes.html) and up.
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
parameters:
2-
pyflag: --py3
3-
41
steps:
52
- script: ./wpt make-hosts-file | sudo tee -a /etc/hosts
63
displayName: 'Update hosts (macOS)'
74
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
85
- powershell: |
96
$hostFile = "$env:systemroot\System32\drivers\etc\hosts"
107
Copy-Item -Path $hostFile -Destination "$hostFile.back" -Force
11-
python wpt ${{ parameters.pyflag }} make-hosts-file | Out-File $env:systemroot\System32\drivers\etc\hosts -Encoding ascii -Append
8+
python wpt make-hosts-file | Out-File $env:systemroot\System32\drivers\etc\hosts -Encoding ascii -Append
129
displayName: 'Update hosts (Windows)'
1310
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
parameters:
2-
pyflag: --py3
3-
41
steps:
52
# `python wpt` instead of `./wpt` is to make this work on Windows:
6-
- script: python wpt ${{ parameters.pyflag }} manifest
3+
- script: python wpt manifest
74
displayName: 'Update manifest'

testing/web-platform/tests/tools/ci/tc/tasks/test.yml

-84
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ components:
105105

106106
browser-servo: {}
107107

108-
tox-python2:
109-
env:
110-
TOXENV: py27
111-
PY_COLORS: 0
112-
113108
tox-python3:
114109
env:
115110
TOXENV: py36
@@ -402,20 +397,6 @@ tasks:
402397
- update_built
403398
command: "./tools/ci/ci_built_diff.sh"
404399

405-
- tools/ unittests (Python 2):
406-
use:
407-
- wpt-base
408-
- trigger-pr
409-
- tox-python2
410-
description: >-
411-
Unit tests for tools running under Python 2.7, excluding wptrunner
412-
command: ./tools/ci/ci_tools_unittest.sh
413-
env:
414-
HYPOTHESIS_PROFILE: ci
415-
schedule-if:
416-
run-job:
417-
- tools_unittest
418-
419400
- tools/ unittests (Python 3.6):
420401
description: >-
421402
Unit tests for tools running under Python 3.6, excluding wptrunner
@@ -447,28 +428,6 @@ tasks:
447428
run-job:
448429
- tools_unittest
449430

450-
- tools/ integration tests (Python 2):
451-
description: >-
452-
Integration tests for tools running under Python 2.7
453-
use:
454-
- wpt-base
455-
- trigger-pr
456-
- tox-python2
457-
command: ./tools/ci/ci_tools_integration_test.sh
458-
install:
459-
- libnss3-tools
460-
options:
461-
oom-killer: true
462-
browser:
463-
- firefox
464-
- chrome
465-
channel: experimental
466-
xvfb: true
467-
hosts: true
468-
schedule-if:
469-
run-job:
470-
- wpt_integration
471-
472431
- tools/ integration tests (Python 3.6):
473432
description: >-
474433
Integration tests for tools running under Python 3.6
@@ -515,23 +474,6 @@ tasks:
515474
run-job:
516475
- wpt_integration
517476

518-
- resources/ tests (Python 2):
519-
description: >-
520-
Tests for testharness.js and other files in resources/ under Python 2.7
521-
use:
522-
- wpt-base
523-
- trigger-pr
524-
- tox-python2
525-
command: ./tools/ci/ci_resources_unittest.sh
526-
options:
527-
browser:
528-
- firefox
529-
xvfb: true
530-
hosts: true
531-
schedule-if:
532-
run-job:
533-
- resources_unittest
534-
535477
- resources/ tests (Python 3.6):
536478
description: >-
537479
Tests for testharness.js and other files in resources/ under Python 3.6
@@ -572,32 +514,6 @@ tasks:
572514
run-job:
573515
- resources_unittest
574516

575-
- infrastructure/ tests:
576-
description: >-
577-
Smoketests for wptrunner
578-
vars:
579-
channel: nightly
580-
use:
581-
- wpt-base
582-
- trigger-pr
583-
- browser-firefox
584-
command: ./tools/ci/ci_wptrunner_infrastructure.sh --py2
585-
install:
586-
- libnss3-tools
587-
- libappindicator1
588-
- fonts-liberation
589-
options:
590-
oom-killer: true
591-
browser:
592-
- firefox
593-
- chrome
594-
channel: experimental
595-
xvfb: true
596-
hosts: false
597-
schedule-if:
598-
run-job:
599-
- wptrunner_infrastructure
600-
601517
- infrastructure/ tests (Python 3):
602518
description: >-
603519
Smoketests for wptrunner

0 commit comments

Comments
 (0)