summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2019-09-12 15:05:39 +0200
committerFlorian Bruhin <me@the-compiler.org>2019-09-12 21:43:20 +0200
commit16dc3dc3dbcacf0a0b764d08051d6307f4212242 (patch)
tree95e364bebabb113b8f22189a3fc74d42daf23b2d
parent4bb5c4e5d493c86ab1c276791b056b29128bd786 (diff)
downloadqutebrowser-16dc3dc3dbcacf0a0b764d08051d6307f4212242.tar.gz
qutebrowser-16dc3dc3dbcacf0a0b764d08051d6307f4212242.zip
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.
-rw-r--r--README.asciidoc2
-rw-r--r--doc/changelog.asciidoc6
-rw-r--r--qutebrowser/misc/checkpyver.py4
-rw-r--r--tests/end2end/test_invocations.py2
-rw-r--r--tests/unit/misc/test_checkpyver.py2
5 files changed, 11 insertions, 5 deletions
diff --git a/README.asciidoc b/README.asciidoc
index 48fc589ea..1f9788824 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -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
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index 3678dc871..c5099e28c 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -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)
-------------------
diff --git a/qutebrowser/misc/checkpyver.py b/qutebrowser/misc/checkpyver.py
index 597b2597c..dae185dec 100644
--- a/qutebrowser/misc/checkpyver.py
+++ b/qutebrowser/misc/checkpyver.py
@@ -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
diff --git a/tests/end2end/test_invocations.py b/tests/end2end/test_invocations.py
index ed01c91a3..29f720c5e 100644
--- a/tests/end2end/test_invocations.py
+++ b/tests/end2end/test_invocations.py
@@ -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)
diff --git a/tests/unit/misc/test_checkpyver.py b/tests/unit/misc/test_checkpyver.py
index 0b1b7ef94..d77a028ed 100644
--- a/tests/unit/misc/test_checkpyver.py
+++ b/tests/unit/misc/test_checkpyver.py
@@ -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")