Require Python 3.5.2 for qutebrowser

For __getattr__ type annotations, we want to use @typing.overload in .py files.
However, support for doing so was only added in Python 3.5.2.

Debian Stretch ships 3.5.3, Ubuntu 16.04 LTS ships 3.5.2. Looking at crash
logs, the last crash log using 3.5.0/.1 was in March 2017, so requiring this
should be safe without anyone even noticing.
This commit is contained in:
Florian Bruhin 2019-09-12 15:05:39 +02:00
parent 4bb5c4e5d4
commit 16dc3dc3db
5 changed files with 11 additions and 5 deletions

View File

@ -96,7 +96,7 @@ Requirements
The following software and libraries are required to run qutebrowser:
* https://www.python.org/[Python] 3.5 or newer (3.6 recommended)
* https://www.python.org/[Python] 3.5.2 or newer (3.6 recommended)
* https://www.qt.io/[Qt] 5.7.1 or newer (5.12 recommended due to https://bugreports.qt.io/browse/QTBUG-76913[segfaults on media pages with Qt 5.13]); support for < 5.9
will be dropped soon) with the following modules:
- QtCore / qtbase

View File

@ -65,6 +65,12 @@ Fixed
- With rapid hinting in number mode, backspace now edits the filter text after
following a hint.
Removed
~~~~~~~
- At least Python 3.5.2 is now required to run qutebrowser, support for 3.5.0
and 3.5.1 was dropped.
v1.7.1 (unreleased)
-------------------

View File

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

View File

@ -330,7 +330,7 @@ def test_launching_with_python2():
except FileNotFoundError:
pytest.skip("python2 not found")
assert proc.returncode == 1
error = "At least Python 3.5 is required to run qutebrowser"
error = "At least Python 3.5.2 is required to run qutebrowser"
assert proc.stderr.decode('ascii').startswith(error)

View File

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