From 0d1c3cd040bd3a7b314e64c7977481c90f250f1c Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Wed, 31 Aug 2022 00:22:18 +0000 Subject: [PATCH] Update other python dependencies. Bug: None Test: ./checkbuild.py pythonlint Test: treehugger Change-Id: I09000f473fadeef9db746fcf733a70d1d36d9a4a --- ndk/checkbuild.py | 2 +- ndk/workqueue.py | 2 +- poetry.lock | 86 ++++++++++++------------------ pyproject.toml | 10 ++-- scripts/update_kokoro_prebuilts.py | 2 +- 5 files changed, 41 insertions(+), 61 deletions(-) diff --git a/ndk/checkbuild.py b/ndk/checkbuild.py index a746a4bd..4c427365 100755 --- a/ndk/checkbuild.py +++ b/ndk/checkbuild.py @@ -2744,7 +2744,7 @@ def main() -> None: ndk_dir, out_dir, dist_dir, args.system, args.build_number ) packaged_size_bytes = package_path.stat().st_size - packaged_size = packaged_size_bytes // (2 ** 20) + packaged_size = packaged_size_bytes // (2**20) good = True test_timer = ndk.timer.Timer() diff --git a/ndk/workqueue.py b/ndk/workqueue.py index d74691cc..1fdea3dd 100644 --- a/ndk/workqueue.py +++ b/ndk/workqueue.py @@ -556,7 +556,7 @@ def add_task( group: ShardingGroupType, func: Callable[..., ResultT], *args: Any, - **kwargs: Any + **kwargs: Any, ) -> None: self.task_queues[group].put(Task(func, args, kwargs)) self.num_tasks += 1 diff --git a/poetry.lock b/poetry.lock index c19bf471..fe6a682f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -16,7 +16,7 @@ wrapt = [ [[package]] name = "atomicwrites" -version = "1.4.0" +version = "1.4.1" description = "Atomic file writes." category = "dev" optional = false @@ -24,51 +24,47 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "21.4.0" +version = "22.1.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.5" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"] [[package]] name = "black" -version = "21.12b0" +version = "22.6.0" description = "The uncompromising code formatter." category = "dev" optional = false python-versions = ">=3.6.2" [package.dependencies] -click = ">=7.1.2" +click = ">=8.0.0" mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0,<1" +pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = ">=0.2.6,<2.0.0" -typing-extensions = [ - {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, - {version = "!=3.10.0.1", markers = "python_version >= \"3.10\""}, -] +tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} +typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] colorama = ["colorama (>=0.4.3)"] d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -python2 = ["typed-ast (>=1.4.3)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "click" -version = "8.0.3" +version = "8.1.3" description = "Composable command line interface toolkit" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -124,15 +120,15 @@ python-versions = ">=3.6" [[package]] name = "mccabe" -version = "0.6.1" +version = "0.7.0" description = "McCabe checker, plugin for flake8" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [[package]] name = "mypy" -version = "0.931" +version = "0.971" description = "Optional static typing for Python" category = "dev" optional = false @@ -140,12 +136,13 @@ python-versions = ">=3.6" [package.dependencies] mypy-extensions = ">=0.4.3" -tomli = ">=1.1.0" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} typing-extensions = ">=3.10" [package.extras] dmypy = ["psutil (>=4.0)"] python2 = ["typed-ast (>=1.4.0,<2)"] +reports = ["lxml"] [[package]] name = "mypy-extensions" @@ -176,15 +173,15 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [[package]] name = "platformdirs" -version = "2.4.1" +version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false python-versions = ">=3.7" [package.extras] -docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] [[package]] name = "pluggy" @@ -231,22 +228,22 @@ testutils = ["gitpython (>3)"] [[package]] name = "pyparsing" -version = "3.0.7" -description = "Python parsing module" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.6.8" [package.extras] -diagrams = ["jinja2", "railroad-diagrams"] +diagrams = ["railroad-diagrams", "jinja2"] [[package]] name = "pytest" -version = "6.2.5" +version = "7.1.2" description = "pytest: simple powerful testing with Python" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} @@ -256,18 +253,10 @@ iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" py = ">=1.8.2" -toml = "*" +tomli = ">=1.0.0" [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] - -[[package]] -name = "toml" -version = "0.10.2" -description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "tomli" @@ -287,19 +276,11 @@ python-versions = ">=3.6,<4.0" [[package]] name = "typing-extensions" -version = "4.0.1" -description = "Backported and Experimental Type Hints for Python 3.6+" +version = "4.3.0" +description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false -python-versions = ">=3.6" - -[[package]] -name = "wrapt" -version = "1.13.3" -description = "Module for decorators, wrappers and monkey patching." -category = "dev" -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.7" [[package]] name = "wrapt" @@ -312,7 +293,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [metadata] lock-version = "1.1" python-versions = "^3.9" -content-hash = "eafef02ac059af3eddc4836c5c4cc36ed23888d488f74bd1c7d07f485cca8f8e" +content-hash = "b091ed45cd7bb2c8b783e337a279ca0e2dcd212d0fade1877014d78d06e1ec4c" [metadata.files] astroid = [] @@ -336,7 +317,6 @@ py = [] pylint = [] pyparsing = [] pytest = [] -toml = [] tomli = [] tomlkit = [] typing-extensions = [] diff --git a/pyproject.toml b/pyproject.toml index 48d2ffb3..4c4900fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,16 +6,16 @@ authors = ["The Android Open Source Project"] license = "Apache-2.0" [tool.poetry.dependencies] -python = "^3.9" +python = "^3.10" [tool.poetry.dev-dependencies] # Poetry handles 0.* differently than other versions. ^0.1 may not upgrade to # 0.2, but ^1.1 may upgrade to 1.2. # https://python-poetry.org/docs/dependency-specification/ -mypy = "^0" -pylint = "^2.12.2" -pytest = "^6.2.5" -black = "^21.12b0" +mypy = "^0.971" +pylint = "^2.15.0" +pytest = "^7.1.2" +black = "^22.6.0" [build-system] requires = ["poetry-core>=1.0.0"] diff --git a/scripts/update_kokoro_prebuilts.py b/scripts/update_kokoro_prebuilts.py index b9ca34a5..3d248253 100755 --- a/scripts/update_kokoro_prebuilts.py +++ b/scripts/update_kokoro_prebuilts.py @@ -239,7 +239,7 @@ class LsLine: for ls_line in ls_output.stdout.splitlines(): logger().debug("gsutil ls output: %s", ls_line) match = re.match( - fr"(gs://{GCS_BUCKET}/prod/" + rf"(gs://{GCS_BUCKET}/prod/" r"(.*)/" # Kokoro job name (e.g. ndk/cmake/linux_release) r"\d+/" # build number (e.g. 17) r"\d+-\d+)" # timestamp (e.g. 20211109-203945)