Skip to content

Commit fb7d483

Browse files
committed
netbox-community#14638: Check for Python 3.10 or later
1 parent 7bedf48 commit fb7d483

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

upgrade.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# its most recent release.
44

55
# This script will invoke Python with the value of the PYTHON environment
6-
# variable (if set), or fall back to "python3". Note that NetBox v3.2+ requires
7-
# Python 3.8 or later.
6+
# variable (if set), or fall back to "python3". Note that NetBox v4.0+ requires
7+
# Python 3.10 or later.
88

99
cd "$(dirname "$0")"
1010

@@ -15,15 +15,15 @@ VIRTUALENV="$(pwd -P)/venv"
1515
PYTHON="${PYTHON:-python3}"
1616

1717
# Validate the minimum required Python version
18-
COMMAND="${PYTHON} -c 'import sys; exit(1 if sys.version_info < (3, 8) else 0)'"
18+
COMMAND="${PYTHON} -c 'import sys; exit(1 if sys.version_info < (3, 10) else 0)'"
1919
PYTHON_VERSION=$(eval "${PYTHON} -V")
2020
eval $COMMAND || {
2121
echo "--------------------------------------------------------------------"
2222
echo "ERROR: Unsupported Python version: ${PYTHON_VERSION}. NetBox requires"
23-
echo "Python 3.8 or later. To specify an alternate Python executable, set"
23+
echo "Python 3.10 or later. To specify an alternate Python executable, set"
2424
echo "the PYTHON environment variable. For example:"
2525
echo ""
26-
echo " sudo PYTHON=/usr/bin/python3.8 ./upgrade.sh"
26+
echo " sudo PYTHON=/usr/bin/python3.10 ./upgrade.sh"
2727
echo ""
2828
echo "To show your current Python version: ${PYTHON} -V"
2929
echo "--------------------------------------------------------------------"

0 commit comments

Comments
 (0)