Drop support for Django < 2.2 LTS, incl. Python 2.7

This commit is contained in:
Michael Käufl 2021-01-18 10:23:23 +01:00 committed by Asif Saif Uddin
parent 78f9824f0c
commit dd5d6974cb
7 changed files with 15 additions and 30 deletions

View file

@ -9,7 +9,7 @@ jobs:
fail-fast: false
max-parallel: 5
matrix:
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', 'pypy3']
python-version: ['3.5', '3.6', '3.7', '3.8', 'pypy3']
steps:
- uses: actions/checkout@v2

View file

@ -82,16 +82,10 @@ class ConfigurationImporter(object):
return os.environ.get(self.namevar)
def check_options(self):
try:
parser = base.CommandParser(
usage="%(prog)s subcommand [options] [args]",
add_help=False)
except TypeError:
# Django before 2.1 used a `cmd` argument.
parser = base.CommandParser(
None,
usage="%(prog)s subcommand [options] [args]",
add_help=False)
parser = base.CommandParser(
usage="%(prog)s subcommand [options] [args]",
add_help=False,
)
parser.add_argument('--settings')
parser.add_argument('--pythonpath')
parser.add_argument(CONFIGURATION_ARGUMENT,

View file

@ -3,6 +3,13 @@
Changelog
---------
unreleased
^^^^^^^^^^
- **BACKWARD INCOMPATIBLE** Drop support for Python 2.7.
- **BACKWARD INCOMPATIBLE** Drop support for Django < 2.2.
v2.2 (2019-12-03)
^^^^^^^^^^^^^^^^^

View file

@ -290,7 +290,7 @@ epub_copyright = u'2012, Jannis Leidel'
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('http://docs.python.org/2.7', None),
'python': ('http://docs.python.org/3', None),
'sphinx': ('http://sphinx.pocoo.org/', None),
'django': ('http://docs.djangoproject.com/en/dev/',
'http://docs.djangoproject.com/en/dev/_objects/'),

View file

@ -1,6 +1,3 @@
[wheel]
universal = 1
[coverage:run]
source = .
branch = 1

View file

@ -46,16 +46,12 @@ setup(
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',

13
tox.ini
View file

@ -5,15 +5,11 @@ minversion = 1.8
whitelist_externals = sphinx-build
envlist =
py36-checkqa,
py{27,35,36,py}-dj111
py{35,36,37,py3}-dj20
py{35,36,37,py3}-dj21
py{35,36,37,38,py3}-dj22
py{36,37,38,py3}-dj{30,master}
[gh-actions]
python =
2.7: py27
3.5: py35
3.6: py36,flake8,readme
3.7: py37
@ -27,14 +23,9 @@ setenv =
DJANGO_CONFIGURATION = Test
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
deps =
dj111: django>=1.11,<2.0
dj111: dj-email-url<1.0.0
dj20: django>=2.0a1,<2.1
dj21: django>=2.1a1,<2.2
dj22: django>=2.2a1,<3.0
dj30: django>=3.0a1,<3.1
dj22: django>=2.2,<3.0
dj30: django>=3.0,<3.1
djmaster: https://github.com/django/django/archive/master.tar.gz#egg=django
py27,pypy: mock
coverage
coverage_enable_subprocess
extras = testing