From 7a68f72b923a5d369a98192b8b6908e83c2ce26d Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Sat, 23 Nov 2024 23:26:46 +0000 Subject: [PATCH 01/11] Update workflow actions to latest versions This fixes workflow warnings about old versions of node. --- .github/workflows/pipeline.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 8f6b67a..6b784a9 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -8,10 +8,10 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: '3.9' - name: Install dependencies run: | python -m pip install --upgrade pip @@ -29,12 +29,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: ['3.7', '3.8', '3.9', '3.10'] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies From ed89c195555b6885353d8ae3204d1bb5fe556cc2 Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Sat, 23 Nov 2024 23:30:48 +0000 Subject: [PATCH 02/11] Add 3.11 and 3.12 to workflow matrix --- .github/workflows/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 6b784a9..10d9542 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 From 5df338115d3bf705c69a46019e8be474c2d5d5eb Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Sun, 24 Nov 2024 12:13:08 +0000 Subject: [PATCH 03/11] Bump dev requirements to support python 3.11+ --- dev-requirements.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 56e4923..8de32ec 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,13 +1,13 @@ black==22.3.0 -coverage==6.2 +coverage==7.2.7 flake8==3.8.4 importlib-metadata==3.6.0 isort==5.7.0 jedi==0.10.2 mock==2.0.0 mypy==0.920 -pytest==6.2.5 -pytest-cov==3.0.0 -tox==3.8.5 +pytest==7.1.3 +pytest-cov==5.0.0 +tox==4.23.2 twine==3.3.0 wheel From d51a94fb272199cab616190980871960dc28a298 Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Sun, 24 Nov 2024 12:15:02 +0000 Subject: [PATCH 04/11] Test against django 5.1 and py 3.13 --- .github/workflows/pipeline.yml | 2 +- tox.ini | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 10d9542..8f2422e 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 diff --git a/tox.ini b/tox.ini index 2758adc..b7f0ffc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,10 +1,11 @@ [tox] -# https://docs.djangoproject.com/en/4.0/faq/install/#what-python-version-can-i-use-with-django +# https://docs.djangoproject.com/en/5.1/faq/install/#what-python-version-can-i-use-with-django envlist = django{18,110,111,21,22,3,31}-py{37,38,39}-sendgrid{5,6} django{32}-py{37,38,39,310,311,312}-sendgrid{5,6} django{4,41,42}-py{38,39,310,311,312}-sendgrid{5,6} django{5}-py{310,311,312}-sendgrid{5,6} + django{51}-py{310,311,312,313}-sendgrid{5,6} [gh-actions] python = @@ -14,6 +15,7 @@ python = 3.10: py310 3.11: py311 3.12: py312 + 3.13: py313 [testenv] deps = @@ -28,6 +30,7 @@ deps = django4: Django>=4.0,<4.1 django41: Django>=4.1,<4.2 django5: Django>=5.0,<5.1 + django51: Django>=5.1,<5.2 sendgrid5: sendgrid>=5,<6 sendgrid6: sendgrid>=6,<7 -rdev-requirements.txt From df0c463ef25128edbfe6c51604fd1626b7b65117 Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Sun, 24 Nov 2024 12:20:08 +0000 Subject: [PATCH 05/11] Set pytest-cov to 4.1.0 to get python 3.7 support --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 8de32ec..3b3bf8a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -7,7 +7,7 @@ jedi==0.10.2 mock==2.0.0 mypy==0.920 pytest==7.1.3 -pytest-cov==5.0.0 +pytest-cov==4.1.0 tox==4.23.2 twine==3.3.0 wheel From 6565f0f0320cb87baf935a1350e5f505be4f06e0 Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Mon, 25 Nov 2024 09:40:45 +0000 Subject: [PATCH 06/11] Simplify tox dependancy install as should be covered by pytest-cov --- tox.ini | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index b7f0ffc..dda4508 100644 --- a/tox.ini +++ b/tox.ini @@ -33,7 +33,9 @@ deps = django51: Django>=5.1,<5.2 sendgrid5: sendgrid>=5,<6 sendgrid6: sendgrid>=6,<7 - -rdev-requirements.txt + pytest-cov + tox + commands = pytest ./test --cov=sendgrid_backend passenv = From 6d7e671d591f51d32ceacd55200e139a688e86cc Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Mon, 25 Nov 2024 10:17:04 +0000 Subject: [PATCH 07/11] Move tox config to pyproject.toml --- pyproject.toml | 35 +++++++++++++++++++++++++++++++++++ tox.ini | 42 ------------------------------------------ 2 files changed, 35 insertions(+), 42 deletions(-) delete mode 100644 tox.ini diff --git a/pyproject.toml b/pyproject.toml index cb8b164..d6e6557 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,3 +9,38 @@ line_length = 88 [tool.isort] profile = "black" multi_line_output = 3 + +[tool.tox] +legacy_tox_ini = """ + [tox] + # https://docs.djangoproject.com/en/5.1/faq/install/#what-python-version-can-i-use-with-django + envlist = + django{18,110,111,21,22,3,31}-py{37,38,39}-sendgrid{5,6} + django{32}-py{37,38,39,310,311,312}-sendgrid{5,6} + django{4,41,42}-py{38,39,310,311,312}-sendgrid{5,6} + django{5}-py{310,311,312}-sendgrid{5,6} + django{51}-py{310,311,312,313}-sendgrid{5,6} + + [testenv] + deps = + django18: Django>=1.8,<1.9 + django110: Django>=1.10,<1.11 + django111: Django>=1.11,<2 + django21: Django>=2.1,<2.2 + django22: Django>=2.2,<2.3 + django3: Django>=3.0,<3.1 + django31: Django>=3.1,<3.2 + django32: Django>=3.2,<4 + django4: Django>=4.0,<4.1 + django41: Django>=4.1,<4.2 + django5: Django>=5.0,<5.1 + django51: Django>=5.1,<5.2 + sendgrid5: sendgrid>=5,<6 + sendgrid6: sendgrid>=6,<7 + pytest-cov + + commands = + pytest ./test --cov=sendgrid_backend + passenv = + SENDGRID_API_KEY +""" \ No newline at end of file diff --git a/tox.ini b/tox.ini deleted file mode 100644 index dda4508..0000000 --- a/tox.ini +++ /dev/null @@ -1,42 +0,0 @@ -[tox] -# https://docs.djangoproject.com/en/5.1/faq/install/#what-python-version-can-i-use-with-django -envlist = - django{18,110,111,21,22,3,31}-py{37,38,39}-sendgrid{5,6} - django{32}-py{37,38,39,310,311,312}-sendgrid{5,6} - django{4,41,42}-py{38,39,310,311,312}-sendgrid{5,6} - django{5}-py{310,311,312}-sendgrid{5,6} - django{51}-py{310,311,312,313}-sendgrid{5,6} - -[gh-actions] -python = - 3.7: py37 - 3.8: py38 - 3.9: py39 - 3.10: py310 - 3.11: py311 - 3.12: py312 - 3.13: py313 - -[testenv] -deps = - django18: Django>=1.8,<1.9 - django110: Django>=1.10,<1.11 - django111: Django>=1.11,<2 - django21: Django>=2.1,<2.2 - django22: Django>=2.2,<2.3 - django3: Django>=3.0,<3.1 - django31: Django>=3.1,<3.2 - django32: Django>=3.2,<4 - django4: Django>=4.0,<4.1 - django41: Django>=4.1,<4.2 - django5: Django>=5.0,<5.1 - django51: Django>=5.1,<5.2 - sendgrid5: sendgrid>=5,<6 - sendgrid6: sendgrid>=6,<7 - pytest-cov - tox - -commands = - pytest ./test --cov=sendgrid_backend -passenv = - SENDGRID_API_KEY From 5f7375c48eb4f5a95a5a343bf69a86f64315f9d2 Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Mon, 25 Nov 2024 10:17:19 +0000 Subject: [PATCH 08/11] Update cassifiers --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b2f4e01..b492598 100644 --- a/setup.py +++ b/setup.py @@ -23,12 +23,16 @@ author="Steven Sklar", author_email="sklarsa@gmail.com", classifiers=[ + "Framework :: Django", "Intended Audience :: Developers", "Programming Language :: Python :: 3", - "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", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ], keywords="django email sendgrid backend", packages=find_packages( From 2d622ba2a1336b1f95dcdfc63c1b7fd7367d820d Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Mon, 25 Nov 2024 14:11:23 +0000 Subject: [PATCH 09/11] Remove need for tox-gh-actions --- .github/workflows/pipeline.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 8f2422e..acb5214 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -38,10 +38,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox tox-gh-actions + run: + pip install tox - name: Test with tox env: SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} - run: tox + run: tox -e py From 7f2d9147ffc6b354796119d4dd9354d33d3ac960 Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Mon, 25 Nov 2024 14:46:58 +0000 Subject: [PATCH 10/11] Readd tox-gh-actions --- .github/workflows/pipeline.yml | 5 +++-- pyproject.toml | 10 ++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index acb5214..dfb1492 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -38,8 +38,9 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: - pip install tox + run: | + python -m pip install --upgrade pip + pip install tox tox-gh-actions - name: Test with tox env: SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} diff --git a/pyproject.toml b/pyproject.toml index d6e6557..d37c382 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,16 @@ legacy_tox_ini = """ django{5}-py{310,311,312}-sendgrid{5,6} django{51}-py{310,311,312,313}-sendgrid{5,6} + [gh-actions] + python = + 3.7: py37 + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 + 3.12: py312 + 3.13: py313 + [testenv] deps = django18: Django>=1.8,<1.9 From 78139e67fafbeb5bf5834db5aff77c0bf9acbf89 Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Mon, 25 Nov 2024 15:21:45 +0000 Subject: [PATCH 11/11] Fix GitHub action not running tox correctly (#1) * Use tox-gh * Rename envlist to env_list * Just run tox command --- .github/workflows/pipeline.yml | 4 ++-- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index dfb1492..4bf9052 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -40,8 +40,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox tox-gh-actions + pip install tox tox-gh - name: Test with tox env: SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} - run: tox -e py + run: tox diff --git a/pyproject.toml b/pyproject.toml index d37c382..3760dc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,14 +14,14 @@ multi_line_output = 3 legacy_tox_ini = """ [tox] # https://docs.djangoproject.com/en/5.1/faq/install/#what-python-version-can-i-use-with-django - envlist = + env_list = django{18,110,111,21,22,3,31}-py{37,38,39}-sendgrid{5,6} django{32}-py{37,38,39,310,311,312}-sendgrid{5,6} django{4,41,42}-py{38,39,310,311,312}-sendgrid{5,6} django{5}-py{310,311,312}-sendgrid{5,6} django{51}-py{310,311,312,313}-sendgrid{5,6} - [gh-actions] + [gh] python = 3.7: py37 3.8: py38