diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c09267..7114c27 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,19 +11,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: 3.11 - name: Get pip cache dir id: pip-cache run: | - echo "::set-output name=dir::$(pip cache dir)" + echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT - name: Cache uses: actions/cache@v3 @@ -50,4 +50,4 @@ jobs: with: user: jazzband password: ${{ secrets.JAZZBAND_RELEASE_KEY }} - repository_url: https://jazzband.co/projects/django-configurations/upload + repository-url: https://jazzband.co/projects/django-configurations/upload diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 07b2cee..bc5848e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,10 +13,10 @@ jobs: fail-fast: false max-parallel: 5 matrix: - python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10'] + python-version: ['3.8', '3.9', '3.10', '3.11', 'pypy-3.10'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 diff --git a/.readthedocs.yaml b/.readthedocs.yaml index d3822a8..1b12da9 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,9 +1,9 @@ --- version: 2 build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: - python: "3.9" + python: "3.10" python: install: - requirements: docs/requirements.txt diff --git a/configurations/version.py b/configurations/version.py index 0ff5d02..5f2c59d 100644 --- a/configurations/version.py +++ b/configurations/version.py @@ -1,7 +1,4 @@ -try: - from importlib.metadata import PackageNotFoundError, version -except ImportError: - from importlib_metadata import PackageNotFoundError, version +from importlib.metadata import PackageNotFoundError, version try: __version__ = version("django-configurations") diff --git a/docs/changes.rst b/docs/changes.rst index da237bb..2771dbc 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -3,6 +3,20 @@ Changelog --------- +v2.5 (unreleased) +^^^^^^^^^^^^^^^^^ + +- Update Github actions and fix pipeline warnings +- Add compatibility with Django 5.0 +- **BACKWARD INCOMPATIBLE** Drop compatibility for Django 4.0 +- **BACKWARD INCOMPATIBLE** Drop compatibility for Python 3.7 and PyPy < 3.10 + +v2.4.2 (2023-09-27) +^^^^^^^^^^^^^^^^^^^ + +- Replace imp (due for removal in Python 3.12) with importlib +- Test on PyPy 3.10. + v2.4.1 (2023-04-04) ^^^^^^^^^^^^^^^^^^^ diff --git a/setup.py b/setup.py index d1efce0..11fc8b6 100644 --- a/setup.py +++ b/setup.py @@ -31,9 +31,8 @@ def read(*parts): }, install_requires=[ 'django>=3.2', - 'importlib-metadata;python_version<"3.8"', ], - python_requires='>=3.7, <4.0', + python_requires='>=3.8, <4.0', extras_require={ 'cache': ['django-cache-url'], 'database': ['dj-database-url'], @@ -50,7 +49,6 @@ def read(*parts): 'Development Status :: 5 - Production/Stable', 'Framework :: Django', 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', 'Framework :: Django :: 4.1', 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', @@ -59,7 +57,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/settings/main.py b/tests/settings/main.py index 1161422..e1dc1aa 100644 --- a/tests/settings/main.py +++ b/tests/settings/main.py @@ -1,6 +1,5 @@ import os import uuid -import django from configurations import Configuration, pristinemethod from configurations.values import BooleanValue @@ -36,9 +35,6 @@ class Test(Configuration): ROOT_URLCONF = 'tests.urls' - if django.VERSION[:2] < (1, 6): - TEST_RUNNER = 'discover_runner.DiscoverRunner' - @property def ALLOWED_HOSTS(self): allowed_hosts = super().ALLOWED_HOSTS[:] diff --git a/tox.ini b/tox.ini index 1998f89..6ad0593 100644 --- a/tox.ini +++ b/tox.ini @@ -3,23 +3,18 @@ skipsdist = true usedevelop = true minversion = 1.8 envlist = - py37-checkqa + py311-checkqa docs - py{37,py37}-dj{32} - py{38,py38,39,py39}-dj{32,40,41,42} - py{310,py310}-dj{32,40,41,42,main} - py{311}-dj{41,42,main} + py{38,39}-dj{32,41,42} + py{310,py310}-dj{32,41,42,50,main} + py{311}-dj{41,42,50,main} [gh-actions] python = - 3.7: py37,flake8,readme 3.8: py38 3.9: py39 3.10: py310 - 3.11: py311 - pypy-3.7: pypy37 - pypy-3.8: pypy38 - pypy-3.9: pypy39 + 3.11: py311,flake8,readme pypy-3.10: pypy310 [testenv] @@ -30,9 +25,9 @@ setenv = COVERAGE_PROCESS_START = {toxinidir}/setup.cfg deps = dj32: django~=3.2.9 - dj40: django~=4.0.0 dj41: django~=4.1.3 dj42: django~=4.2.0 + dj50: django~=5.0.0a1 djmain: https://github.com/django/django/archive/main.tar.gz coverage coverage_enable_subprocess @@ -44,7 +39,7 @@ commands = coverage report -m --skip-covered coverage xml -[testenv:py37-checkqa] +[testenv:py311-checkqa] commands = flake8 {toxinidir} check-manifest -v