Reland "Reland "Migrate vpython to 3.11 from 3.8""
This is a reland of commit56e1b8e150
Original CL was reverted for a deprecated package causing the linux-chrome ci bot to fail. (https://ci.chromium.org/ui/p/chrome/builders/ci/linux-chrome/81757/overview) The deprecated package usage was removed in: https://chromium-review.googlesource.com/c/chromium/src/+/5869467 Original change's description: > Reland "Migrate vpython to 3.11 from 3.8" > > This is a reland of commit39bf65f204
> > It was reverted because some pydeps didn't match, breaking the > chromium_presubmit. This is because python 3.9+ uses an absolute > path instead of a relative path for the __file__. This reland contains > a fix for print_python_deps. > > Original change's description: > > Migrate vpython to 3.11 from 3.8 > > > > Bug: 40942322 > > Change-Id: Ib2eb55fb3bb255d4e2bcb8cd5c40fa940de60462 > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5629964 > > Reviewed-by: Brian Sheedy <bsheedy@chromium.org> > > Reviewed-by: Ben Pastene <bpastene@chromium.org> > > Reviewed-by: Jonathan Lee <jonathanjlee@google.com> > > Commit-Queue: Benjamin Joyce (Ben) <bjoyce@chromium.org> > > Cr-Commit-Position: refs/heads/main@{#1354043} > > Bug: 40942322 > Change-Id: I678d4f5a2de7540d1a85422043f6d576463246b7 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5854768 > Reviewed-by: Andrew Grieve <agrieve@chromium.org> > Commit-Queue: Benjamin Joyce (Ben) <bjoyce@chromium.org> > Reviewed-by: Ben Pastene <bpastene@chromium.org> > Reviewed-by: Brian Sheedy <bsheedy@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1356576} Bug: 40942322 Change-Id: If99bff4b2cd262dba06b12285808228be5362cc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5870844 Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Ben Pastene <bpastene@chromium.org> Reviewed-by: Andrew Grieve <agrieve@chromium.org> Commit-Queue: Benjamin Joyce (Ben) <bjoyce@chromium.org> Cr-Commit-Position: refs/heads/main@{#1357829}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
ac540c1d30
commit
12fef8519f
68
.vpython3
68
.vpython3
@ -22,20 +22,20 @@
|
||||
# Read more about `vpython` and how to modify this file here:
|
||||
# https://chromium.googlesource.com/infra/infra/+/main/doc/users/vpython.md
|
||||
|
||||
python_version: "3.8"
|
||||
python_version: "3.11"
|
||||
|
||||
# The default set of platforms vpython checks does not yet include mac-arm64.
|
||||
# Setting `verify_pep425_tag` to the list of platforms we explicitly must support
|
||||
# allows us to ensure that vpython specs stay mac-arm64-friendly
|
||||
verify_pep425_tag: [
|
||||
{python: "cp38", abi: "cp38", platform: "manylinux1_x86_64"},
|
||||
{python: "cp38", abi: "cp38", platform: "linux_arm64"},
|
||||
{python: "cp311", abi: "cp311", platform: "manylinux1_x86_64"},
|
||||
{python: "cp311", abi: "cp311", platform: "linux_arm64"},
|
||||
|
||||
{python: "cp38", abi: "cp38", platform: "macosx_10_10_intel"},
|
||||
{python: "cp38", abi: "cp38", platform: "macosx_11_0_arm64"},
|
||||
{python: "cp311", abi: "cp311", platform: "macosx_10_10_intel"},
|
||||
{python: "cp311", abi: "cp311", platform: "macosx_11_0_arm64"},
|
||||
|
||||
{python: "cp38", abi: "cp38", platform: "win32"},
|
||||
{python: "cp38", abi: "cp38", platform: "win_amd64"}
|
||||
{python: "cp311", abi: "cp311", platform: "win32"},
|
||||
{python: "cp311", abi: "cp311", platform: "win_amd64"}
|
||||
]
|
||||
|
||||
# Used by:
|
||||
@ -110,7 +110,7 @@ wheel: <
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/ninja/${vpython_platform}"
|
||||
version: "version:1.10.0.post2"
|
||||
version: "version:1.10.2.4.chromium.1"
|
||||
match_tag: <
|
||||
platform: "manylinux1_x86_64"
|
||||
>
|
||||
@ -125,7 +125,7 @@ wheel: <
|
||||
# Chromium tests using Telemetry function properly.
|
||||
wheel: <
|
||||
name: "infra/python/wheels/numpy/${vpython_platform}"
|
||||
version: "version:1.2x.supported.1"
|
||||
version: "version:1.23.5.chromium.4"
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pexpect/${vpython_platform}"
|
||||
@ -141,7 +141,7 @@ wheel: <
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pillow/${vpython_platform}"
|
||||
version: "version:8.3.1"
|
||||
version: "version:9.5.0"
|
||||
# There is currently no Linux arm/arm64 version in CIPD.
|
||||
not_match_tag: <
|
||||
platform: "linux_arm64"
|
||||
@ -149,7 +149,7 @@ wheel: <
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/opencv_python/${vpython_platform}"
|
||||
version: "version:4.5.3.56.chromium.4"
|
||||
version: "version:4.8.1.78.chromium.1"
|
||||
# There is currently no Linux arm/arm64 version in CIPD.
|
||||
not_match_tag: <
|
||||
platform: "linux_arm64"
|
||||
@ -176,8 +176,8 @@ wheel: <
|
||||
>
|
||||
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pyfakefs-py2_py3"
|
||||
version: "version:3.7.2"
|
||||
name: "infra/python/wheels/pyfakefs-py3"
|
||||
version: "version:5.5.0"
|
||||
>
|
||||
|
||||
# Used by:
|
||||
@ -188,7 +188,7 @@ wheel: <
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/python-dateutil-py2_py3"
|
||||
version: "version:2.7.3"
|
||||
version: "version:2.8.1"
|
||||
>
|
||||
|
||||
# Used by WPT importer
|
||||
@ -209,8 +209,8 @@ wheel: <
|
||||
version: "version:3.4.2"
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/cachetools-py2_py3"
|
||||
version: "version:2.0.1"
|
||||
name: "infra/python/wheels/cachetools-py3"
|
||||
version: "version:5.3.3"
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/uritemplate-py3"
|
||||
@ -254,7 +254,7 @@ wheel: <
|
||||
# //third_party/chromite/bin/cros chrome-sdk
|
||||
wheel: <
|
||||
name: "infra/python/wheels/crcmod/${vpython_platform}"
|
||||
version: "version:1.7.chromium.3"
|
||||
version: "version:1.7.chromium.4"
|
||||
>
|
||||
|
||||
wheel: <
|
||||
@ -321,7 +321,7 @@ wheel: <
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/mozprocess-py3"
|
||||
version: "version:1.3.0"
|
||||
version: "version:1.3.1"
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/urllib3-py2_py3"
|
||||
@ -369,11 +369,11 @@ wheel: <
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/cryptography/${vpython_platform}"
|
||||
version: "version:3.3.1.chromium.1"
|
||||
version: "version:3.3.2.chromium.1"
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/cffi/${vpython_platform}"
|
||||
version: "version:1.14.5.chromium.7"
|
||||
version: "version:1.15.1.chromium.2"
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pycparser-py2_py3"
|
||||
@ -432,9 +432,9 @@ wheel <
|
||||
version: "version:0.19.0"
|
||||
>
|
||||
|
||||
wheel <
|
||||
name: "infra/python/wheels/attrs-py2_py3"
|
||||
version: "version:21.4.0"
|
||||
wheel: <
|
||||
name: "infra/python/wheels/attrs-py3"
|
||||
version: "version:23.1.0"
|
||||
>
|
||||
|
||||
wheel <
|
||||
@ -449,7 +449,7 @@ wheel <
|
||||
|
||||
wheel <
|
||||
name: "infra/python/wheels/py-py2_py3"
|
||||
version: "version:1.10.0"
|
||||
version: "version:1.11.0"
|
||||
>
|
||||
|
||||
wheel <
|
||||
@ -471,7 +471,7 @@ wheel: <
|
||||
# testing/buildbot/generate_buildbot_json_coveragetest.py
|
||||
wheel: <
|
||||
name: "infra/python/wheels/coverage/${vpython_platform}"
|
||||
version: "version:5.5.chromium.3"
|
||||
version: "version:7.3.1"
|
||||
>
|
||||
|
||||
wheel: <
|
||||
@ -492,14 +492,14 @@ wheel: <
|
||||
# //tools/infra/find_bad_builds.py
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pytz-py2_py3"
|
||||
version: "version:2018.4"
|
||||
version: "version:2024.1"
|
||||
>
|
||||
|
||||
# Used by:
|
||||
# //third_party/blink/tools/blinkpy/web_tests/port/server_process.py
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pywin32/${vpython_platform}"
|
||||
version: "version:300"
|
||||
version: "version:306"
|
||||
match_tag: <
|
||||
platform: "win32"
|
||||
>
|
||||
@ -512,7 +512,7 @@ wheel: <
|
||||
# //content/test/gpu/gpu_tests/color_profile_manager_mac.py
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pyobjc/${vpython_platform}"
|
||||
version: "version:7.3.chromium.1"
|
||||
version: "version:10.0"
|
||||
match_tag: <
|
||||
platform: "macosx_10_10_intel"
|
||||
>
|
||||
@ -532,7 +532,7 @@ wheel: <
|
||||
# tools/perf/flakiness_cli
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pandas/${vpython_platform}"
|
||||
version: "version:1.3.2.chromium.1"
|
||||
version: "version:1.5.3.chromium.1"
|
||||
not_match_tag: <
|
||||
platform: "linux_arm64"
|
||||
>
|
||||
@ -674,6 +674,12 @@ wheel: <
|
||||
version: "version:3.1.2"
|
||||
>
|
||||
|
||||
# Needed by pytype
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pysocks-py3"
|
||||
version: "version:1.7.1"
|
||||
>
|
||||
|
||||
# Needed by pytype
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pycnite-py3"
|
||||
@ -692,3 +698,7 @@ wheel: <
|
||||
version: "version:2.0.1"
|
||||
>
|
||||
|
||||
wheel: <
|
||||
name: "infra/python/wheels/apipkg-py2_py3"
|
||||
version: "version:1.5"
|
||||
>
|
||||
|
@ -24,16 +24,16 @@ def ComputePythonDependencies():
|
||||
"""Gets the paths of imported non-system python modules.
|
||||
|
||||
A path is assumed to be a "system" import if it is outside of chromium's
|
||||
src/. The paths will be relative to the current directory.
|
||||
src/. The paths for __file__ are relative for python 3.8 and below. Paths are
|
||||
absolute after python 3.9.
|
||||
"""
|
||||
module_paths = (m.__file__ for m in sys.modules.values()
|
||||
if m and hasattr(m, '__file__') and m.__file__)
|
||||
if m and hasattr(m, '__file__') and m.__file__
|
||||
and m.__name__ != '__main__')
|
||||
|
||||
src_paths = set()
|
||||
for path in module_paths:
|
||||
if path == __file__:
|
||||
continue
|
||||
path = os.path.abspath(path)
|
||||
path = os.path.abspath(path) # paths can be relative before 3.9.
|
||||
if not path.startswith(_SRC_ROOT):
|
||||
continue
|
||||
|
||||
|
@ -23,12 +23,16 @@ class FindDependenciesTest(unittest.TestCase):
|
||||
'dependency_test_dir', 'other_animals', 'cat', 'cat')
|
||||
cat_module_init_path = os.path.join(cat_module_path, '__init__.py')
|
||||
cat_object_path = os.path.join(cat_module_path, 'cat_object.py')
|
||||
dependencies = set(
|
||||
p for p in find_dependencies.FindPythonDependencies(dog_object_path))
|
||||
self.assertEqual(dependencies, {
|
||||
answer_set = {
|
||||
dog_object_path, cat_module_path, cat_module_init_path,
|
||||
cat_object_path
|
||||
})
|
||||
}
|
||||
dependencies = set(
|
||||
p for p in find_dependencies.FindPythonDependencies(dog_object_path))
|
||||
|
||||
for path in answer_set:
|
||||
self.assertIn(path, dependencies)
|
||||
|
||||
except ImportError: # crbug.com/559527
|
||||
pass
|
||||
|
||||
|
@ -80,7 +80,7 @@ class ScriptsSmokeTest(unittest.TestCase):
|
||||
def testRunRecordWprHelp(self):
|
||||
return_code, stdout = self.RunPerfScript('record_wpr')
|
||||
self.assertEqual(return_code, 0, stdout)
|
||||
self.assertIn('optional arguments:', stdout)
|
||||
self.assertIn('positional arguments:', stdout)
|
||||
|
||||
@decorators.Disabled('chromeos') # crbug.com/814068
|
||||
def testRunRecordWprList(self):
|
||||
|
Reference in New Issue
Block a user