From dd8e5f559fbb2b8dd4f9941216d1de8a7e638bc5 Mon Sep 17 00:00:00 2001 From: Brian Caswell Date: Mon, 19 Jul 2021 14:48:43 -0400 Subject: [PATCH] update python dependencies --- src/api-service/__app__/requirements.txt | 20 ++++++++++---------- src/cli/onefuzz/backend.py | 13 ++++++------- src/cli/onefuzz/cli.py | 2 +- src/cli/requirements.txt | 12 +++++++----- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/api-service/__app__/requirements.txt b/src/api-service/__app__/requirements.txt index e0e9471088..46ce15a21e 100644 --- a/src/api-service/__app__/requirements.txt +++ b/src/api-service/__app__/requirements.txt @@ -1,18 +1,18 @@ azure-common~=1.1.25 -azure-core==1.14.0 +azure-core==1.16.0 azure-cosmosdb-nspkg==2.0.2 azure-cosmosdb-table==1.0.6 azure-devops==6.0.0b4 -azure-functions==1.5.0 +azure-functions==1.7.2 azure-graphrbac~=0.61.1 azure-identity==1.6.0 azure-keyvault-secrets~=4.3.0 -azure-mgmt-compute==19.0.0 -azure-mgmt-core==1.2.2 -azure-mgmt-loganalytics~=8.0.0 -azure-mgmt-network==18.0.0 +azure-mgmt-compute==22.0 +azure-mgmt-core==1.3.0 +azure-mgmt-loganalytics~=11.0.0 +azure-mgmt-network==19.0.0 azure-mgmt-storage~=18.0.0 -azure-mgmt-resource~=18.0.0 +azure-mgmt-resource~=18.1.0 azure-mgmt-subscription~=1.0.0 azure-nspkg==3.0.2 azure-storage-blob==12.8.1 @@ -25,9 +25,9 @@ pydantic==1.8.2 --no-binary=pydantic PyJWT>=2.1.0 requests~=2.25.1 memoization~=0.3.1 -github3.py~=1.3.0 -typing-extensions~=3.7.4.3 -jsonpatch==1.28 +github3.py~=2.0.0 +typing-extensions~=3.10.0.0 +jsonpatch==1.32 semver==2.13.0 base58==2.1.0 # onefuzz types version is set during build diff --git a/src/cli/onefuzz/backend.py b/src/cli/onefuzz/backend.py index 341ae7fb05..77d33bf7e8 100644 --- a/src/cli/onefuzz/backend.py +++ b/src/cli/onefuzz/backend.py @@ -31,8 +31,7 @@ import requests from azure.storage.blob import ContainerClient from pydantic import BaseModel, Field -from tenacity import Future as tenacity_future -from tenacity import Retrying, retry +from tenacity import RetryCallState, retry from tenacity.retry import retry_if_exception_type from tenacity.stop import stop_after_attempt from tenacity.wait import wait_random @@ -283,12 +282,12 @@ def request( return response.json() -def before_sleep( - retry_object: Retrying, sleep: float, last_result: tenacity_future -) -> None: - name = retry_object.fn.__name__ if retry_object.fn else "blob function" +def before_sleep(retry_state: RetryCallState) -> None: + name = retry_state.fn.__name__ if retry_state.fn else "blob function" - why = getattr(last_result, "_exception") + why: Optional[BaseException] = None + if retry_state.outcome is not None: + why = retry_state.outcome.exception() if why: LOGGER.warning("%s failed with %s, retrying ...", name, repr(why)) else: diff --git a/src/cli/onefuzz/cli.py b/src/cli/onefuzz/cli.py index cff5aa307e..ebd0c68727 100644 --- a/src/cli/onefuzz/cli.py +++ b/src/cli/onefuzz/cli.py @@ -190,7 +190,7 @@ def parse_function(self, func: Callable, parser: argparse.ArgumentParser) -> Non sig = inspect.signature(func) arg_docs = {} - docs = parse_docstring(func.__doc__) + docs = parse_docstring(func.__doc__ or "") for opt in docs.params: if opt.description: arg_docs[opt.arg_name] = opt.description diff --git a/src/cli/requirements.txt b/src/cli/requirements.txt index 731260451c..27ba3794b0 100644 --- a/src/cli/requirements.txt +++ b/src/cli/requirements.txt @@ -1,17 +1,19 @@ -msal~=1.10.0 +msal~=1.12.0 requests~=2.25.1 jmespath~=0.10.0 semver~=2.13.0 signalrcore==0.9.2 -asciimatics~=1.12.0 +asciimatics~=1.13.0 pydantic~=1.8.1 --no-binary=pydantic memoization~=0.3.1 msrestazure==0.6.4 azure-storage-blob~=12.8 azure-applicationinsights==0.1.0 -tenacity==6.3.1 -docstring_parser==0.7.3 -azure-cli-core==2.26.0 +tenacity==8.0.1 +docstring_parser==0.8.1 +azure-cli-core==2.26.1 +# packaging is required but not specified by azure-cli-core +packaging==20.9 # urllib3[secure] needs to be specifically stated for azure-cli-core urllib3[secure]>=1.26.5 # iDNA needs to be specifically stated for azure-cli-core