diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8e3f47ab..a898ab58d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.8, 3.9, 3.10] node-version: [14.x] services: redis: diff --git a/docs/index.md b/docs/index.md index 7abbd9310..02e523825 100644 --- a/docs/index.md +++ b/docs/index.md @@ -54,7 +54,7 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and ## Supported Python Versions -NetBox supports Python 3.7, 3.8, and 3.9 environments currently. (Support for Python 3.6 was removed in NetBox v3.0.) +NetBox supports Python 3.8, 3.9, and 3.10 environments. ## Getting Started diff --git a/docs/installation/3-netbox.md b/docs/installation/3-netbox.md index b1e1e832e..cf9c19641 100644 --- a/docs/installation/3-netbox.md +++ b/docs/installation/3-netbox.md @@ -6,8 +6,8 @@ This section of the documentation discusses installing and configuring the NetBo Begin by installing all system packages required by NetBox and its dependencies. -!!! warning "Python 3.7 or later required" - NetBox v3.0 and v3.1 require Python 3.7, 3.8, or 3.9. It is recommended to install at least Python v3.8, as this will become the minimum supported Python version in NetBox v3.2. +!!! warning "Python 3.8 or later required" + NetBox v3.2 requires Python 3.8, 3.9, or 3.10. === "Ubuntu" @@ -17,16 +17,11 @@ Begin by installing all system packages required by NetBox and its dependencies. === "CentOS" - !!! warning - CentOS 8 does not provide Python 3.7 or later via its native package manager. You will need to install it via some other means. [Here is an example](https://tecadmin.net/install-python-3-7-on-centos-8/) of installing Python 3.7 from source. - - Once you have Python 3.7 or later installed, install the remaining system packages: - ```no-highlight sudo yum install -y gcc libxml2-devel libxslt-devel libffi-devel libpq-devel openssl-devel redhat-rpm-config ``` -Before continuing, check that your installed Python version is at least 3.7: +Before continuing, check that your installed Python version is at least 3.8: ```no-highlight python3 -V @@ -234,10 +229,10 @@ Once NetBox has been configured, we're ready to proceed with the actual installa sudo /opt/netbox/upgrade.sh ``` -Note that **Python 3.7 or later is required** for NetBox v3.0 and later releases. If the default Python installation on your server is set to a lesser version, pass the path to the supported installation as an environment variable named `PYTHON`. (Note that the environment variable must be passed _after_ the `sudo` command.) +Note that **Python 3.8 or later is required** for NetBox v3.2 and later releases. If the default Python installation on your server is set to a lesser version, pass the path to the supported installation as an environment variable named `PYTHON`. (Note that the environment variable must be passed _after_ the `sudo` command.) ```no-highlight -sudo PYTHON=/usr/bin/python3.7 /opt/netbox/upgrade.sh +sudo PYTHON=/usr/bin/python3.8 /opt/netbox/upgrade.sh ``` !!! note diff --git a/docs/installation/index.md b/docs/installation/index.md index 74b51da7f..accabd8cc 100644 --- a/docs/installation/index.md +++ b/docs/installation/index.md @@ -19,7 +19,7 @@ The video below demonstrates the installation of NetBox v3.0 on Ubuntu 20.04 for | Dependency | Minimum Version | |------------|-----------------| -| Python | 3.7 | +| Python | 3.8 | | PostgreSQL | 10 | | Redis | 4.0 | diff --git a/docs/installation/upgrading.md b/docs/installation/upgrading.md index d7f7156c8..56b66c10d 100644 --- a/docs/installation/upgrading.md +++ b/docs/installation/upgrading.md @@ -10,7 +10,7 @@ NetBox v3.0 and later requires the following: | Dependency | Minimum Version | |------------|-----------------| -| Python | 3.7 | +| Python | 3.8 | | PostgreSQL | 10 | | Redis | 4.0 | @@ -76,10 +76,10 @@ sudo ./upgrade.sh ``` !!! warning - If the default version of Python is not at least 3.7, you'll need to pass the path to a supported Python version as an environment variable when calling the upgrade script. For example: + If the default version of Python is not at least 3.8, you'll need to pass the path to a supported Python version as an environment variable when calling the upgrade script. For example: ```no-highlight - sudo PYTHON=/usr/bin/python3.7 ./upgrade.sh + sudo PYTHON=/usr/bin/python3.8 ./upgrade.sh ``` This script performs the following actions: diff --git a/docs/plugins/development.md b/docs/plugins/development.md index cde659a45..89436a321 100644 --- a/docs/plugins/development.md +++ b/docs/plugins/development.md @@ -48,7 +48,7 @@ The plugin source directory contains all the actual Python code and other resour ### Create setup.py -`setup.py` is the [setup script](https://docs.python.org/3.7/distutils/setupscript.html) we'll use to install our plugin once it's finished. The primary function of this script is to call the setuptools library's `setup()` function to create a Python distribution package. We can pass a number of keyword arguments to inform the package creation as well as to provide metadata about the plugin. An example `setup.py` is below: +`setup.py` is the [setup script](https://docs.python.org/3.8/distutils/setupscript.html) we'll use to install our plugin once it's finished. The primary function of this script is to call the setuptools library's `setup()` function to create a Python distribution package. We can pass a number of keyword arguments to inform the package creation as well as to provide metadata about the plugin. An example `setup.py` is below: ```python from setuptools import find_packages, setup @@ -129,7 +129,7 @@ python3 -m venv /path/to/my/venv You can make NetBox available within this environment by creating a path file pointing to its location. This will add NetBox to the Python path upon activation. (Be sure to adjust the command below to specify your actual virtual environment path, Python version, and NetBox installation.) ```shell -cd $VENV/lib/python3.7/site-packages/ +cd $VENV/lib/python3.8/site-packages/ echo /opt/netbox/netbox > netbox.pth ``` diff --git a/docs/release-notes/version-3.2.md b/docs/release-notes/version-3.2.md new file mode 100644 index 000000000..2c4dafc5a --- /dev/null +++ b/docs/release-notes/version-3.2.md @@ -0,0 +1,10 @@ +# NetBox v3.2 + +## v3.2.0 (FUTURE) + +!!! warning "Python 3.8 or Later Required" + NetBox v3.2 requires Python 3.8 or later. + +### Other Changes + +* [#7731](https://github.com/netbox-community/netbox/issues/7731) - Require Python 3.8 or later diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 40c31b74d..9bc0dbc0c 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -19,7 +19,7 @@ from netbox.config import PARAMS # Environment setup # -VERSION = '3.1.1-dev' +VERSION = '3.2.0-dev' # Hostname HOSTNAME = platform.node() @@ -28,13 +28,9 @@ HOSTNAME = platform.node() BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Validate Python version -if sys.version_info < (3, 7): - raise RuntimeError( - f"NetBox requires Python 3.7 or later. (Currently installed: Python {platform.python_version()})" - ) if sys.version_info < (3, 8): - warnings.warn( - f"NetBox v3.2 will require Python 3.8 or later. (Currently installed: Python {platform.python_version()})" + raise RuntimeError( + f"NetBox requires Python 3.8 or later. (Currently installed: Python {platform.python_version()})" )