Closes #19095: Introduce support for Python 3.13 & 3.14

This commit is contained in:
Jeremy Stretch 2025-09-08 15:36:12 -04:00
parent e221f1fffa
commit ec9da88134
7 changed files with 15 additions and 10 deletions

View File

@ -36,6 +36,8 @@ body:
description: What version of Python are you currently running? description: What version of Python are you currently running?
options: options:
- "3.12" - "3.12"
- "3.13"
- "3.14"
validations: validations:
required: true required: true
- type: textarea - type: textarea

View File

@ -31,7 +31,7 @@ jobs:
NETBOX_CONFIGURATION: netbox.configuration_testing NETBOX_CONFIGURATION: netbox.configuration_testing
strategy: strategy:
matrix: matrix:
python-version: ['3.12'] python-version: ['3.12', '3.13', '3.14']
node-version: ['20.x'] node-version: ['20.x']
services: services:
redis: redis:

View File

@ -238,7 +238,7 @@ sudo /opt/netbox/upgrade.sh
Note that **Python 3.12 or later is required** for NetBox v4.5 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.12 or later is required** for NetBox v4.5 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 ```no-highlight
sudo PYTHON=/usr/bin/python3.10 /opt/netbox/upgrade.sh sudo PYTHON=/usr/bin/python3.12 /opt/netbox/upgrade.sh
``` ```
!!! note !!! note

View File

@ -27,7 +27,7 @@ The following sections detail how to set up a new instance of NetBox:
| Dependency | Supported Versions | | Dependency | Supported Versions |
|------------|--------------------| |------------|--------------------|
| Python | 3.12+ | | Python | 3.12, 3.13, 3.14 |
| PostgreSQL | 14+ | | PostgreSQL | 14+ |
| Redis | 4.0+ | | Redis | 4.0+ |

View File

@ -19,7 +19,7 @@ NetBox requires the following dependencies:
| Dependency | Supported Versions | | Dependency | Supported Versions |
|------------|--------------------| |------------|--------------------|
| Python | 3.10, 3.11, 3.12 | | Python | 3.12, 3.13, 3.14 |
| PostgreSQL | 14+ | | PostgreSQL | 14+ |
| Redis | 4.0+ | | Redis | 4.0+ |
@ -27,6 +27,7 @@ NetBox requires the following dependencies:
| NetBox Version | Python min | Python max | PostgreSQL min | Redis min | Documentation | | NetBox Version | Python min | Python max | PostgreSQL min | Redis min | Documentation |
|:--------------:|:----------:|:----------:|:--------------:|:---------:|:-----------------------------------------------------------------------------------------:| |:--------------:|:----------:|:----------:|:--------------:|:---------:|:-----------------------------------------------------------------------------------------:|
| 4.5 | 3.12 | 3.14 | 14 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.5.0/docs/installation/index.md) |
| 4.4 | 3.10 | 3.12 | 14 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.4.0/docs/installation/index.md) | | 4.4 | 3.10 | 3.12 | 14 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.4.0/docs/installation/index.md) |
| 4.3 | 3.10 | 3.12 | 14 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.3.0/docs/installation/index.md) | | 4.3 | 3.10 | 3.12 | 14 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.3.0/docs/installation/index.md) |
| 4.2 | 3.10 | 3.12 | 13 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.2.0/docs/installation/index.md) | | 4.2 | 3.10 | 3.12 | 13 | 4.0 | [Link](https://github.com/netbox-community/netbox/blob/v4.2.0/docs/installation/index.md) |
@ -130,7 +131,7 @@ sudo ./upgrade.sh
If the default version of Python is not at least 3.10, 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.10, 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 ```no-highlight
sudo PYTHON=/usr/bin/python3.10 ./upgrade.sh sudo PYTHON=/usr/bin/python3.12 ./upgrade.sh
``` ```
!!! note !!! note

View File

@ -173,12 +173,12 @@ classifiers=[
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'Natural Language :: English', 'Natural Language :: English',
"Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3 :: Only",
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
] ]
requires-python = ">=3.10.0" requires-python = ">=3.12.0"
``` ```
@ -195,7 +195,7 @@ python3 -m venv ~/.virtualenvs/my_plugin
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.) 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 ```shell
echo /opt/netbox/netbox > $VENV/lib/python3.10/site-packages/netbox.pth echo /opt/netbox/netbox > $VENV/lib/python3.12/site-packages/netbox.pth
``` ```
## Development Installation ## Development Installation

View File

@ -16,6 +16,8 @@ classifiers = [
"Programming Language :: Python", "Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
] ]
[project.urls] [project.urls]
@ -26,7 +28,7 @@ Issues = "https://github.com/netbox-community/netbox/issues"
[tool.black] [tool.black]
line-length = 120 line-length = 120
target_version = ['py312'] target_version = ['py312', 'py313', 'py314']
skip-string-normalization = true skip-string-normalization = true
[tool.isort] [tool.isort]