Fixed #336 -- Update Python and Django versions (#337)

This commit is contained in:
Paolo Melchiorre 2022-08-05 16:42:58 +02:00 committed by GitHub
parent 141d8ef2c4
commit 794b858548
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 19 deletions

View file

@ -13,7 +13,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy-3.6', 'pypy-3.7', 'pypy-3.8']
python-version: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.7', 'pypy-3.8', 'pypy-3.9']
steps:
- uses: actions/checkout@v2

View file

@ -1,4 +1,4 @@
Copyright (c) 2012-2021, Jannis Leidel and other contributors.
Copyright (c) 2012-2022, Jannis Leidel and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,

View file

@ -6,6 +6,10 @@ Changelog
unreleased
^^^^^^^^^^
- Add compatibility with Django 4.1
- Drop compatibility for Django 2.2, 3.1
- Drop compatibility for Python 3.6
v2.3.2 (2022-01-25)
^^^^^^^^^^^^^^^^^^^

View file

@ -2,7 +2,7 @@ import configurations
# -- Project information -----------------------------------------------------
project = 'django-configurations'
copyright = '2012-2021, Jannis Leidel and other contributors'
copyright = '2012-2022, Jannis Leidel and other contributors'
author = 'Jannis Leidel and other contributors'
release = configurations.__version__

View file

@ -27,10 +27,10 @@ setup(
],
},
install_requires=[
'django>=2.2',
'django>=3.2',
'importlib-metadata;python_version<"3.8"',
],
python_requires='>=3.6, <4.0',
python_requires='>=3.7, <4.0',
extras_require={
'cache': ['django-cache-url'],
'database': ['dj-database-url'],
@ -46,17 +46,15 @@ setup(
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',

View file

@ -2,6 +2,7 @@ import decimal
import os
from contextlib import contextmanager
from django import VERSION as DJANGO_VERSION
from django.test import TestCase
from django.core.exceptions import ImproperlyConfigured
@ -411,6 +412,7 @@ class ValueTests(TestCase):
'EMAIL_HOST_PASSWORD': 'password',
'EMAIL_HOST_USER': 'user@domain.com',
'EMAIL_PORT': 587,
'EMAIL_TIMEOUT': None,
'EMAIL_USE_SSL': False,
'EMAIL_USE_TLS': True})
with env(EMAIL_URL='console://'):
@ -421,6 +423,7 @@ class ValueTests(TestCase):
'EMAIL_HOST_PASSWORD': None,
'EMAIL_HOST_USER': None,
'EMAIL_PORT': None,
'EMAIL_TIMEOUT': None,
'EMAIL_USE_SSL': False,
'EMAIL_USE_TLS': False})
with env(EMAIL_URL='smtps://user@domain.com:password@smtp.example.com:wrong'): # noqa: E501
@ -429,7 +432,7 @@ class ValueTests(TestCase):
def test_cache_url_value(self):
cache_setting = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'BACKEND': 'django_redis.cache.RedisCache' if DJANGO_VERSION < (4,) else 'django.core.cache.backends.redis.RedisCache', # noqa: E501
'LOCATION': 'redis://host:6379/1',
}
}
@ -503,6 +506,7 @@ class ValueTests(TestCase):
'EMAIL_HOST_PASSWORD': 'password',
'EMAIL_HOST_USER': 'user@domain.com',
'EMAIL_PORT': 587,
'EMAIL_TIMEOUT': None,
'EMAIL_USE_SSL': False,
'EMAIL_USE_TLS': True
})

17
tox.ini
View file

@ -3,22 +3,20 @@ skipsdist = true
usedevelop = true
minversion = 1.8
envlist =
py36-checkqa
py37-checkqa
docs
py{36,37,py36,py37}-dj{22,31,32}
py{38,39,py38}-dj{22,31,32,40,main}
py{310}-dj{32,40,main}
py{37,py37}-dj{32}
py{38,py38,39,py39,310}-dj{32,40,41,main}
[gh-actions]
python =
3.6: py36,flake8,readme
3.7: py37
3.7: py37,flake8,readme
3.8: py38
3.9: py39
3.10: py310
pypy-3.6: pypy36
pypy-3.7: pypy37
pypy-3.8: pypy38
pypy-3.9: pypy39
[testenv]
usedevelop = true
@ -27,10 +25,9 @@ setenv =
DJANGO_CONFIGURATION = Test
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
deps =
dj22: django~=2.2.17
dj31: django~=3.1.3
dj32: django~=3.2.9
dj40: django~=4.0.0
dj41: django~=4.1.0
djmain: https://github.com/django/django/archive/main.tar.gz
coverage
coverage_enable_subprocess
@ -42,7 +39,7 @@ commands =
coverage report -m --skip-covered
coverage xml
[testenv:py36-checkqa]
[testenv:py37-checkqa]
commands =
flake8 {toxinidir}
check-manifest -v