From 2c729ff0fd8ae15c366e870accbe4772a935f846 Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Wed, 14 Feb 2024 18:11:16 +0100 Subject: [PATCH] Stop testing for Python 3.7 (#94) * Stop testing for Python 3.7 * Pin sanic-redis in tests * Run latest black --- .github/workflows/test.yml | 2 +- docs/changelog.rst | 6 ++++++ setup.py | 1 - tests/constraints/sanic-21.txt | 3 ++- tests/constraints/sanic-22.txt | 1 + tests/core/test_logging.py | 14 ++++++++++---- tox.ini | 7 +++---- 7 files changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 882ffcf..7a409a3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11'] # Service containers to run with `container-job` services: diff --git a/docs/changelog.rst b/docs/changelog.rst index 5002a40..dcbd9aa 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,12 @@ Changelog --------- +2024.X.X (unreleased) +~~~~~~~~~~~~~~~~~~~~~ + +- Drop support of Python 3.7 + + 2024.1.0 ~~~~~~~~~~~~~~~~~~~~~ diff --git a/setup.py b/setup.py index b54f6b9..1f319f5 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,6 @@ def read(*parts): "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", diff --git a/tests/constraints/sanic-21.txt b/tests/constraints/sanic-21.txt index 977b79a..7e3d2e1 100644 --- a/tests/constraints/sanic-21.txt +++ b/tests/constraints/sanic-21.txt @@ -1,3 +1,4 @@ Sanic>=21,<22 websockets<11 -sanic-testing<22 \ No newline at end of file +sanic-testing<22 +sanic-redis<0.5 \ No newline at end of file diff --git a/tests/constraints/sanic-22.txt b/tests/constraints/sanic-22.txt index 97479fa..e23b424 100644 --- a/tests/constraints/sanic-22.txt +++ b/tests/constraints/sanic-22.txt @@ -1 +1,2 @@ Sanic>=22,<23 +sanic-redis<0.5 diff --git a/tests/core/test_logging.py b/tests/core/test_logging.py index 124594c..1ac702f 100644 --- a/tests/core/test_logging.py +++ b/tests/core/test_logging.py @@ -32,7 +32,8 @@ def assert_records(records): def test_initialization_from_ini(reset_logging, caplog, tmpdir): - ini_content = textwrap.dedent(""" + ini_content = textwrap.dedent( + """ [loggers] keys = root @@ -54,7 +55,8 @@ class = StreamHandler [formatter_json] class = dockerflow.logging.JsonLogFormatter - """) + """ + ) ini_file = tmpdir.join("logging.ini") ini_file.write(ini_content) logging.config.fileConfig(str(ini_file)) @@ -154,7 +156,8 @@ def test_ignore_json_message(caplog): # https://mana.mozilla.org/wiki/pages/viewpage.action?pageId=42895640 -JSON_LOGGING_SCHEMA = json.loads(""" +JSON_LOGGING_SCHEMA = json.loads( + """ { "type":"object", "required":["Timestamp"], @@ -226,4 +229,7 @@ def test_ignore_json_message(caplog): } } } -""".replace("\\", "\\\\")) # HACK: Fix escaping for easy copy/paste +""".replace( + "\\", "\\\\" + ) +) # HACK: Fix escaping for easy copy/paste diff --git a/tox.ini b/tox.ini index bd447f2..50e12d5 100644 --- a/tox.ini +++ b/tox.ini @@ -4,15 +4,14 @@ minversion = 1.8 envlist = py38-lint py311-docs - py{37,38,39,310}-dj32 + py{38,39,310}-dj32 py{38,39,310,311}-dj{40,41,42} py{310,311}-dj{50} - py{37,38,39,310,311}-fl{20,21,22} - py{37,38,39,310,311}-s{21,22} + py{38,39,310,311}-fl{20,21,22} + py{38,39,310,311}-s{21,22} [gh-actions] python = - 3.7: py37 3.8: py38 3.9: py39 3.10: py310