From dd5d6974cb9a646cf898ad36ba001b07b2199da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Mon, 18 Jan 2021 10:23:23 +0100 Subject: [PATCH] Drop support for Django < 2.2 LTS, incl. Python 2.7 --- .github/workflows/test.yml | 2 +- configurations/importer.py | 14 ++++---------- docs/changes.rst | 7 +++++++ docs/conf.py | 2 +- setup.cfg | 3 --- setup.py | 4 ---- tox.ini | 13 ++----------- 7 files changed, 15 insertions(+), 30 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 792baf8..7df5943 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/configurations/importer.py b/configurations/importer.py index 4997380..353b589 100644 --- a/configurations/importer.py +++ b/configurations/importer.py @@ -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, diff --git a/docs/changes.rst b/docs/changes.rst index 2c983e3..655250e 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -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) ^^^^^^^^^^^^^^^^^ diff --git a/docs/conf.py b/docs/conf.py index 5e7bd64..00b1c69 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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/'), diff --git a/setup.cfg b/setup.cfg index 51a5b97..4c03348 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,3 @@ -[wheel] -universal = 1 - [coverage:run] source = . branch = 1 diff --git a/setup.py b/setup.py index add1cff..80c22e5 100644 --- a/setup.py +++ b/setup.py @@ -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', diff --git a/tox.ini b/tox.ini index 15eb0cc..782207e 100644 --- a/tox.ini +++ b/tox.ini @@ -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