From 6617fff65ee4a7082235beac7f71895db25f5667 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Thu, 17 Aug 2023 16:40:15 -0300 Subject: [PATCH 01/20] tries to modify the lib setup and some changes into the lib --- Makefile | 4 ++++ gmail_wrapper/client.py | 36 +++++++++++++++++++++++++++++++++--- gmail_wrapper/entities.py | 4 ++++ requirements-dev.txt | 7 +++++++ requirements.txt | 7 +++++++ setup.py | 16 +++++++++------- 6 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 requirements-dev.txt create mode 100644 requirements.txt diff --git a/Makefile b/Makefile index b4757e4..a3c2d32 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,10 @@ clean-test: rm -f .coverage rm -fr htmlcov/ +install: + python -m venv .venv + ./.venv/bin/python -m pip install -r requirements-dev.txt + test: python setup.py pytest diff --git a/gmail_wrapper/client.py b/gmail_wrapper/client.py index 9e70a56..e648834 100644 --- a/gmail_wrapper/client.py +++ b/gmail_wrapper/client.py @@ -3,6 +3,7 @@ from email.mime.text import MIMEText from google.auth.transport.requests import Request +from google.oauth2 import service_account from google.oauth2.credentials import Credentials from googleapiclient import discovery from googleapiclient.errors import HttpError @@ -23,12 +24,23 @@ class GmailClient: SCOPE_INSERT = "https://www.googleapis.com/auth/gmail.insert" SCOPE_MODIFY = "https://www.googleapis.com/auth/gmail.modify" SCOPE_METADATA = "https://www.googleapis.com/auth/gmail.metadata" + SECRETS_STRATEGY = "secrets_json" + ACCOUNT_JSON_STRATEGY = "account_json" - def __init__(self, email, secrets_json_string, scopes=None): + def __init__(self, email, secrets_json_string, scopes=None, client_strategy=None): + self.credentials = None + if client_strategy is None: + client_strategy = GmailClient.SECRETS_STRATEGY self.email = email - self._client = self._make_client(secrets_json_string, scopes) + self._client = self._make_client(client_strategy)(secrets_json_string, scopes) - def _make_client(self, secrets_json_string, scopes): + def _make_client(self, client_strategy): + return { + GmailClient.SECRETS_STRATEGY: self._make_client_json_string, + GmailClient.ACCOUNT_JSON_STRATEGY: self._make_client_account_json, + }.get(client_strategy) + + def _make_client_json_string(self, secrets_json_string, scopes): google_secrets_data = json.loads(secrets_json_string)["web"] credentials = Credentials( None, @@ -41,9 +53,27 @@ def _make_client(self, secrets_json_string, scopes): credentials.refresh(Request()) return discovery.build("gmail", "v1", credentials=credentials) + def _make_client_account_json(self, account_json, scopes): + self._make_credentials(account_json, scopes) + return discovery.build( + "gmail", "v1", credentials=self.credentials, cache_discovery=False + ) + def _messages_resource(self): return self._client.users().messages() + def _make_credentials(self, account_json: dict, scopes: list) -> Credentials: + credentials = service_account.Credentials.from_service_account_info( + account_json, scopes=scopes + ) + self.credentials = credentials.with_subject(self.email) + self._refresh_credentials() + return self.credentials + + def _refresh_credentials(self) -> None: + if self.credentials and not self.credentials.valid: + self.credentials.refresh(Request()) + def _execute(self, executable): try: return executable.execute() diff --git a/gmail_wrapper/entities.py b/gmail_wrapper/entities.py index b9b0e30..3f74819 100644 --- a/gmail_wrapper/entities.py +++ b/gmail_wrapper/entities.py @@ -39,6 +39,10 @@ def id(self): def filename(self): return self._raw.get("filename") + @property + def mimetype(self): + return self._raw.get("mimeType") + @property def content(self): if not self._body.content: diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..56bf390 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,7 @@ + +pytest==7.3.1 +requests==2.31.0 +pytest-cov==4.1.0 +pytest-mock==3.10.0 +pytest-runner==6.0.0 +coverage==7.2.7 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..94a88f8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ + +requests==2.31.0 +google-api-core==2.10.2 +google-api-python-client==1.12.11 +google-auth==1.35.0 +google-auth-httplib2==0.1.0 +googleapis-common-protos==1.59.0 diff --git a/setup.py b/setup.py index 197fb48..9a2bc19 100644 --- a/setup.py +++ b/setup.py @@ -1,17 +1,18 @@ #!/usr/bin/env python +import os + from setuptools import setup, find_packages -requirements = [ - "requests>2,<3", - "google-auth-httplib2<1", - "google-api-python-client>1,<2", - "google-auth>1,<2", -] +here = os.path.abspath(os.path.dirname(__file__)) + test_requirements = ["pytest", "pytest-cov", "pytest-mock", "coverage"] with open("README.md", "r") as readme_file: readme = readme_file.read() +with open(os.path.join(here, "requirements.txt")) as f: + install_requires = [line for line in f.readlines()] + setup( version_config=True, setup_requires=["setuptools-git-versioning", "pytest-runner"], @@ -23,13 +24,14 @@ author_email="engineering@loadsmart.com", url="https://github.com/loadsmart/gmail-wrapper", packages=find_packages(exclude=["tests"]), - install_requires=requirements, + install_requires=install_requires, keywords=["gmail"], classifiers=[ "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", ], test_suite="tests", tests_require=test_requirements, From dfbef8ab3c973bac30a2296e564903a45af704fa Mon Sep 17 00:00:00 2001 From: yanhenning Date: Thu, 17 Aug 2023 18:00:49 -0300 Subject: [PATCH 02/20] change back the requirements --- setup.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 9a2bc19..8280000 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,17 @@ #!/usr/bin/env python -import os - from setuptools import setup, find_packages -here = os.path.abspath(os.path.dirname(__file__)) - +requirements = [ + "requests>2,<3", + "google-auth-httplib2<1", + "google-api-python-client>1,<2", + "google-auth>1,<2", +] test_requirements = ["pytest", "pytest-cov", "pytest-mock", "coverage"] with open("README.md", "r") as readme_file: readme = readme_file.read() -with open(os.path.join(here, "requirements.txt")) as f: - install_requires = [line for line in f.readlines()] - setup( version_config=True, setup_requires=["setuptools-git-versioning", "pytest-runner"], @@ -24,7 +23,7 @@ author_email="engineering@loadsmart.com", url="https://github.com/loadsmart/gmail-wrapper", packages=find_packages(exclude=["tests"]), - install_requires=install_requires, + install_requires=requirements, keywords=["gmail"], classifiers=[ "Natural Language :: English", From ffa7ca346e92d0044032b9b7036d54cadc149220 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Tue, 26 Dec 2023 15:58:38 -0300 Subject: [PATCH 03/20] Fixes the test setup and add support for newer python versions --- requirements-dev.txt | 2 +- setup.py | 2 ++ tests/utils.py | 85 +++++++++++++++++++++++--------------------- 3 files changed, 48 insertions(+), 41 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 56bf390..3733ba2 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ - +-r requirements.txt pytest==7.3.1 requests==2.31.0 pytest-cov==4.1.0 diff --git a/setup.py b/setup.py index 8280000..62f2ac2 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,8 @@ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", ], test_suite="tests", tests_require=test_requirements, diff --git a/tests/utils.py b/tests/utils.py index d70a199..578095c 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -11,52 +11,57 @@ def make_gmail_client( modify_effect=None, ): return mocker.MagicMock( - users=mocker.MagicMock( - return_value=mocker.MagicMock( - messages=mocker.MagicMock( - return_value=mocker.MagicMock( - list=mocker.MagicMock( - return_value=mocker.MagicMock( - execute=mocker.MagicMock( - return_value=list_return, side_effect=list_effect + return_value=mocker.MagicMock( + users=mocker.MagicMock( + return_value=mocker.MagicMock( + messages=mocker.MagicMock( + return_value=mocker.MagicMock( + list=mocker.MagicMock( + return_value=mocker.MagicMock( + execute=mocker.MagicMock( + return_value=list_return, + side_effect=list_effect, + ) + ) + ), + get=mocker.MagicMock( + return_value=mocker.MagicMock( + execute=mocker.MagicMock( + return_value=get_return, side_effect=get_effect + ) + ) + ), + modify=mocker.MagicMock( + return_value=mocker.MagicMock( + execute=mocker.MagicMock( + return_value=modify_return, + side_effect=modify_effect, + ) ) - ) - ), - get=mocker.MagicMock( - return_value=mocker.MagicMock( - execute=mocker.MagicMock( - return_value=get_return, side_effect=get_effect + ), + batchModify=mocker.MagicMock( + return_value=mocker.MagicMock( + execute=mocker.MagicMock() ) - ) - ), - modify=mocker.MagicMock( - return_value=mocker.MagicMock( - execute=mocker.MagicMock( - return_value=modify_return, - side_effect=modify_effect, + ), + send=mocker.MagicMock( + return_value=mocker.MagicMock( + execute=mocker.MagicMock(return_value=send_return) ) - ) - ), - batchModify=mocker.MagicMock( - return_value=mocker.MagicMock(execute=mocker.MagicMock()) - ), - send=mocker.MagicMock( - return_value=mocker.MagicMock( - execute=mocker.MagicMock(return_value=send_return) - ) - ), - attachments=mocker.MagicMock( - return_value=mocker.MagicMock( - get=mocker.MagicMock( - return_value=mocker.MagicMock( - execute=mocker.MagicMock( - return_value=attachment_return, - side_effect=attachment_effect, + ), + attachments=mocker.MagicMock( + return_value=mocker.MagicMock( + get=mocker.MagicMock( + return_value=mocker.MagicMock( + execute=mocker.MagicMock( + return_value=attachment_return, + side_effect=attachment_effect, + ) ) ) ) - ) - ), + ), + ) ) ) ) From af6a68d105f89752dc5936951cc7be780f683f2a Mon Sep 17 00:00:00 2001 From: yanhenning Date: Tue, 26 Dec 2023 16:05:40 -0300 Subject: [PATCH 04/20] Add support for newer python versions --- .circleci/config.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c09bb8c..f31ddb9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: release: docker: - - image: circleci/python:3.7 + - image: circleci/python:3.10 steps: - checkout diff --git a/tox.ini b/tox.ini index d008171..7f68941 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36, py37 +envlist = py36, py37, py38, py39 py310 [testenv] commands = python setup.py pytest From 7732b5b26e7d89c3eac86e3800cccb45239fdc3b Mon Sep 17 00:00:00 2001 From: yanhenning Date: Tue, 26 Dec 2023 16:29:42 -0300 Subject: [PATCH 05/20] Adjust tox.ini --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 7f68941..1f4f6e8 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36, py37, py38, py39 py310 +envlist = python3.6, python3.7, python3.8, python3.9, python3.10 [testenv] commands = python setup.py pytest From dd645c5d49b2e5e69fdf526a2904a6a7920e38fc Mon Sep 17 00:00:00 2001 From: yanhenning Date: Tue, 26 Dec 2023 17:32:17 -0300 Subject: [PATCH 06/20] Remove coveralls --- .circleci/config.yml | 15 --------------- README.md | 1 - 2 files changed, 16 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f31ddb9..7b07d0f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,21 +14,6 @@ jobs: command: | make test-all - - run: - command: pip install coveralls - - - run: - name: gen-coverage - command: | - make coverage - - - run: - name: upload-coverage - command: | - if [ $COVERALLS_REPO_TOKEN ]; then - coveralls - fi - release: docker: - image: circleci/python:3.10 diff --git a/README.md b/README.md index 27c745b..f08ad87 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # Gmail Wrapper [![CircleCI](https://circleci.com/gh/loadsmart/gmail-wrapper/tree/master.svg?style=svg&circle-token=110f54407b50c79865fe1f9b4352e213bc68504b)](https://circleci.com/gh/loadsmart/gmail-wrapper/tree/master) -[![Coverage Status](https://coveralls.io/repos/github/loadsmart/gmail-wrapper/badge.svg?branch=master)](https://coveralls.io/github/loadsmart/gmail-wrapper?branch=master) Because scrapping Gmail data doesn't have to be a [pain](https://googleapis.github.io/google-api-python-client/docs/dyn/gmail_v1.html). From 8f2a2b495b2ac55a86d967dbd19cde6a6c5b709f Mon Sep 17 00:00:00 2001 From: yanhenning Date: Tue, 26 Dec 2023 17:44:28 -0300 Subject: [PATCH 07/20] adjust tox --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 1f4f6e8..690d915 100644 --- a/tox.ini +++ b/tox.ini @@ -2,4 +2,5 @@ envlist = python3.6, python3.7, python3.8, python3.9, python3.10 [testenv] -commands = python setup.py pytest +commands = + - python setup.py pytest From 831e9e2e6b3adb4a23599d83002c883194e56d46 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:00:36 -0300 Subject: [PATCH 08/20] adjust tox --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 690d915..db1f0a4 100644 --- a/tox.ini +++ b/tox.ini @@ -3,4 +3,4 @@ envlist = python3.6, python3.7, python3.8, python3.9, python3.10 [testenv] commands = - - python setup.py pytest + pytest From f01b6c49c32fc88bef610c61a9b1bc9099663162 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:04:26 -0300 Subject: [PATCH 09/20] adjust tox again --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index db1f0a4..c8252f3 100644 --- a/tox.ini +++ b/tox.ini @@ -3,4 +3,4 @@ envlist = python3.6, python3.7, python3.8, python3.9, python3.10 [testenv] commands = - pytest + python setup.py pytest From 47b8ae3d1f2f93c90f3505bc6c8520fa41c9f689 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:08:32 -0300 Subject: [PATCH 10/20] adjust tox again --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index c8252f3..c82186d 100644 --- a/tox.ini +++ b/tox.ini @@ -2,5 +2,6 @@ envlist = python3.6, python3.7, python3.8, python3.9, python3.10 [testenv] +deps = pytest commands = - python setup.py pytest + pytest From 44c2f8fd1effb33b84deb8459f5418af19a7c1af Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:11:04 -0300 Subject: [PATCH 11/20] Adjust tox once again --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index c82186d..1985042 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,6 @@ envlist = python3.6, python3.7, python3.8, python3.9, python3.10 [testenv] -deps = pytest +deps = -rrequirements-dev.txt commands = pytest From 8d439b446230d07a3005e4947c888d539d6132fe Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:16:29 -0300 Subject: [PATCH 12/20] Adjust tox once again --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 1985042..19fe7d4 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,6 @@ envlist = python3.6, python3.7, python3.8, python3.9, python3.10 [testenv] -deps = -rrequirements-dev.txt +deps = -r requirements-dev.txt commands = pytest From fd487498897b65c00dda3bfabfd7d12e481ee790 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:19:23 -0300 Subject: [PATCH 13/20] Adjust circleci --- .circleci/config.yml | 123 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 99 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b07d0f..314bec4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,49 +1,124 @@ -version: 2 +tag-pattern: &tag-pattern + only: /^\d+\.\d+\.\d+$/ -jobs: - check: - working_directory: ~/repo - docker: - - image: themattrix/tox +version: 2.1 +commands: + install-dependencies: steps: - - checkout - - run: - name: test command: | - make test-all + pip install tox +jobs: + tests38: + working_directory: /home/circleci/project + docker: + - image: cimg/python:3.8 + steps: + - checkout + - install-dependencies + - run: + command: tox -e py38 + - store_test_results: + path: build + tests39: + working_directory: /home/circleci/project + docker: + - image: cimg/python:3.9 + steps: + - checkout + - install-dependencies + - run: + command: tox -e py39 + - store_test_results: + path: build + tests310: + working_directory: /home/circleci/project + docker: + - image: cimg/python:3.10 + steps: + - checkout + - install-dependencies + - run: + command: tox -e py310 + - store_test_results: + path: build + tests311: + working_directory: /home/circleci/project + docker: + - image: cimg/python:3.11 + steps: + - checkout + - install-dependencies + - run: + command: tox -e py311 + - store_test_results: + path: build + tests312: + working_directory: /home/circleci/project + docker: + - image: cimg/python:3.12 + steps: + - checkout + - install-dependencies + - run: + command: tox -e py312 + - store_test_results: + path: build release: + working_directory: /home/circleci/project docker: - - image: circleci/python:3.10 + - image: cimg/python:3.8 steps: - checkout - - run: - name: release - command: | - make release + command: make release + - persist_to_workspace: + root: . + paths: + - "dist" workflows: version: 2 - check-all: - jobs: - - check - check-build-release: + main: jobs: - - check: + - tests38: + context: org-global + filters: + tags: + only: /^\d+\.\d+\.\d+$/ + - tests39: + context: org-global + filters: + tags: + only: /^\d+\.\d+\.\d+$/ + - tests310: + context: org-global + filters: + tags: + only: /^\d+\.\d+\.\d+$/ + - tests311: + context: org-global + filters: + tags: + only: /^\d+\.\d+\.\d+$/ + - tests312: + context: org-global filters: - branches: - ignore: /.*/ tags: only: /^\d+\.\d+\.\d+$/ - release: + name: release context: org-global requires: - - check + - tests38 + - tests39 + - tests310 + - tests311 + - tests312 filters: branches: ignore: /.*/ tags: - only: /^\d+\.\d+\.\d+$/ + only: /^\d+\.\d+\.\d+$/ \ No newline at end of file From 855d06a2e0478ed4366e43ae8517fe8bb2d2e2cf Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:31:18 -0300 Subject: [PATCH 14/20] Add two more tests for python 3.6 and 3.7 --- .circleci/config.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 314bec4..92b04df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,28 @@ commands: pip install tox jobs: + tests36: + working_directory: /home/circleci/project + docker: + - image: cimg/python:3.7 + steps: + - checkout + - install-dependencies + - run: + command: tox -e py37 + - store_test_results: + path: build + tests37: + working_directory: /home/circleci/project + docker: + - image: cimg/python:3.7 + steps: + - checkout + - install-dependencies + - run: + command: tox -e py37 + - store_test_results: + path: build tests38: working_directory: /home/circleci/project docker: @@ -112,6 +134,8 @@ workflows: name: release context: org-global requires: + - tests36 + - tests37 - tests38 - tests39 - tests310 From 7a161a7cc75d21ff4378d7e33281f541b6aaba2b Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:32:03 -0300 Subject: [PATCH 15/20] Adjust setup.py --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 62f2ac2..00764a8 100644 --- a/setup.py +++ b/setup.py @@ -33,6 +33,8 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], test_suite="tests", tests_require=test_requirements, From cf5f6ffc7fa771444559774ee26a076904c68915 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:32:46 -0300 Subject: [PATCH 16/20] Adjust tox.ini to have two more python versions --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 19fe7d4..ca79c8f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = python3.6, python3.7, python3.8, python3.9, python3.10 +envlist = python3.6, python3.7, python3.8, python3.9, python3.10, python3.11, python3.12 [testenv] deps = -r requirements-dev.txt From 7ea55bf9c672bff9ffac07748735a24a93f1edcc Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:34:40 -0300 Subject: [PATCH 17/20] Fixes config.yml --- .circleci/config.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 92b04df..c143f94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,12 +14,12 @@ jobs: tests36: working_directory: /home/circleci/project docker: - - image: cimg/python:3.7 + - image: cimg/python:3.6 steps: - checkout - install-dependencies - run: - command: tox -e py37 + command: tox -e py36 - store_test_results: path: build tests37: @@ -91,7 +91,7 @@ jobs: release: working_directory: /home/circleci/project docker: - - image: cimg/python:3.8 + - image: cimg/python:3.10 steps: - checkout - run: @@ -105,6 +105,16 @@ workflows: version: 2 main: jobs: + - tests36: + context: org-global + filters: + tags: + only: /^\d+\.\d+\.\d+$/ + - tests37: + context: org-global + filters: + tags: + only: /^\d+\.\d+\.\d+$/ - tests38: context: org-global filters: From 4bcbd218922d0ff22005215268b8263bd4944cc3 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 27 Dec 2023 11:39:22 -0300 Subject: [PATCH 18/20] drop support for 3.6 --- .circleci/config.yml | 17 ----------------- setup.py | 1 - tox.ini | 2 +- 3 files changed, 1 insertion(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c143f94..b979b75 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,17 +11,6 @@ commands: pip install tox jobs: - tests36: - working_directory: /home/circleci/project - docker: - - image: cimg/python:3.6 - steps: - - checkout - - install-dependencies - - run: - command: tox -e py36 - - store_test_results: - path: build tests37: working_directory: /home/circleci/project docker: @@ -105,11 +94,6 @@ workflows: version: 2 main: jobs: - - tests36: - context: org-global - filters: - tags: - only: /^\d+\.\d+\.\d+$/ - tests37: context: org-global filters: @@ -144,7 +128,6 @@ workflows: name: release context: org-global requires: - - tests36 - tests37 - tests38 - tests39 diff --git a/setup.py b/setup.py index 00764a8..0ece654 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,6 @@ classifiers=[ "Natural Language :: English", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/tox.ini b/tox.ini index ca79c8f..d3514cc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = python3.6, python3.7, python3.8, python3.9, python3.10, python3.11, python3.12 +envlist = python3.7, python3.8, python3.9, python3.10, python3.11, python3.12 [testenv] deps = -r requirements-dev.txt From 310a61363c0cbfa3c0c96ab774fac624246b0ea3 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Wed, 3 Jan 2024 17:44:48 -0300 Subject: [PATCH 19/20] ... From 30e73ba01ad4af86e6bf92037b6026337acd1b17 Mon Sep 17 00:00:00 2001 From: yanhenning Date: Thu, 4 Jan 2024 10:52:44 -0300 Subject: [PATCH 20/20] Add changelog --- changelogs/unreleased/add-new-builder-and-field-to-entity.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelogs/unreleased/add-new-builder-and-field-to-entity.yml diff --git a/changelogs/unreleased/add-new-builder-and-field-to-entity.yml b/changelogs/unreleased/add-new-builder-and-field-to-entity.yml new file mode 100644 index 0000000..3db526f --- /dev/null +++ b/changelogs/unreleased/add-new-builder-and-field-to-entity.yml @@ -0,0 +1,4 @@ +--- +description: Create new way to create the gmail client. +type: added +pr_number: 29