diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e4d7bb3..934c4fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,7 +7,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] django-version: [2.2, 3.2, 4.2] steps: diff --git a/django_query_capture/capture.py b/django_query_capture/capture.py index ee38f2a..f1a7c5d 100644 --- a/django_query_capture/capture.py +++ b/django_query_capture/capture.py @@ -5,9 +5,9 @@ import typing import inspect +import sysconfig import time from contextlib import ContextDecorator, ExitStack -from distutils.sysconfig import get_python_lib from django.db import connection from django.db.backends.dummy.base import DatabaseWrapper @@ -94,7 +94,7 @@ def _save_queries(self, execute, sql, params, many, context): Returns: Returns the result of the exit for the basic operation of `connection.execute_wrapper`. """ - python_library_directory = get_python_lib() + python_library_directory = sysconfig.get_path("purelib") called_by = [ stack for stack in inspect.stack() diff --git a/pyproject.toml b/pyproject.toml index e098fd7..d4b6a34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,9 @@ classifiers = [ #! Update me "Programming Language :: Python :: 3", "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", "Framework :: Django :: 3.2", "Framework :: Django :: 4.2", "Natural Language :: Korean",