Skip to content

Commit

Permalink
Fixed #336 -- Update Python and Django versions (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloxnet committed Aug 5, 2022
1 parent 141d8ef commit 794b858
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 4 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
^^^^^^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
8 changes: 3 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand All @@ -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',
Expand Down
6 changes: 5 additions & 1 deletion tests/test_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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://'):
Expand All @@ -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
Expand All @@ -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',
}
}
Expand Down Expand Up @@ -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
})
Expand Down
17 changes: 7 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -42,7 +39,7 @@ commands =
coverage report -m --skip-covered
coverage xml

[testenv:py36-checkqa]
[testenv:py37-checkqa]
commands =
flake8 {toxinidir}
check-manifest -v
Expand Down

0 comments on commit 794b858

Please sign in to comment.