Compare commits

...

13 Commits
osx ... v0.6.1

Author SHA1 Message Date
Florian Bruhin
356eb7e5e7 Release v0.6.1 2016-04-10 21:13:33 +02:00
Florian Bruhin
bdd2afa1a2 Make sure the cheatsheet PNG is included in sdist
Fixes #1403
2016-04-10 21:01:41 +02:00
Florian Bruhin
e02ff26d0e Fix cheatsheet link URL in quickstart 2016-04-10 21:01:41 +02:00
Florian Bruhin
128fb2826a Add missing file 2016-04-10 20:35:07 +02:00
Florian Bruhin
3521ee16e4 Fix downloading of non-ascii files with LC_ALL=C
Fixes #908.
2016-04-10 20:35:07 +02:00
Florian Bruhin
af5cb36591 Rename test_cmdline_args to test_invocations 2016-04-10 20:35:07 +02:00
Florian Bruhin
8aaae5b78c Fix test_last_window_session_none 2016-04-10 18:23:10 +02:00
Florian Bruhin
ced87b163f Don't crash if data is None while saving session
Under some circumstances I can't reproduce (switching/turning off
monitors?) it seems it's possible that SessionManager.save gets called
with last_window=True, without on_last_window_closed being called.

This might be to one of the Qt screen management bugs fixed in Qt 5.6,
which would explain why I can't reproduce it.

Instead of crashing, let's log the error and not save the session.
2016-04-10 18:03:29 +02:00
Florian Bruhin
c5459abb65 Add some more logging for standarddir 2016-04-10 18:03:29 +02:00
Florian Bruhin
83b7c0dd6f Fix #1414 with a weird workaround 2016-04-10 18:03:29 +02:00
Florian Bruhin
93fff9a69c freeze: Add pkg_resources._vendor.six
Another package added by pkg_resources and not picked up by cx_Freeze...
2016-04-10 18:03:29 +02:00
Florian Bruhin
b2247fa406 tox: Update setuptools in cxfreeze-windows env
In 43a4a6a3e7 we added
pkg_resources._vendor.pyparsing to the frozen modules - however, older
setuptools (and thus pkg_resources) versions don't have that module yet,
so freezing would fail.
2016-04-10 18:03:29 +02:00
Florian Bruhin
fafba9af3f build_release: Don't call update_3rdparty.main
main tries to parse sys.argv which will fail when called from
build_release when e.g. --asciidoc is given.
2016-04-10 18:03:29 +02:00
15 changed files with 63 additions and 16 deletions

View File

@@ -14,6 +14,17 @@ This project adheres to http://semver.org/[Semantic Versioning].
// `Fixed` for any bug fixes.
// `Security` to invite users to upgrade in case of vulnerabilities.
v0.6.1
-----
Fixed
~~~~~~
- Fixed broken cheatsheet image which was missing from package
- Fixed occasional crash when switching/disconnecting monitors
- Fixed crash when downloading non-ascii files with a broken locale (`LC_ALL=C`)
- Added workaround for a Qt/PyQt bug which is too weird to describe here
v0.6.0
------

View File

@@ -1,8 +1,8 @@
recursive-include qutebrowser *.py
recursive-include qutebrowser/html *.html
recursive-include qutebrowser/img *.svg *.png
recursive-include qutebrowser/test *.py
recursive-include qutebrowser/javascript *.js
graft qutebrowser/html
graft qutebrowser/3rdparty
graft icons
graft doc/img

View File

@@ -8,7 +8,7 @@ time, use the `:help` command.
What to do now
--------------
* View the http://qutebrowser.org/img/cheatsheet-big.png[key binding cheatsheet]
* View the link:http://qutebrowser.org/img/cheatsheet-big.png[key binding cheatsheet]
to make yourself familiar with the key bindings: +
image:http://qutebrowser.org/img/cheatsheet-small.png["qutebrowser key binding cheatsheet",link="http://qutebrowser.org/img/cheatsheet-big.png"]
* Run `:adblock-update` to download adblock lists and activate adblocking.

View File

@@ -28,7 +28,7 @@ __copyright__ = "Copyright 2014-2016 Florian Bruhin (The Compiler)"
__license__ = "GPL"
__maintainer__ = __author__
__email__ = "mail@qutebrowser.org"
__version_info__ = (0, 6, 0)
__version_info__ = (0, 6, 1)
__version__ = '.'.join(str(e) for e in __version_info__)
__description__ = "A keyboard-driven, vim-like browser based on PyQt5 and QtWebKit."

View File

@@ -104,6 +104,11 @@ def create_full_filename(basename, filename):
Return:
The full absolute path, or None if filename creation was not possible.
"""
# Remove chars which can't be encoded in the filename encoding.
# See https://github.com/The-Compiler/qutebrowser/issues/427
encoding = sys.getfilesystemencoding()
filename = utils.force_encoding(filename, encoding)
basename = utils.force_encoding(basename, encoding)
if os.path.isabs(filename) and os.path.isdir(filename):
# We got an absolute directory from the user, so we save it under
# the default filename in that directory.
@@ -523,10 +528,6 @@ class DownloadItem(QObject):
"existing: {}, fileobj {}".format(
filename, self._filename, self.fileobj))
filename = os.path.expanduser(filename)
# Remove chars which can't be encoded in the filename encoding.
# See https://github.com/The-Compiler/qutebrowser/issues/427
encoding = sys.getfilesystemencoding()
filename = utils.force_encoding(filename, encoding)
self._filename = create_full_filename(self.basename, filename)
if self._filename is None:
# We only got a filename (without directory) or a relative path

View File

@@ -27,7 +27,7 @@ from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QTimer, QUrl
from PyQt5.QtGui import QPalette
from PyQt5.QtWidgets import QApplication, QStyleFactory
from PyQt5.QtWebKit import QWebSettings
from PyQt5.QtWebKitWidgets import QWebView, QWebPage
from PyQt5.QtWebKitWidgets import QWebView, QWebPage, QWebFrame
from qutebrowser.config import config
from qutebrowser.keyinput import modeman
@@ -352,9 +352,14 @@ class WebView(QWebView):
frame = self.page().mainFrame()
frame.javaScriptWindowObjectCleared.connect(self.add_js_bridge)
@pyqtSlot(QWebFrame)
def add_js_bridge(self):
"""Add the javascript bridge for qute:... pages."""
frame = self.sender()
if not isinstance(frame, QWebFrame):
log.webview.error("Got non-QWebFrame in add_js_bridge")
return
if frame.url().scheme() == 'qute':
bridge = objreg.get('js-bridge')
frame.addToJavaScriptWindowObject('qute', bridge)

View File

@@ -241,7 +241,9 @@ class SessionManager(QObject):
log.sessions.debug("Saving session {} to {}...".format(name, path))
if last_window:
data = self._last_window_session
assert data is not None
if data is None:
log.sessions.error("last_window_session is None while saving!")
return
else:
data = self._save_all()
log.sessions.vdebug("Saving data: {}".format(data))

View File

@@ -25,7 +25,7 @@ import os.path
from PyQt5.QtCore import QCoreApplication, QStandardPaths
from qutebrowser.utils import log, qtutils
from qutebrowser.utils import log, qtutils, debug
# The argparse namespace passed to init()
@@ -124,6 +124,8 @@ def _writable_location(typ):
"""Wrapper around QStandardPaths.writableLocation."""
with qtutils.unset_organization():
path = QStandardPaths.writableLocation(typ)
typ_str = debug.qenum_key(QStandardPaths, typ)
log.misc.debug("writable location for {}: {}".format(typ_str, path))
if not path:
raise ValueError("QStandardPaths returned an empty value!")
# Qt seems to use '/' as path separator even on Windows...

View File

@@ -91,7 +91,7 @@ def smoke_test(executable):
def build_windows():
"""Build windows executables/setups."""
utils.print_title("Updating 3rdparty content")
update_3rdparty.main()
update_3rdparty.update_pdfjs()
utils.print_title("Building Windows binaries")
parts = str(sys.version_info.major), str(sys.version_info.minor)

View File

@@ -87,7 +87,8 @@ def get_build_exe_options(skip_html=False):
'includes': [],
'excludes': ['tkinter'],
'packages': ['pygments', 'pkg_resources._vendor.packaging',
'pkg_resources._vendor.pyparsing'],
'pkg_resources._vendor.pyparsing',
'pkg_resources._vendor.six'],
}

Binary file not shown.

View File

@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
"""Test starting qutebrowser with various commandline arguments."""
"""Test starting qutebrowser with special arguments/environments."""
import pytest
@@ -51,3 +51,23 @@ def test_no_config(tmpdir, quteproc_new):
quteproc_new.start(args, env=env)
quteproc_new.send_cmd(':quit')
quteproc_new.wait_for_quit()
@pytest.mark.linux
def test_ascii_locale(httpbin, tmpdir, quteproc_new):
"""Test downloads with LC_ALL=C set.
https://github.com/The-Compiler/qutebrowser/issues/908
"""
args = ['--debug', '--no-err-windows', '--temp-basedir', 'about:blank']
quteproc_new.start(args, env={'LC_ALL': 'C'})
quteproc_new.set_setting('storage', 'download-directory', str(tmpdir))
quteproc_new.set_setting('storage', 'prompt-download-directory', 'false')
url = 'http://localhost:{port}/data/downloads/ä-issue908.bin'.format(
port=httpbin.port)
quteproc_new.send_cmd(':download {}'.format(url))
quteproc_new.send_cmd(':quit')
quteproc_new.wait_for_quit()
assert len(tmpdir.listdir()) == 1
assert (tmpdir / '?-issue908.bin').exists()

View File

@@ -321,7 +321,7 @@ class TestDefaultConfig:
If it did change, place a new qutebrowser-vx.y.z.conf in old_configs
and then increment the version.
"""
assert qutebrowser.__version__ == '0.6.0'
assert qutebrowser.__version__ == '0.6.1'
@pytest.mark.parametrize('filename',
os.listdir(os.path.join(os.path.dirname(__file__), 'old_configs')),

View File

@@ -447,10 +447,14 @@ class TestSave:
sess_man.save(str(session_path))
assert 'session' not in state_config['general']
def test_last_window_session_none(self, sess_man, tmpdir):
def test_last_window_session_none(self, caplog, sess_man, tmpdir):
session_path = tmpdir / 'foo.yml'
with pytest.raises(AssertionError):
with caplog.at_level(logging.ERROR):
sess_man.save(str(session_path), last_window=True)
assert len(caplog.records) == 1
msg = "last_window_session is None while saving!"
assert caplog.records[0].msg == msg
assert not session_path.exists()
def test_last_window_session(self, sess_man, tmpdir):

View File

@@ -215,6 +215,7 @@ deps =
-r{toxinidir}/requirements.txt
cx_Freeze==4.3.4
commands =
{envpython} -m pip install -U setuptools
{envpython} scripts/link_pyqt.py --tox {envdir}
{envpython} scripts/dev/freeze.py {posargs}