Fix #368 -- Update Python and Django versions

This commit is contained in:
Paolo Melchiorre 2023-10-04 16:52:16 +02:00
parent 27f67a58a4
commit df2a7f18fd
No known key found for this signature in database
GPG key ID: 5F8222398E1ED035
8 changed files with 31 additions and 32 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -1,7 +1,4 @@
try:
from importlib.metadata import PackageNotFoundError, version
except ImportError:
from importlib_metadata import PackageNotFoundError, version
try:
__version__ = version("django-configurations")

View file

@ -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)
^^^^^^^^^^^^^^^^^^^

View file

@ -31,9 +31,8 @@ setup(
},
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 @@ setup(
'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 @@ setup(
'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',

View file

@ -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[:]

19
tox.ini
View file

@ -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