From ea79029bbb95e5c66abde07a1b7abbf5e6712d6a Mon Sep 17 00:00:00 2001 From: Kevin Su Date: Thu, 26 Aug 2021 15:18:56 +0800 Subject: [PATCH] SUBMARINE-922. Migrate to the next version of Python requests when released ### What is this PR for? Install latest `request` in the pysubmarine. See Github issue: https://github.com/apache/submarine/issues/661 Our python code uses requests library which has transitive dependency on a GPL lib chardet. We're not supposed to make an ASF release knowing there's a GPL transitive dependency so this is a blocker for our 0.6.0 release. Quickly checked the code, we have two places that use the library. We could wait for the new requests or perhaps remove the usage. ``` find . -name "*.py" | xargs grep "import requests" ./submarine-sdk/pysubmarine/submarine/utils/rest_utils.py:import requests ./submarine-sdk/pysubmarine/build/lib/submarine/utils/rest_utils.py:import requests ``` ### What type of PR is it? [Hot Fix] ### Todos No ### What is the Jira issue? https://issues.apache.org/jira/browse/SUBMARINE-922 ### How should this be tested? Pass the CIs ### Screenshots (if appropriate) ### Questions: * Do the license files need updating? No * Are there breaking changes for older versions? No * Does this need new documentation? No Author: Kevin Su Signed-off-by: Kevin Closes #722 from pingsutw/SUBMARINE-922 and squashes the following commits: af04a0f4 [Kevin Su] Update setup.py --- submarine-sdk/pysubmarine/setup.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/submarine-sdk/pysubmarine/setup.py b/submarine-sdk/pysubmarine/setup.py index e3754e3c73..1b7bd5a98f 100644 --- a/submarine-sdk/pysubmarine/setup.py +++ b/submarine-sdk/pysubmarine/setup.py @@ -33,18 +33,18 @@ 'sqlalchemy', 'sqlparse', 'pymysql', - 'requests', - 'urllib3 >= 1.15.1', - 'certifi >= 14.05.14', - 'python-dateutil >= 2.5.3', + 'requests==2.26.0', + 'urllib3>=1.15.1', + 'certifi>=14.05.14', + 'python-dateutil>=2.5.3', 'pyarrow==0.17.0', 'mlflow>=1.15.0', 'boto3>=1.17.58', ], extras_require={ - 'tf':['tensorflow>=1.14.0,<2.0.0'], - 'tf-latest':['tensorflow'], - 'pytorch':['torch>=1.5.0','torchvision>=0.6.0'], + 'tf': ['tensorflow>=1.14.0,<2.0.0'], + 'tf-latest': ['tensorflow'], + 'pytorch': ['torch>=1.5.0', 'torchvision>=0.6.0'], }, classifiers=[ 'Intended Audience :: Developers',