From 9fc1e88d9f5d3a93cb0288a6aee85c6a2333152b Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 12 Mar 2020 11:46:11 -0400 Subject: [PATCH] Update minimum Python version to 3.6 --- docs/additional-features/custom-scripts.md | 2 +- docs/administration/netbox-shell.md | 4 ++-- docs/index.md | 2 +- netbox/netbox/settings.py | 10 ++-------- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/additional-features/custom-scripts.md b/docs/additional-features/custom-scripts.md index 0904f8c824..1d84fea242 100644 --- a/docs/additional-features/custom-scripts.md +++ b/docs/additional-features/custom-scripts.md @@ -63,7 +63,7 @@ A human-friendly description of what your script does. ### `field_order` -A list of field names indicating the order in which the form fields should appear. This is optional, however on Python 3.5 and earlier the fields will appear in random order. (Declarative ordering is preserved on Python 3.6 and above.) For example: +A list of field names indicating the order in which the form fields should appear. This is optional, and should not be required on Python 3.6 and above. For example: ``` field_order = ['var1', 'var2', 'var3'] diff --git a/docs/administration/netbox-shell.md b/docs/administration/netbox-shell.md index bae4471b8c..34cd5a30f1 100644 --- a/docs/administration/netbox-shell.md +++ b/docs/administration/netbox-shell.md @@ -10,8 +10,8 @@ This will launch a customized version of [the built-in Django shell](https://doc ``` $ ./manage.py nbshell -### NetBox interactive shell (jstretch-laptop) -### Python 3.5.2 | Django 2.0.8 | NetBox 2.4.3 +### NetBox interactive shell (localhost) +### Python 3.6.9 | Django 2.2.11 | NetBox 2.7.10 ### lsmodels() will show available models. Use help() for more info. ``` diff --git a/docs/index.md b/docs/index.md index 4db2c55f53..3880c9d074 100644 --- a/docs/index.md +++ b/docs/index.md @@ -55,7 +55,7 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and ## Supported Python Versions -NetBox supports Python 3.5, 3.6, and 3.7 environments currently. Python 3.5 is scheduled to be unsupported in NetBox v2.8. +NetBox supports Python 3.6 and 3.7 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.) ## Getting Started diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 3c24b061a6..9cc5cd58e9 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -21,15 +21,9 @@ HOSTNAME = platform.node() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Validate Python version -if platform.python_version_tuple() < ('3', '5'): +if platform.python_version_tuple() < ('3', '6'): raise RuntimeError( - "NetBox requires Python 3.5 or higher (current: Python {})".format(platform.python_version()) - ) -elif platform.python_version_tuple() < ('3', '6'): - warnings.warn( - "Python 3.6 or higher will be required starting with NetBox v2.8 (current: Python {})".format( - platform.python_version() - ) + "NetBox requires Python 3.6 or higher (current: Python {})".format(platform.python_version()) )