From 64d83fc1fdd70e5642088abb73ccb2aca28dd66b Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 15 Sep 2023 18:03:13 +0200 Subject: [PATCH 1/3] Test against python 3.12 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f400906..1df8c91 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11", "3.10", 3.9, 3.8, pypy-3.9] + python-version: ["3.12.0-beta.2", "3.11", "3.10", 3.9, 3.8, pypy-3.9] isort: [5.11.2] flake8: [5.0.4] include: From 2d7e97fb28ede805c01b2b188e45f23ef54bec93 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 15 Sep 2023 18:10:48 +0200 Subject: [PATCH 2/3] Use importlib.metadata To get the version of package dynamically --- flake8_isort.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake8_isort.py b/flake8_isort.py index d7435cd..8de084e 100644 --- a/flake8_isort.py +++ b/flake8_isort.py @@ -1,17 +1,17 @@ import warnings from contextlib import redirect_stdout from difflib import unified_diff +from importlib.metadata import PackageNotFoundError, version from io import StringIO from pathlib import Path import isort -from pkg_resources import DistributionNotFound, get_distribution def _version(): try: - return get_distribution('flake8_isort').version - except DistributionNotFound: + return version('flake8_isort') + except PackageNotFoundError: return 'dev' # for local development if package is not installed yet From 85d68d67cdbd1d2777b21b9fe49df7d73dadb9d2 Mon Sep 17 00:00:00 2001 From: Gil Forcada Codinachs Date: Fri, 15 Sep 2023 18:38:00 +0200 Subject: [PATCH 3/3] Update CHANGES --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 541de54..dd3dbfc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -9,6 +9,9 @@ Changelog - Drop python 3.7 support. [gforcada] +- Add preliminary support to Python 3.12. + [gforcada] + 6.0.0 (2022-12-22) ------------------