From 59fc3a3c81c415402a1e5fdf4b7886706860eaeb Mon Sep 17 00:00:00 2001 From: Mathieu Leplatre Date: Tue, 2 Jul 2024 18:43:55 +0200 Subject: [PATCH] Add Python 3.12 support --- .github/workflows/test.yml | 2 +- src/kinto_http/constants.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0396cc..aa68174 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 diff --git a/src/kinto_http/constants.py b/src/kinto_http/constants.py index 6a4da7b..6105cc7 100644 --- a/src/kinto_http/constants.py +++ b/src/kinto_http/constants.py @@ -1,11 +1,10 @@ import re import sys +import importlib.metadata -import pkg_resources - -kinto_http_version = pkg_resources.get_distribution("kinto_http").version -requests_version = pkg_resources.get_distribution("requests").version +kinto_http_version = importlib.metadata.version("kinto_http") +requests_version = importlib.metadata.version("requests") python_version = ".".join(map(str, sys.version_info[:3])) USER_AGENT = "kinto_http/{} requests/{} python/{}".format(