From ce6452a54e2d39ffe8ccf5e67bba462144ffc167 Mon Sep 17 00:00:00 2001 From: Andrey Slotin Date: Fri, 26 Feb 2021 14:11:31 +0100 Subject: [PATCH 1/4] Lock moto dependency to 1.x --- tests/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/requirements.txt b/tests/requirements.txt index a3090981..a6296e5d 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -10,7 +10,7 @@ grpcio>=1.18.0 google-cloud-storage>=1.24.0;python_version>="3.5" lxml>=3.4 mock>=2.0.0 -moto>=1.3.16 +moto>=1.3.16,<2.0 mysqlclient>=1.3.14;python_version>="3.5" MySQL-python>=1.2.5;python_version<="2.7" nose>=1.0 From 3a01277323befcf59212bdd3d928d37ee6f199f5 Mon Sep 17 00:00:00 2001 From: Andrey Slotin Date: Fri, 26 Feb 2021 14:53:15 +0100 Subject: [PATCH 2/4] Lock rsa version to 4.5 for Python 2.7 --- .circleci/config.yml | 10 +++++----- tests/requirements-27.txt | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 tests/requirements-27.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 45cc48dd..a125ac1a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ commands: pip-install-deps-27: parameters: requirements: - default: "tests/requirements.txt" + default: "tests/requirements-27.txt" type: string steps: - run: @@ -37,7 +37,7 @@ commands: pip install 'wheel>=0.29.0' pip install -r requirements.txt pip install -r <> - + install-couchbase-deps: steps: - run: @@ -49,7 +49,7 @@ commands: sudo dpkg -i ./couchbase-release-1.0-6-amd64.deb sudo apt-get update sudo apt install libcouchbase-dev -y - + jobs: python27: docker: @@ -82,7 +82,7 @@ jobs: working_directory: ~/repo steps: - checkout - - pip-install-deps + - pip-install-deps - run: name: run tests environment: @@ -102,7 +102,7 @@ jobs: working_directory: ~/repo steps: - checkout - - pip-install-deps + - pip-install-deps - run: name: run tests environment: diff --git a/tests/requirements-27.txt b/tests/requirements-27.txt new file mode 100644 index 00000000..186c833d --- /dev/null +++ b/tests/requirements-27.txt @@ -0,0 +1,33 @@ +aiofiles>=0.5.0;python_version>="3.5" +aiohttp>=3.5.4;python_version>="3.5" +asynqp>=0.4;python_version>="3.5" +boto3>=1.10.0 +celery>=4.1.1 +django>=1.11,<2.2 +fastapi>=0.61.1;python_version>="3.6" +flask>=0.12.2 +grpcio>=1.18.0 +google-cloud-storage>=1.24.0;python_version>="3.5" +lxml>=3.4 +mock>=2.0.0 +moto>=1.3.16,<2.0 +mysqlclient>=1.3.14;python_version>="3.5" +MySQL-python>=1.2.5;python_version<="2.7" +nose>=1.0 +PyMySQL[rsa]>=0.9.1 +pyOpenSSL>=16.1.0;python_version<="2.7" +psycopg2>=2.7.1 +pika>=1.0.0 +pymongo>=3.7.0 +pyramid>=1.2 +pytest>=4.6 +pytest-celery +redis>3.0.0 +requests>=2.17.1 +rsa<=4.5 +sqlalchemy>=1.1.15 +spyne>=2.9,<=2.12.14 +suds-jurko>=0.6 +tornado>=4.5.3,<6.0 +uvicorn>=0.12.2;python_version>="3.6" +urllib3[secure]!=1.25.0,!=1.25.1,<1.26,>=1.21.1 From e4323020b540a6ec4edb82dbd769c54fd8432ab5 Mon Sep 17 00:00:00 2001 From: Andrey Slotin Date: Fri, 26 Feb 2021 16:21:40 +0100 Subject: [PATCH 3/4] Use non-mTLS session to mock the HTTP client in Google Cloud Storage tests --- tests/clients/test_google-cloud-storage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/clients/test_google-cloud-storage.py b/tests/clients/test_google-cloud-storage.py index c3ec3243..be7ac15c 100644 --- a/tests/clients/test_google-cloud-storage.py +++ b/tests/clients/test_google-cloud-storage.py @@ -898,6 +898,7 @@ def test_batch_operation(self, mock_requests): def _client(self, *args, **kwargs): # override the HTTP client to bypass the authorization kwargs['_http'] = kwargs.get('_http', requests.Session()) + kwargs['_http'].is_mtls = False return storage.Client(*args, **kwargs) From cc7c99c6a0522a5af38c07c0433588e04c93f8e2 Mon Sep 17 00:00:00 2001 From: Andrey Slotin Date: Fri, 26 Feb 2021 13:24:09 +0100 Subject: [PATCH 4/4] Use latest pip to run tests on CI against Python 3 --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index a125ac1a..370ba804 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,6 +34,7 @@ commands: command: | python -m venv venv . venv/bin/activate + pip install --upgrade pip pip install 'wheel>=0.29.0' pip install -r requirements.txt pip install -r <>