summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.asciidoc4
-rw-r--r--doc/changelog.asciidoc9
-rw-r--r--misc/requirements/requirements-dev.txt2
-rw-r--r--misc/requirements/requirements-flake8.txt5
-rw-r--r--misc/requirements/requirements-flake8.txt-raw2
-rw-r--r--misc/requirements/requirements-pyinstaller.txt2
-rw-r--r--misc/requirements/requirements-pylint.txt6
-rw-r--r--misc/requirements/requirements-pylint.txt-raw4
-rw-r--r--misc/requirements/requirements-sphinx.txt2
-rw-r--r--misc/requirements/requirements-tests.txt6
-rw-r--r--qutebrowser/app.py6
-rw-r--r--qutebrowser/browser/qutescheme.py7
-rw-r--r--qutebrowser/browser/webengine/webenginetab.py6
-rw-r--r--qutebrowser/config/configdata.yml8
-rw-r--r--qutebrowser/html/warning-old-qt.html20
-rw-r--r--qutebrowser/html/warning-sessions.html21
-rw-r--r--qutebrowser/misc/sessions.py12
-rw-r--r--qutebrowser/utils/version.py5
-rw-r--r--scripts/dev/recompile_requirements.py33
19 files changed, 120 insertions, 40 deletions
diff --git a/README.asciidoc b/README.asciidoc
index 9e2a61a22..a86be572d 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -106,7 +106,7 @@ Requirements
The following software and libraries are required to run qutebrowser:
* https://www.python.org/[Python] 3.5.2 or newer (3.6 recommended)
-* https://www.qt.io/[Qt] 5.7.1 or newer (5.14 recommended; support for < 5.9
+* https://www.qt.io/[Qt] 5.7.1 or newer (5.14 recommended; support for < 5.11
will be dropped soon) with the following modules:
- QtCore / qtbase
- QtQuick (part of qtbase in some distributions)
@@ -120,7 +120,7 @@ The following software and libraries are required to run qutebrowser:
avoid visiting untrusted websites and using it for transmission of
sensitive data.**
* https://www.riverbankcomputing.com/software/pyqt/intro[PyQt] 5.7.0 or newer
- (5.14 recommended, support for < 5.9 will be dropped soon) for Python 3
+ (5.14 recommended, support for < 5.11 will be dropped soon) for Python 3
* https://pypi.python.org/pypi/setuptools/[pkg_resources/setuptools]
* https://fdik.org/pyPEG/[pyPEG2]
* http://jinja.pocoo.org/[jinja2]
diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc
index 0993fd894..309f36b2e 100644
--- a/doc/changelog.asciidoc
+++ b/doc/changelog.asciidoc
@@ -40,6 +40,8 @@ Added
Changed
~~~~~~~
+- First adaptions to Qt 5.15, including a stop-gap measure for session loading
+ not working properly with it.
- Searching now wraps around the page by default with QtWebKit (where it didn't
before). Set `search.wrap` to `false` to restore the old behavior.
- The `{}` placeholder for search engines (the `url.searchengines` setting) now
@@ -58,9 +60,14 @@ Changed
data.
- The `dictcli.py` script now shows better error messages.
- Various improvements to the `mkvenv.py` script (mainly useful for development).
-- First adoptions to Qt 5.15
- Minor performance improvements.
+Deprecated
+~~~~~~~~~~
+
+- A warning about old Qt versions is now also shown with Qt 5.9 and 5.10, as
+ support for Qt < 5.11 will be dropped in qutebrowser v2.0.
+
Fixed
~~~~~
diff --git a/misc/requirements/requirements-dev.txt b/misc/requirements/requirements-dev.txt
index 040587204..95d91d038 100644
--- a/misc/requirements/requirements-dev.txt
+++ b/misc/requirements/requirements-dev.txt
@@ -5,7 +5,7 @@ certifi==2020.4.5.1
cffi==1.14.0
chardet==3.0.4
colorama==0.4.3
-cryptography==2.9
+cryptography==2.9.2
cssutils==1.0.2
github3.py==1.3.0
hunter==3.1.3
diff --git a/misc/requirements/requirements-flake8.txt b/misc/requirements/requirements-flake8.txt
index 8513c7824..7d3b8b8f5 100644
--- a/misc/requirements/requirements-flake8.txt
+++ b/misc/requirements/requirements-flake8.txt
@@ -1,8 +1,7 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
attrs==19.3.0
-entrypoints==0.3
-flake8==3.7.9
+flake8==3.8.0a2
flake8-bugbear==20.1.4
flake8-builtins==1.5.2
flake8-comprehensions==3.2.2
@@ -18,7 +17,7 @@ flake8-tidy-imports==4.1.0
flake8-tuple==0.4.1
mccabe==0.6.1
pep8-naming==0.10.0
-pycodestyle==2.5.0
+pycodestyle==2.6.0a1
pydocstyle==5.0.2
pyflakes==2.2.0
six==1.14.0
diff --git a/misc/requirements/requirements-flake8.txt-raw b/misc/requirements/requirements-flake8.txt-raw
index 1bdca6974..99939d973 100644
--- a/misc/requirements/requirements-flake8.txt-raw
+++ b/misc/requirements/requirements-flake8.txt-raw
@@ -14,3 +14,5 @@ flake8-tuple
pep8-naming
pydocstyle
pyflakes
+
+#@ pre
diff --git a/misc/requirements/requirements-pyinstaller.txt b/misc/requirements/requirements-pyinstaller.txt
index 431673cce..d6fa5bc82 100644
--- a/misc/requirements/requirements-pyinstaller.txt
+++ b/misc/requirements/requirements-pyinstaller.txt
@@ -1,4 +1,4 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
altgraph==0.17
--e git+https://github.com/pyinstaller/pyinstaller.git@develop#egg=PyInstaller
+-e git+https://github.com/pyinstaller/pyinstaller.git@develop#egg=pyinstaller
diff --git a/misc/requirements/requirements-pylint.txt b/misc/requirements/requirements-pylint.txt
index 24b34ed66..1f5552a97 100644
--- a/misc/requirements/requirements-pylint.txt
+++ b/misc/requirements/requirements-pylint.txt
@@ -1,10 +1,10 @@
# This file is automatically generated by scripts/dev/recompile_requirements.py
-astroid==2.3.3
+astroid==2.3.3 # rq.filter: < 2.4
certifi==2020.4.5.1
cffi==1.14.0
chardet==3.0.4
-cryptography==2.9
+cryptography==2.9.2
github3.py==1.3.0
idna==2.9
isort==4.3.21
@@ -12,7 +12,7 @@ jwcrypto==0.7
lazy-object-proxy==1.4.3
mccabe==0.6.1
pycparser==2.20
-pylint==2.4.4
+pylint==2.4.4 # rq.filter: < 2.5
python-dateutil==2.8.1
./scripts/dev/pylint_checkers
requests==2.23.0
diff --git a/misc/requirements/requirements-pylint.txt-raw b/misc/requirements/requirements-pylint.txt-raw
index 8a1d36ffc..8e88c128d 100644
--- a/misc/requirements/requirements-pylint.txt-raw
+++ b/misc/requirements/requirements-pylint.txt-raw
@@ -1,4 +1,4 @@
-pylint
+pylint<2.5
./scripts/dev/pylint_checkers
requests
github3.py
@@ -6,3 +6,5 @@ github3.py
# fix qute-pylint location
#@ replace: qute-pylint==.* ./scripts/dev/pylint_checkers
#@ markers: typed-ast python_version<"3.8"
+#@ filter: pylint < 2.5
+#@ filter: astroid < 2.4
diff --git a/misc/requirements/requirements-sphinx.txt b/misc/requirements/requirements-sphinx.txt
index 4d2676ba7..e27f1446e 100644
--- a/misc/requirements/requirements-sphinx.txt
+++ b/misc/requirements/requirements-sphinx.txt
@@ -16,7 +16,7 @@ pytz==2019.3
requests==2.23.0
six==1.14.0
snowballstemmer==2.0.0
-Sphinx==3.0.2
+Sphinx==3.0.3
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
diff --git a/misc/requirements/requirements-tests.txt b/misc/requirements/requirements-tests.txt
index 49d43d5d6..54555f4bc 100644
--- a/misc/requirements/requirements-tests.txt
+++ b/misc/requirements/requirements-tests.txt
@@ -10,9 +10,9 @@ EasyProcess==0.2.10
Flask==1.1.2
glob2==0.7
hunter==3.1.3
-hypothesis==5.10.1
+hypothesis==5.10.4
itsdangerous==1.1.0
-jaraco.functools==3.0.0 ; python_version>="3.6"
+jaraco.functools==3.0.1 ; python_version>="3.6"
# Jinja2==2.11.2
Mako==1.1.2
manhole==1.6.0
@@ -27,7 +27,7 @@ py-cpuinfo==5.0.0
Pygments==2.6.1
pyparsing==2.4.7
pytest==5.4.1
-pytest-bdd==3.2.1
+pytest-bdd==3.3.0
pytest-benchmark==3.2.3
pytest-cov==2.8.1
pytest-instafail==0.4.1.post0
diff --git a/qutebrowser/app.py b/qutebrowser/app.py
index 445593706..22ae62b96 100644
--- a/qutebrowser/app.py
+++ b/qutebrowser/app.py
@@ -334,8 +334,12 @@ def _open_special_pages(args):
'qute://warning/webkit'),
('old-qt-warning-shown',
- not qtutils.version_check('5.9'),
+ not qtutils.version_check('5.11'),
'qute://warning/old-qt'),
+
+ ('session-warning-shown',
+ qtutils.version_check('5.15', compiled=False),
+ 'qute://warning/sessions'),
]
for state, condition, url in pages:
diff --git a/qutebrowser/browser/qutescheme.py b/qutebrowser/browser/qutescheme.py
index 3bc057796..6c61fbc22 100644
--- a/qutebrowser/browser/qutescheme.py
+++ b/qutebrowser/browser/qutescheme.py
@@ -47,7 +47,7 @@ import qutebrowser
from qutebrowser.browser import pdfjs, downloads, history
from qutebrowser.config import config, configdata, configexc, configdiff
from qutebrowser.utils import (version, utils, jinja, log, message, docutils,
- objreg, urlutils)
+ objreg, urlutils, standarddir)
from qutebrowser.qt import sip
@@ -576,6 +576,11 @@ def qute_warning(url):
elif path == '/webkit':
src = jinja.render('warning-webkit.html',
title='QtWebKit backend warning')
+ elif path == '/sessions':
+ src = jinja.render('warning-sessions.html',
+ title='Qt 5.15 sessions warning',
+ datadir=standarddir.data(),
+ sep=os.sep)
else:
raise NotFoundError("Invalid warning page {}".format(path))
return 'text/html', src
diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py
index 8b26f2136..ffe227988 100644
--- a/qutebrowser/browser/webengine/webenginetab.py
+++ b/qutebrowser/browser/webengine/webenginetab.py
@@ -645,6 +645,12 @@ class WebEngineHistoryPrivate(browsertab.AbstractHistoryPrivate):
qtutils.deserialize(data, self._history)
def load_items(self, items):
+ if qtutils.version_check('5.15', compiled=False):
+ # WORKAROUND for https://github.com/qutebrowser/qutebrowser/issues/5359
+ if items:
+ self._tab.load_url(items[-1].url)
+ return
+
if items:
self._tab.before_load_started.emit(items[-1].url)
diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml
index d055b92ba..38db52304 100644
--- a/qutebrowser/config/configdata.yml
+++ b/qutebrowser/config/configdata.yml
@@ -552,11 +552,11 @@ content.headers.user_agent:
completions:
# See https://techblog.willshouse.com/2012/01/03/most-common-user-agents/
- - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
- like Gecko) Chrome/79.0.3945.117 Safari/537.36"
- - Chrome 79 Win10
+ like Gecko) Chrome/80.0.3987.163 Safari/537.36"
+ - Chrome 80 Win10
- - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
- Gecko) Chrome/79.0.3945.117 Safari/537.36"
- - Chrome 79 Linux
+ Gecko) Chrome/80.0.3987.149 Safari/537.36 "
+ - Chrome 80 Linux
supports_pattern: true
desc: |
User agent to send.
diff --git a/qutebrowser/html/warning-old-qt.html b/qutebrowser/html/warning-old-qt.html
index 157d50714..e5da57548 100644
--- a/qutebrowser/html/warning-old-qt.html
+++ b/qutebrowser/html/warning-old-qt.html
@@ -7,18 +7,26 @@ qute://warning/old-qt</span> to show it again at a later time.</span>
<p>You're using qutebrowser with Qt {{qt_version}}.</p>
+{% if qt_version.startswith('5.7.') %}
<p>Qt 5.7 was released in June 2016, with the 5.7.1 patch release in December
2016. It is based on Chromium 49 (March 2016) with (some) security fixes up to
-Chromium 54 (October 2016). It is also
-<a href="https://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html#browser-security">not covered</a>
-by Debian security updates.</p>
-
+Chromium 54 (October 2016).</p>
+{% elif qt_version.startswith('5.8.') %}
<p>Qt 5.8 has had various bugs, and has been unsupported (but working to some
degree) in qutebrowser for a while.</p>
+{% elif qt_version.startswith('5.9.') %}
+<p>Qt 5.9 LTS was released in May 2017 and is based on Chromium 56 (January 2017). It is a long term support release with the 5.9.9 patch release in December 2019 including (some) security fixes up to Chromium 78 (November 2019). However, its usage was found to be low, and the next LTS (Qt 5.12) was released in December 2018.</p>
+{% elif qt_version.startswith('5.10.') %}
+<p>Qt 5.10 was released in December 2017, with the 5.10.1 patch release in February
+2018. It is based on Chromium 65 (March 2018) with (some) security fixes up to
+Chromium 70 (November 2018).</p>
+{% endif %}
+
+Also, note that QtWebEngine is <a href="https://www.debian.org/releases/stable/amd64/release-notes/ch-information.en.html#browser-security">not covered</a> by Debian security updates.
<p>Because of those security issues and the maintaince burden coming with
-supporting old versions, support for Qt < 5.9 will be dropped in a future
-qutebrowser release. You might want to check
+supporting old versions, support for Qt < 5.11 will be dropped in qutebrowser
+v2.0. You might want to check
<a href="https://qutebrowser.org/doc/install.html">alternate installation methods</a>
which allow you to get a newer Qt.</p>
{% endblock %}
diff --git a/qutebrowser/html/warning-sessions.html b/qutebrowser/html/warning-sessions.html
new file mode 100644
index 000000000..f93971c6a
--- /dev/null
+++ b/qutebrowser/html/warning-sessions.html
@@ -0,0 +1,21 @@
+{% extends "styled.html" %}
+
+{% block content %}
+<h1>{{ title }}</h1>
+<span class="note">Note this warning will only appear once. Use <span class="mono">:open
+qute://warning/sessions</span> to show it again at a later time.</span>
+
+<p>You're using qutebrowser with Qt 5.15.</p>
+
+<p>Since Qt doesn't provide an API to load the history of a tab, qutebrowser relies on a reverse-engineered binary serialization format to load tab history from session files. With Qt 5.15, unfortunately that format changed (due to the underlying Chromium upgrade), in a way which makes it impossible for qutebrowser to load tab history from existing session data.</p>
+
+<p>At the time of writing (April 2020), a new session format which stores part of the needed binary data in saved sessions is <a href="https://github.com/qutebrowser/qutebrowser/issues/5359">in development</a> and will be released with qutebrowser v1.12.0.</p>
+
+<p>As a stop-gap measure:</p>
+
+<ul>
+ <li>Loading a session with this release will <b>only load the most recently opened page</b> for every tab. As a result, the back/forward-history of every tab <b>will be lost</b> as soon as the session is saved again.</li>
+ <li>A one-time backup of the session folder has been created at <span class="mono">{{ datadir }}{{ sep }}sessions{{ sep }}before-qt-515</span>.</li>
+</ul>
+
+{% endblock %}
diff --git a/qutebrowser/misc/sessions.py b/qutebrowser/misc/sessions.py
index 1bcd42baf..6f03aa09d 100644
--- a/qutebrowser/misc/sessions.py
+++ b/qutebrowser/misc/sessions.py
@@ -24,6 +24,8 @@ import os.path
import itertools
import urllib
import typing
+import glob
+import shutil
from PyQt5.QtCore import QUrl, QObject, QPoint, QTimer, pyqtSlot
from PyQt5.QtWidgets import QApplication
@@ -59,6 +61,16 @@ def init(parent=None):
parent: The parent to use for the SessionManager.
"""
base_path = os.path.join(standarddir.data(), 'sessions')
+
+ # WORKAROUND for https://github.com/qutebrowser/qutebrowser/issues/5359
+ backup_path = os.path.join(base_path, 'before-qt-515')
+ if (os.path.exists(base_path) and
+ not os.path.exists(backup_path) and
+ qtutils.version_check('5.15', compiled=False)):
+ os.mkdir(backup_path)
+ for filename in glob.glob(os.path.join(base_path, '*.yml')):
+ shutil.copy(filename, backup_path)
+
try:
os.mkdir(base_path)
except FileExistsError:
diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py
index d10c57411..52d29ee4b 100644
--- a/qutebrowser/utils/version.py
+++ b/qutebrowser/utils/version.py
@@ -343,7 +343,7 @@ def _chromium_version() -> str:
Qt 5.9: Chromium 56
(LTS) 56.0.2924.122 (2017-01-25)
- 5.9.8: Security fixes up to 72.0.3626.121 (2019-03-01)
+ 5.9.9: Security fixes up to 78.0.3904.108 (2019-11-18)
Qt 5.10: Chromium 61
61.0.3163.140 (2017-09-05)
@@ -366,7 +366,8 @@ def _chromium_version() -> str:
5.14.2: Security fixes up to 80.0.3987.132 (2020-03-03)
Qt 5.15: Chromium 80
- 80.0.3987.136 (~2020-03-09)
+ 80.0.3987.163 (2020-04-02)
+ 5.15.0: Security fixes up to 81.0.4044.122 (2020-04-21)
Also see https://www.chromium.org/developers/calendar
and https://chromereleases.googleblog.com/
diff --git a/scripts/dev/recompile_requirements.py b/scripts/dev/recompile_requirements.py
index ecd7dd153..3e7db0c9a 100644
--- a/scripts/dev/recompile_requirements.py
+++ b/scripts/dev/recompile_requirements.py
@@ -81,12 +81,18 @@ def read_comments(fobj):
'ignore': [],
'add': [],
'replace': {},
+ 'pre': False,
}
for line in fobj:
if line.startswith('#@'):
- command, args = line[2:].split(':', maxsplit=1)
- command = command.strip()
- args = args.strip()
+ if ':' in line:
+ command, args = line[2:].split(':', maxsplit=1)
+ command = command.strip()
+ args = args.strip()
+ else:
+ command = line[2:].strip()
+ args = None
+
if command == 'filter':
pkg, filt = args.split(' ', maxsplit=1)
comments['filter'][pkg] = filt
@@ -103,6 +109,8 @@ def read_comments(fobj):
comments['markers'][pkg] = markers
elif command == 'add':
comments['add'].append(args)
+ elif command == 'pre':
+ comments['pre'] = True
return comments
@@ -113,7 +121,7 @@ def get_all_names():
yield basename[len('requirements-'):-len('.txt-raw')]
-def init_venv(host_python, venv_dir, requirements):
+def init_venv(host_python, venv_dir, requirements, pre=False):
"""Initialize a new virtualenv and install the given packages."""
subprocess.run([host_python, '-m', 'venv', venv_dir], check=True)
@@ -121,8 +129,10 @@ def init_venv(host_python, venv_dir, requirements):
subprocess.run([venv_python, '-m', 'pip',
'install', '-U', 'pip'], check=True)
- subprocess.run([venv_python, '-m', 'pip',
- 'install', '-r', requirements], check=True)
+ install_command = [venv_python, '-m', 'pip', 'install', '-r', requirements]
+ if pre:
+ install_command.append('--pre')
+ subprocess.run(install_command, check=True)
subprocess.run([venv_python, '-m', 'pip', 'check'], check=True)
return venv_python
@@ -152,15 +162,18 @@ def main():
utils.print_subtitle("Building")
+ with open(filename, 'r', encoding='utf-8') as f:
+ comments = read_comments(f)
+
with tempfile.TemporaryDirectory() as tmpdir:
- venv_python = init_venv(host_python, tmpdir, filename)
+ venv_python = init_venv(host_python=host_python,
+ venv_dir=tmpdir,
+ requirements=filename,
+ pre=comments['pre'])
proc = subprocess.run([venv_python, '-m', 'pip', 'freeze'],
check=True, stdout=subprocess.PIPE)
reqs = proc.stdout.decode('utf-8')
- with open(filename, 'r', encoding='utf-8') as f:
- comments = read_comments(f)
-
with open(outfile, 'w', encoding='utf-8') as f:
f.write("# This file is automatically generated by "
"scripts/dev/recompile_requirements.py\n\n")