Update checkpyver for 3.9 drop

This commit is contained in:
killiandesse 2025-11-24 16:32:04 +01:00
parent 69f3882ce3
commit 2f73102aea
4 changed files with 5 additions and 5 deletions

View File

@ -28,11 +28,11 @@ except ImportError: # pragma: no cover
# to stderr. # to stderr.
def check_python_version(): def check_python_version():
"""Check if correct python version is run.""" """Check if correct python version is run."""
if sys.hexversion < 0x03090000: if sys.hexversion < 0x030a0000:
# We don't use .format() and print_function here just in case someone # We don't use .format() and print_function here just in case someone
# still has < 2.6 installed. # still has < 2.6 installed.
version_str = '.'.join(map(str, sys.version_info[:3])) version_str = '.'.join(map(str, sys.version_info[:3]))
text = ("At least Python 3.9 is required to run qutebrowser, but " + text = ("At least Python 3.10 is required to run qutebrowser, but " +
"it's running with " + version_str + ".\n") "it's running with " + version_str + ".\n")
show_errors = '--no-err-windows' not in sys.argv show_errors = '--no-err-windows' not in sys.argv

View File

@ -4,7 +4,7 @@
"""Things which need to be done really early (e.g. before importing Qt). """Things which need to be done really early (e.g. before importing Qt).
At this point we can be sure we have all python 3.9 features available. At this point we can be sure we have all python 3.10 features available.
""" """
try: try:

View File

@ -340,7 +340,7 @@ def test_launching_with_old_python(python):
except FileNotFoundError: except FileNotFoundError:
pytest.skip(f"{python} not found") pytest.skip(f"{python} not found")
assert proc.returncode == 1 assert proc.returncode == 1
error = "At least Python 3.9 is required to run qutebrowser" error = "At least Python 3.10 is required to run qutebrowser"
assert proc.stderr.decode('ascii').startswith(error) assert proc.stderr.decode('ascii').startswith(error)

View File

@ -14,7 +14,7 @@ import pytest
from qutebrowser.misc import checkpyver from qutebrowser.misc import checkpyver
TEXT = (r"At least Python 3.9 is required to run qutebrowser, but it's " TEXT = (r"At least Python 3.10 is required to run qutebrowser, but it's "
r"running with \d+\.\d+\.\d+.") r"running with \d+\.\d+\.\d+.")