Skip to content

Commit a98b2fa

Browse files
Merge pull request #9134 from markkuleinio/python-version
Fixes #9133: Require Python 3.8+ to run upgrade.sh
2 parents 7463c40 + 7779b66 commit a98b2fa

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,23 +3,23 @@
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.0+ requires
7-
# Python 3.7 or later.
6+
# variable (if set), or fall back to "python3". Note that NetBox v3.2+ requires
7+
# Python 3.8 or later.
88

99
cd "$(dirname "$0")"
1010
VIRTUALENV="$(pwd -P)/venv"
1111
PYTHON="${PYTHON:-python3}"
1212

1313
# Validate the minimum required Python version
14-
COMMAND="${PYTHON} -c 'import sys; exit(1 if sys.version_info < (3, 7) else 0)'"
14+
COMMAND="${PYTHON} -c 'import sys; exit(1 if sys.version_info < (3, 8) else 0)'"
1515
PYTHON_VERSION=$(eval "${PYTHON} -V")
1616
eval $COMMAND || {
1717
echo "--------------------------------------------------------------------"
1818
echo "ERROR: Unsupported Python version: ${PYTHON_VERSION}. NetBox requires"
19-
echo "Python 3.7 or later. To specify an alternate Python executable, set"
19+
echo "Python 3.8 or later. To specify an alternate Python executable, set"
2020
echo "the PYTHON environment variable. For example:"
2121
echo ""
22-
echo " sudo PYTHON=/usr/bin/python3.7 ./upgrade.sh"
22+
echo " sudo PYTHON=/usr/bin/python3.8 ./upgrade.sh"
2323
echo ""
2424
echo "To show your current Python version: ${PYTHON} -V"
2525
echo "--------------------------------------------------------------------"

0 commit comments

Comments
 (0)