From 1ca69811cc3aac7bff7d787f817a4dd7992d32eb Mon Sep 17 00:00:00 2001 From: Jair Henrique Date: Thu, 5 Oct 2023 12:21:29 -0300 Subject: [PATCH] Add python 3.12 support --- .github/workflows/main.yml | 4 ++-- setup.py | 10 +++------- tox.ini | 5 +++-- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a3bb07..5613a5e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11","3.12"] steps: - uses: actions/checkout@v3.5.2 @@ -23,7 +23,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install --upgrade pip setuptools pip install tox tox-gh-actions - name: Test with tox run: tox diff --git a/setup.py b/setup.py index baf2617..97cd6a0 100755 --- a/setup.py +++ b/setup.py @@ -5,11 +5,7 @@ import sys from pathlib import Path - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup +from setuptools import setup if sys.argv[-1] == "publish": os.system("python setup.py sdist upload") @@ -35,7 +31,7 @@ def extract_requires(): packages=["djangorestframework_camel_case"], package_dir={"djangorestframework_camel_case": "djangorestframework_camel_case"}, include_package_data=True, - python_requires=">=3.6", + python_requires=">=3.7", install_requires=extract_requires(), license="BSD", zip_safe=False, @@ -46,12 +42,12 @@ def extract_requires(): "License :: OSI Approved :: BSD License", "Natural Language :: English", "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", ], test_suite="tests", ) diff --git a/tox.ini b/tox.ini index 9cbbb02..84dfe02 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,14 @@ [tox] -envlist = py36, py37, py38, py39, py310, py311 +envlist = py37, py38, py39, py310, py311, py312 [gh-actions] python = - 3.6: py36 3.7: py37 3.8: py38 3.9: py39 3.10: py310 3.11: py311 + 3.12: py312 [testenv] setenv = @@ -16,3 +16,4 @@ setenv = commands = python setup.py test deps = -r{toxinidir}/requirements.txt + setuptools