Remove typed-ast python wheel.
Wheel is not supported in python 3.11, but thankfully nothing uses it currently. Landing separately from python3.11 update to reduce culprits for any potential problems from 3.11 update. Removal requires updating pytype to version:2024.1.24 and other libraries. Bug: 40942322 Change-Id: I316f742ae4786ec8f85057f1e1fe7e2861ab93dc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5610112 Reviewed-by: Brian Sheedy <bsheedy@chromium.org> Reviewed-by: Ben Pastene <bpastene@chromium.org> Commit-Queue: Benjamin Joyce (Ben) <bjoyce@chromium.org> Cr-Commit-Position: refs/heads/main@{#1342861}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
6da2f2b128
commit
7987dd8330
.vpython3
content/test/gpu
flake_suppressor
gpu_tests
testing/unexpected_passes_common
third_party/blink/tools/blinkpy/web_tests/stale_expectation_removal
46
.vpython3
46
.vpython3
@ -59,14 +59,14 @@ wheel: <
|
||||
# platform.
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pytype/${vpython_platform}"
|
||||
version: "version:2021.11.2"
|
||||
version: "version:2024.1.24"
|
||||
match_tag: <
|
||||
platform: "manylinux1_x86_64"
|
||||
>
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/importlab-py3"
|
||||
version: "version:0.6.1"
|
||||
version: "version:0.8"
|
||||
match_tag: <
|
||||
platform: "manylinux1_x86_64"
|
||||
>
|
||||
@ -86,8 +86,8 @@ wheel: <
|
||||
>
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/libcst-py3"
|
||||
version: "version:0.3.19"
|
||||
name: "infra/python/wheels/libcst/${vpython_platform}"
|
||||
version: "version:1.1.0"
|
||||
match_tag: <
|
||||
platform: "manylinux1_x86_64"
|
||||
>
|
||||
@ -101,21 +101,14 @@ wheel: <
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/typing-extensions-py3"
|
||||
version: "version:4.0.1"
|
||||
version: "version:4.3.0"
|
||||
match_tag: <
|
||||
platform: "manylinux1_x86_64"
|
||||
>
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/tabulate-py3"
|
||||
version: "version:0.8.9"
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/typed-ast/${vpython_platform}"
|
||||
version: "version:1.5.3"
|
||||
match_tag: <
|
||||
platform: "manylinux1_x86_64"
|
||||
>
|
||||
version: "version:0.8.10"
|
||||
>
|
||||
wheel: <
|
||||
name: "infra/python/wheels/ninja/${vpython_platform}"
|
||||
@ -411,7 +404,7 @@ wheel: <
|
||||
|
||||
wheel: <
|
||||
name: "infra/python/wheels/toml-py3"
|
||||
version: "version:0.10.1"
|
||||
version: "version:0.10.2"
|
||||
>
|
||||
|
||||
# Used by: pytest-py3:7.3.1
|
||||
@ -671,3 +664,28 @@ wheel: <
|
||||
platform: "win32"
|
||||
>
|
||||
>
|
||||
|
||||
# Needed by pytype
|
||||
wheel: <
|
||||
name: "infra/python/wheels/jinja2-py3"
|
||||
version: "version:3.1.2"
|
||||
>
|
||||
|
||||
# Needed by pytype
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pycnite-py3"
|
||||
version: "version:2023.10.11"
|
||||
>
|
||||
|
||||
# Needed by pytype
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pydot-py2_py3"
|
||||
version: "version:1.4.2"
|
||||
>
|
||||
|
||||
# Needed by jinja2
|
||||
wheel: <
|
||||
name: "infra/python/wheels/markupsafe/${vpython_platform}"
|
||||
version: "version:2.0.1"
|
||||
>
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
import base64
|
||||
from email.message import EmailMessage
|
||||
import os
|
||||
from typing import Any
|
||||
import unittest
|
||||
@ -92,7 +93,8 @@ mode type hash bar_tests.txt"""
|
||||
"""Tests that getting a non-200 status code back results in a failure."""
|
||||
|
||||
def SideEffect(_: Any) -> None:
|
||||
raise urllib.error.HTTPError('url', 404, 'No exist :(', {}, None)
|
||||
raise urllib.error.HTTPError('url', 404, 'No exist :(', EmailMessage(),
|
||||
None)
|
||||
|
||||
self._get_mock.side_effect = SideEffect
|
||||
with self.assertRaises(urllib.error.HTTPError):
|
||||
|
@ -108,9 +108,12 @@ def CaptureFullScreenshotOnFuchsia(browser: browser_module.Browser) -> bool:
|
||||
|
||||
def MapsTestCases() -> List[ExpectedColorTestCase]:
|
||||
class TestActionStartMapsTest(sghitb.TestAction):
|
||||
def Run(self, test_case: ExpectedColorTestCase, tab_data: sghitb.TabData,
|
||||
loop_state: sghitb.LoopState,
|
||||
test_instance: sghitb.SkiaGoldHeartbeatIntegrationTestBase) -> None:
|
||||
|
||||
def Run(
|
||||
self, test_case: ExpectedColorTestCase, tab_data: sghitb.TabData,
|
||||
loop_state: sghitb.LoopState,
|
||||
test_instance: sghitb.SkiaGoldHeartbeatIntegrationTestBase
|
||||
) -> None: # pytype: disable=signature-mismatch
|
||||
sghitb.EvalInTestIframe(
|
||||
tab_data.tab, """
|
||||
function _checkIfTestCanStart() {
|
||||
|
@ -301,10 +301,9 @@ def GetMockArgs(webgl_version: str = '1.0.0') -> mock.MagicMock:
|
||||
return args
|
||||
|
||||
|
||||
def MatchDriverTag(tag: str) -> Match[str]:
|
||||
def MatchDriverTag(tag: str) -> Optional[Match[str]]:
|
||||
return DRIVER_TAG_MATCHER.match(tag.lower())
|
||||
|
||||
|
||||
# No good way to reduce the number of local variables, particularly since each
|
||||
# argument is also considered a local. Also no good way to reduce the number of
|
||||
# branches without harming readability.
|
||||
@ -385,11 +384,13 @@ def IsDriverTagDuplicated(driver_tag1: str, driver_tag2: str) -> bool:
|
||||
return True
|
||||
|
||||
match = MatchDriverTag(driver_tag1)
|
||||
assert match is not None
|
||||
vendor1 = match.group(1)
|
||||
operation1 = match.group(2)
|
||||
version1 = match.group(3)
|
||||
|
||||
match = MatchDriverTag(driver_tag2)
|
||||
assert match is not None
|
||||
vendor2 = match.group(1)
|
||||
operation2 = match.group(2)
|
||||
version2 = match.group(3)
|
||||
|
@ -122,6 +122,7 @@ class PixelTestPage(sghitb.SkiaGoldHeartbeatTestCase):
|
||||
requires_fullscreen_os_screenshot_func = lambda: False
|
||||
self.RequiresFullScreenOSScreenshot = requires_fullscreen_os_screenshot_func
|
||||
|
||||
# pytype: disable=signature-mismatch
|
||||
|
||||
class TestActionCrashGpuProcess(sghitb.TestAction):
|
||||
"""Runs JavaScript to crash the GPU process once."""
|
||||
@ -251,7 +252,7 @@ class TestActionRunLowToHighPowerTest(sghitb.TestAction):
|
||||
is_dual_gpu = test_instance.IsDualGPUMacLaptop()
|
||||
sghitb.EvalInTestIframe(tab_data.tab,
|
||||
'initialize(%s)' % json.dumps(is_dual_gpu))
|
||||
|
||||
# pytype: enable=signature-mismatch
|
||||
|
||||
def GetMediaStreamTestBrowserArgs(media_stream_source_relpath: str
|
||||
) -> List[str]:
|
||||
|
@ -131,7 +131,9 @@ def _GetAvailableGpus() -> List[_Gpu]:
|
||||
|
||||
@functools.lru_cache(maxsize=1)
|
||||
def _GetWmiWbem() -> Any:
|
||||
# pytype: disable=name-error
|
||||
wmi_service = win32com.client.Dispatch('WbemScripting.SWbemLocator')
|
||||
# pytype: enable=name-error
|
||||
return wmi_service.ConnectServer('.', _WMI_DEFAULT_NAMESPACE)
|
||||
|
||||
|
||||
@ -224,7 +226,7 @@ def _get_system_profiler(data_type: str) -> dict:
|
||||
process = subprocess.run(['system_profiler', data_type, '-xml'],
|
||||
stdout=subprocess.PIPE,
|
||||
check=True)
|
||||
plist = plistlib.loads(process.stdout)
|
||||
plist = plistlib.loads(process.stdout) # pytype: disable=name-error
|
||||
return plist[0].get('_items', [])
|
||||
|
||||
|
||||
|
@ -307,7 +307,8 @@ class BaseTypedMap(dict):
|
||||
for k, v in other.items():
|
||||
self[k] = v
|
||||
for k, v in kwargs.items():
|
||||
self[k] = v
|
||||
# TODO(crbug/352408455): Fix type error instead of disabling.
|
||||
self[k] = v # pytype: disable=unsupported-operands
|
||||
|
||||
def setdefault(self, key: Any, value: Any = None) -> Any:
|
||||
if key not in self:
|
||||
|
@ -108,14 +108,14 @@ class GenericBuilders(builders.Builders):
|
||||
def _BuilderRunsTestOfInterest(self, _test_map) -> bool:
|
||||
return True
|
||||
|
||||
def GetIsolateNames(self) -> dict:
|
||||
return {}
|
||||
def GetIsolateNames(self) -> Set[str]:
|
||||
return set()
|
||||
|
||||
def GetFakeCiBuilders(self) -> dict:
|
||||
return {}
|
||||
|
||||
def GetNonChromiumBuilders(self) -> dict:
|
||||
return {}
|
||||
def GetNonChromiumBuilders(self) -> Set[data_types.BuilderEntry]:
|
||||
return set()
|
||||
|
||||
|
||||
def RegisterGenericBuildersImplementation() -> None:
|
||||
|
@ -129,9 +129,12 @@ class WebTestTestExpectationMap(data_types.BaseTestExpectationMap):
|
||||
Identical to the base implementation except it correctly handles adding
|
||||
slow results.
|
||||
"""
|
||||
|
||||
# pytype: disable=signature-mismatch
|
||||
# Pytype complains that WebTestResult is not a type of BaseResult, despite
|
||||
# WebTestResult being a child. Suspected bug, but pytype team was laid off.
|
||||
def _AddSingleResult(self, result: WebTestResult,
|
||||
stats: data_types.BuildStats) -> None:
|
||||
# pytype: enable=signature-mismatch
|
||||
super(WebTestTestExpectationMap, self)._AddSingleResult(result, stats)
|
||||
if result.is_slow_result:
|
||||
stats.AddSlowBuild(result.build_id)
|
||||
|
Reference in New Issue
Block a user