mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 09:51:22 -06:00
Add deprecation warning for Python 3.5
This commit is contained in:
parent
6221bc8f43
commit
0787713298
@ -1,5 +1,9 @@
|
|||||||
# v2.7.0 (FUTURE)
|
# v2.7.0 (FUTURE)
|
||||||
|
|
||||||
|
!!! warning
|
||||||
|
NetBox v2.7 is the last major release that will support Python 3.5. Beginning with NetBox v2.8, Python 3.6 or higher
|
||||||
|
will be required.
|
||||||
|
|
||||||
## New Features
|
## New Features
|
||||||
|
|
||||||
### Enhanced Device Type Import ([#451](https://github.com/netbox-community/netbox/issues/451))
|
### Enhanced Device Type Import ([#451](https://github.com/netbox-community/netbox/issues/451))
|
||||||
|
@ -20,11 +20,17 @@ HOSTNAME = platform.node()
|
|||||||
# Set the base directory two levels up
|
# Set the base directory two levels up
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
# Django 2.1+ requires Python 3.5+
|
# Validate Python version
|
||||||
if platform.python_version_tuple() < ('3', '5'):
|
if platform.python_version_tuple() < ('3', '5'):
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
"NetBox requires Python 3.5 or higher (current: Python {})".format(platform.python_version())
|
"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()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user