From b93ae66e3e6cbe49bf98775f7af65a2018c577aa Mon Sep 17 00:00:00 2001 From: Paolo Melchiorre Date: Fri, 5 Aug 2022 14:00:18 +0200 Subject: [PATCH] Fixed #336 -- Update Python and Django versions --- .github/workflows/test.yml | 2 +- LICENSE | 2 +- docs/changes.rst | 4 ++++ docs/conf.py | 2 +- setup.py | 8 +++----- tests/test_values.py | 6 +++++- tox.ini | 17 +++++++---------- 7 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc9cd8f..612289f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/LICENSE b/LICENSE index f4cf362..c0ad72f 100644 --- a/LICENSE +++ b/LICENSE @@ -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, diff --git a/docs/changes.rst b/docs/changes.rst index e6b83e9..286136b 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -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) ^^^^^^^^^^^^^^^^^^^ diff --git a/docs/conf.py b/docs/conf.py index ad34a1b..632a5d9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,7 +2,7 @@ # -- 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__ diff --git a/setup.py b/setup.py index ad37c62..bbf05bb 100644 --- a/setup.py +++ b/setup.py @@ -27,10 +27,10 @@ def read(*parts): ], }, 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 @@ def read(*parts): 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', diff --git a/tests/test_values.py b/tests/test_values.py index 2547e50..a98e718 100644 --- a/tests/test_values.py +++ b/tests/test_values.py @@ -2,6 +2,7 @@ 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 @@ def test_email_url_value(self): '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 @@ def test_email_url_value(self): '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 @@ def test_email_url_value(self): 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 Target: 'EMAIL_HOST_PASSWORD': 'password', 'EMAIL_HOST_USER': 'user@domain.com', 'EMAIL_PORT': 587, + 'EMAIL_TIMEOUT': None, 'EMAIL_USE_SSL': False, 'EMAIL_USE_TLS': True }) diff --git a/tox.ini b/tox.ini index a454ad4..f3e79d6 100644 --- a/tox.ini +++ b/tox.ini @@ -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