From ccecab7a6375bb46ed355e1de78a8e6053a3fd8d Mon Sep 17 00:00:00 2001
From: Milton Lenis <miltonln04@gmail.com>
Date: Sun, 15 Nov 2020 21:20:56 -0500
Subject: [PATCH] Adding support for newer versions of Python and Django

---
 .gitignore              | 3 ++-
 .travis.yml             | 2 ++
 docs/tests.rst          | 5 +++++
 menu_generator/utils.py | 4 ++--
 requirements_dev.txt    | 4 ++++
 setup.py                | 7 +++++++
 tox.ini                 | 7 ++++++-
 7 files changed, 28 insertions(+), 4 deletions(-)
 create mode 100644 requirements_dev.txt

diff --git a/.gitignore b/.gitignore
index 5f57f0f..d79af0a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,4 +40,5 @@ dist/
 build/
 
 # Virtualenv
-venv/
\ No newline at end of file
+venv/
+.python-version
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index b76f72f..a8f4751 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,8 @@
 language: python
 
 python:
+  - "3.8"
+  - "3.7"
   - "3.6"
   - "3.5"
   - "3.4"
diff --git a/docs/tests.rst b/docs/tests.rst
index 978d975..00dce74 100644
--- a/docs/tests.rst
+++ b/docs/tests.rst
@@ -3,6 +3,11 @@ Running the tests
 
 To run the tests against configured environments:
 
+* Install pyenv and add all of the supported python versions there
+* Add all of the version to your locals `pyenv local system 3.7.9 3.6.12 3.5.10` for example
+* Install the development dependencies in `requirements_dev.txt`
+* Run the tests with tox
+
 ::
 
     tox
diff --git a/menu_generator/utils.py b/menu_generator/utils.py
index d761bdc..5a653d0 100755
--- a/menu_generator/utils.py
+++ b/menu_generator/utils.py
@@ -32,6 +32,6 @@ def clean_app_config(app_path):
             return new_app
         else:  # pragma: no cover
             raise ImproperlyConfigured(
-                "The application {0} is not in the configured apps or does" +
-                "not have the pattern app.apps.AppConfig".format(app_path)
+                f"The application {app_path} is not in the configured apps or does" +
+                "not have the pattern app.apps.AppConfig"
             )
diff --git a/requirements_dev.txt b/requirements_dev.txt
new file mode 100644
index 0000000..285b971
--- /dev/null
+++ b/requirements_dev.txt
@@ -0,0 +1,4 @@
+tox
+tox-pyenv
+coverage
+flake8
\ No newline at end of file
diff --git a/setup.py b/setup.py
index e3a9419..4950cbc 100755
--- a/setup.py
+++ b/setup.py
@@ -25,11 +25,18 @@ classifiers = [
     "Programming Language :: Python :: 3.4",
     "Programming Language :: Python :: 3.5",
     "Programming Language :: Python :: 3.6",
+    "Programming Language :: Python :: 3.7",
+    "Programming Language :: Python :: 3.8",
     "Framework :: Django",
     "Framework :: Django :: 1.8",
     "Framework :: Django :: 1.9",
     "Framework :: Django :: 1.10",
     "Framework :: Django :: 1.11",
+    "Framework :: Django :: 2.0",
+    "Framework :: Django :: 2.1",
+    "Framework :: Django :: 2.2",
+    "Framework :: Django :: 3.0",
+    "Framework :: Django :: 3.1",
     'Topic :: Utilities'
 ]
 
diff --git a/tox.ini b/tox.ini
index fb34bf6..1282940 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,11 @@
 # content of: tox.ini , put in same dir as setup.py
 [tox]
-envlist = py34,py35,py36
+envlist =
+    py34-django{18,19,110,111,20,21,22,30,31},
+    py35-django{18,19,110,111,20,21,22,30,31},
+    py36-django{18,19,110,111,20,21,22,30,31},
+    py37-django{18,19,110,111,20,21,22,30,31},
+    py38-django{18,19,110,111,20,21,22,30,31}
 [testenv]
 deps=django
      coverage
-- 
GitLab