From 4f1e0d32b00f3df494e8b8711da0ae931523c451 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 16 Jan 2015 07:10:12 +0100 Subject: [PATCH 01/24] Handle UnicodeDecodeError when reading configs. (WTF are you guys doing?!) --- qutebrowser/app.py | 2 +- qutebrowser/config/config.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index c03e34ec1..e1f3f87d7 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -131,7 +131,7 @@ class Application(QApplication): utils.actute_warning() try: self._init_modules() - except OSError as e: + except (OSError, UnicodeDecodeError) as e: msgbox = QMessageBox( QMessageBox.Critical, "Error while initializing!", "Error while initializing: {}".format(e)) diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 03a7564ce..b12c33dcf 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -123,7 +123,7 @@ def init(args): try: app = objreg.get('app') config_obj = ConfigManager(confdir, 'qutebrowser.conf', app) - except (configexc.Error, configparser.Error) as e: + except (configexc.Error, configparser.Error, UnicodeDecodeError) as e: log.init.exception(e) errstr = "Error while reading config:" try: @@ -141,7 +141,7 @@ def init(args): objreg.register('config', config_obj) try: key_config = keyconf.KeyConfigParser(confdir, 'keys.conf') - except keyconf.KeyConfigError as e: + except (keyconf.KeyConfigError, UnicodeDecodeError) as e: log.init.exception(e) errstr = "Error while reading key config:\n" if e.lineno is not None: From dbd0d1fff9854b457091202000fb6fb928b2bb72 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 16 Jan 2015 07:36:38 +0100 Subject: [PATCH 02/24] Save report dialog contact infomation. --- qutebrowser/misc/crashdialog.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/qutebrowser/misc/crashdialog.py b/qutebrowser/misc/crashdialog.py index d812e8f12..7ffc908ea 100644 --- a/qutebrowser/misc/crashdialog.py +++ b/qutebrowser/misc/crashdialog.py @@ -91,7 +91,16 @@ class _CrashDialog(QDialog): contact = QLabel("How can I contact you if I need more info?") self._vbox.addWidget(contact) self._contact = QTextEdit(tabChangesFocus=True, acceptRichText=False) - self._contact.setPlaceholderText("Github username, mail or IRC") + try: + state = objreg.get('state-config') + try: + self._contact.setPlainText(state['general']['contact-info']) + except KeyError: + self._contact.setPlaceholderText("Github username, mail or " + "IRC") + except Exception: + log.misc.exception("Failed to get contact information!") + self._contact.setPlaceholderText("Github username, mail or IRC") self._vbox.addWidget(self._contact, 2) self._vbox.addSpacing(15) @@ -229,6 +238,11 @@ class _CrashDialog(QDialog): @pyqtSlot() def finish(self): """Accept/reject the dialog when reporting is done.""" + try: + state = objreg.get('state-config') + state['general']['contact-info'] = self._contact.toPlainText() + except Exception: + log.misc.exception("Failed to save contact information!") if self._resolution: self.accept() else: From ddc4e7b309c4c17ae4cccd31459276e55d1c86c8 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 18 Jan 2015 00:05:08 +0100 Subject: [PATCH 03/24] Unset __PYVENV_LAUNCHER__ to fix init_venv on OS X. For some weird reason, pip installed logilab.common into /usr/local when launching it via subprocess, because __PYVENV_LAUNCHER__ was set... --- scripts/init_venv.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/init_venv.py b/scripts/init_venv.py index ea0ef2861..1b89652f9 100644 --- a/scripts/init_venv.py +++ b/scripts/init_venv.py @@ -91,11 +91,15 @@ def venv_python(*args, output=False): """Call the virtualenv's python with the given arguments.""" subdir = 'Scripts' if os.name == 'nt' else 'bin' executable = os.path.join(g_path, subdir, os.path.basename(sys.executable)) + env = dict(os.environ) + if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in env: + # WORKAROUND for https://github.com/pypa/pip/issues/2031 + del env['__PYVENV_LAUNCHER__'] if output: return subprocess.check_output([executable] + list(args), - universal_newlines=True) + universal_newlines=True, env=env) else: - subprocess.check_call([executable] + list(args)) + subprocess.check_call([executable] + list(args), env=env) def test_toolchain(): From d0f416386a0ba9c562c0af1b3c0c53d15062d0e5 Mon Sep 17 00:00:00 2001 From: Eivind Uggedal Date: Sun, 18 Jan 2015 22:32:50 +0000 Subject: [PATCH 04/24] INSTALL: instructions for Void Linux --- doc/INSTALL.asciidoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/INSTALL.asciidoc b/doc/INSTALL.asciidoc index c39714ddd..f75b09e26 100644 --- a/doc/INSTALL.asciidoc +++ b/doc/INSTALL.asciidoc @@ -80,6 +80,16 @@ in your `PYTHON_TARGETS` (`/etc/portage/make.conf`) and rebuild your system # emerge -av qutebrowser ---- +On Void Linux +------------- + +qutebrowser is available in the official repositories and can be installed +with: + +---- +# xbps-install qutebrowser +---- + On Windows ---------- From 380537d49c1ce04d184ab424a893559e6b0a6d5b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Jan 2015 00:42:39 +0100 Subject: [PATCH 05/24] run_checks: Run pep257 via subprocess. --- scripts/run_checks.py | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index a577468c4..d7181c22e 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -99,27 +99,6 @@ def run(name, target=None): return status -def check_pep257(target): - """Run pep257 checker with args passed.""" - # pylint: disable=assignment-from-no-return,no-member - args = _get_args('pep257') - sys.argv = ['pep257', target] - if args is not None: - sys.argv += args - try: - if hasattr(pep257, 'run_pep257'): - # newer pep257 versions - status = pep257.run_pep257() - else: - # older pep257 versions - status = pep257.main(*pep257.parse_options()) - print() - return status - except Exception: - traceback.print_exc() - return None - - def check_unittest(): """Run the unittest checker.""" suite = unittest.TestLoader().discover('.') @@ -248,7 +227,7 @@ def _get_checkers(): # "Dynamic" checkers which exist once for each target. for target in config.get('DEFAULT', 'targets').split(','): checkers[target] = collections.OrderedDict([ - ('pep257', functools.partial(check_pep257, target)), + ('pep257', functools.partial(run, 'pep257', target)), ('flake8', functools.partial(run, 'flake8', target)), ('vcs', functools.partial(check_vcs_conflict, target)), ('pylint', functools.partial(run, 'pylint', target)), From 1e8729eac7a6496e7b7039aa8d0d1eb9f129b87e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Jan 2015 00:45:01 +0100 Subject: [PATCH 06/24] run_checks: Add a --print-version argument. --- scripts/run_checks.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index d7181c22e..e65bb44a5 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -78,18 +78,21 @@ def _adjusted_pythonpath(name): del os.environ['PYTHONPATH'] -def run(name, target=None): +def run(name, target=None, print_version=False): """Run a checker via distutils with optional args. Arguments: name: Name of the checker/binary target: The package to check + print_version: Whether to print the checker version. """ # pylint: disable=too-many-branches args = _get_args(name) if target is not None: args.append(target) with _adjusted_pythonpath(name): + if print_version: + subprocess.call([name, '--version']) try: status = subprocess.call([name] + args) except OSError: @@ -211,7 +214,7 @@ def _get_args(checker): return args -def _get_checkers(): +def _get_checkers(args): """Get a dict of checkers we need to execute.""" # "Static" checkers checkers = collections.OrderedDict([ @@ -220,17 +223,18 @@ def _get_checkers(): ('git', check_git), ])), ('setup', collections.OrderedDict([ - ('pyroma', functools.partial(run, 'pyroma')), - ('check-manifest', functools.partial(run, 'check-manifest')), + ('pyroma', functools.partial(run, 'pyroma', args.version)), + ('check-manifest', functools.partial(run, 'check-manifest', + args.version)), ])), ]) # "Dynamic" checkers which exist once for each target. for target in config.get('DEFAULT', 'targets').split(','): checkers[target] = collections.OrderedDict([ - ('pep257', functools.partial(run, 'pep257', target)), - ('flake8', functools.partial(run, 'flake8', target)), + ('pep257', functools.partial(run, 'pep257', target, args.version)), + ('flake8', functools.partial(run, 'flake8', target, args.version)), ('vcs', functools.partial(check_vcs_conflict, target)), - ('pylint', functools.partial(run, 'pylint', target)), + ('pylint', functools.partial(run, 'pylint', target, args.version)), ]) return checkers @@ -254,6 +258,8 @@ def _parse_args(): parser.add_argument('-q', '--quiet', help="Don't print unnecessary headers.", action='store_true') + parser.add_argument('-V', '--version', + help="Print checker versions.", action='store_true') parser.add_argument('checkers', help="Checkers to run (or 'all')", default='all', nargs='?') return parser.parse_args() @@ -269,7 +275,7 @@ def main(): exit_status_bool = {} args = _parse_args() - checkers = _get_checkers() + checkers = _get_checkers(args) groups = ['global'] groups += config.get('DEFAULT', 'targets').split(',') From dc9263a77ce3892f944b2ea08dc79e8e2f44d895 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Jan 2015 00:50:18 +0100 Subject: [PATCH 07/24] Revert "run_checks: Run pep257 via subprocess." This reverts commit 380537d49c1ce04d184ab424a893559e6b0a6d5b. Conflicts: scripts/run_checks.py This is needed because it seems pep257 doesn't install a binary on Windows. --- scripts/run_checks.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index e65bb44a5..1fb7f9d04 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -102,6 +102,27 @@ def run(name, target=None, print_version=False): return status +def check_pep257(target): + """Run pep257 checker with args passed.""" + # pylint: disable=assignment-from-no-return,no-member + args = _get_args('pep257') + sys.argv = ['pep257', target] + if args is not None: + sys.argv += args + try: + if hasattr(pep257, 'run_pep257'): + # newer pep257 versions + status = pep257.run_pep257() + else: + # older pep257 versions + status = pep257.main(*pep257.parse_options()) + print() + return status + except Exception: + traceback.print_exc() + return None + + def check_unittest(): """Run the unittest checker.""" suite = unittest.TestLoader().discover('.') @@ -231,7 +252,7 @@ def _get_checkers(args): # "Dynamic" checkers which exist once for each target. for target in config.get('DEFAULT', 'targets').split(','): checkers[target] = collections.OrderedDict([ - ('pep257', functools.partial(run, 'pep257', target, args.version)), + ('pep257', functools.partial(check_pep257, target)), ('flake8', functools.partial(run, 'flake8', target, args.version)), ('vcs', functools.partial(check_vcs_conflict, target)), ('pylint', functools.partial(run, 'pylint', target, args.version)), From aa6750ac1b9202fc521cb31083e04ef0ea20888e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Jan 2015 00:51:33 +0100 Subject: [PATCH 08/24] run_checks: Add a comment for check_pep257. --- scripts/run_checks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index 1fb7f9d04..9c3e3f99e 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -103,7 +103,11 @@ def run(name, target=None, print_version=False): def check_pep257(target): - """Run pep257 checker with args passed.""" + """Run pep257 checker with args passed. + + We use this rather than run() because on some systems (e.g. Windows) no + pep257 binary is available. + """ # pylint: disable=assignment-from-no-return,no-member args = _get_args('pep257') sys.argv = ['pep257', target] From 18443a6880f0ba140fe45845f34c274103062f3a Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Jan 2015 00:53:05 +0100 Subject: [PATCH 09/24] run_checks: Support print_version for check_pep257. --- scripts/run_checks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index 9c3e3f99e..d84b598dc 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -102,13 +102,15 @@ def run(name, target=None, print_version=False): return status -def check_pep257(target): +def check_pep257(target, print_version=False): """Run pep257 checker with args passed. We use this rather than run() because on some systems (e.g. Windows) no pep257 binary is available. """ # pylint: disable=assignment-from-no-return,no-member + if print_version: + print(pep257.__version__) args = _get_args('pep257') sys.argv = ['pep257', target] if args is not None: @@ -256,7 +258,7 @@ def _get_checkers(args): # "Dynamic" checkers which exist once for each target. for target in config.get('DEFAULT', 'targets').split(','): checkers[target] = collections.OrderedDict([ - ('pep257', functools.partial(check_pep257, target)), + ('pep257', functools.partial(check_pep257, target, args.version)), ('flake8', functools.partial(run, 'flake8', target, args.version)), ('vcs', functools.partial(check_vcs_conflict, target)), ('pylint', functools.partial(run, 'pylint', target, args.version)), From c30978be2f9022b8a0db7ee1e0709a196426846a Mon Sep 17 00:00:00 2001 From: Peter Vilim Date: Mon, 19 Jan 2015 13:17:17 -0600 Subject: [PATCH 10/24] Add quotes for empty default value --- qutebrowser/completion/models/completion.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qutebrowser/completion/models/completion.py b/qutebrowser/completion/models/completion.py index e2940de92..09263970a 100644 --- a/qutebrowser/completion/models/completion.py +++ b/qutebrowser/completion/models/completion.py @@ -116,8 +116,10 @@ class SettingValueCompletionModel(base.BaseCompletionModel): value = '""' self.cur_item, _descitem, _miscitem = self.new_item(cur_cat, value, "Current value") - self.new_item(cur_cat, configdata.DATA[section][option].default(), - "Default value") + default_value = configdata.DATA[section][option].default() + if not default_value: + default_value = '""' + self.new_item(cur_cat, default_value, "Default value") if hasattr(configdata.DATA[section], 'valtype'): # Same type for all values (ValueList) vals = configdata.DATA[section].valtype.complete() From 6a7e454789b8b47ad58b8261b32a69f9f0bc592c Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 19 Jan 2015 23:50:01 +0100 Subject: [PATCH 11/24] Add proper virtualenv support to run_checks.py --- scripts/run_checks.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index d84b598dc..0e0b97bb7 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -91,10 +91,15 @@ def run(name, target=None, print_version=False): if target is not None: args.append(target) with _adjusted_pythonpath(name): + # for virtualenvs + executable = os.path.join(os.path.dirname(sys.executable), name) + if not os.path.exists(executable): + # in $PATH + executable = name if print_version: - subprocess.call([name, '--version']) + subprocess.call([executable, '--version']) try: - status = subprocess.call([name] + args) + status = subprocess.call([executable] + args) except OSError: traceback.print_exc() status = None From f4479a81405ad19f2f2ada4f91045356ce3f7c73 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 00:02:16 +0100 Subject: [PATCH 12/24] Fix adding epilogue in src2asciidoc.py. --- scripts/src2asciidoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/src2asciidoc.py b/scripts/src2asciidoc.py index 8f9b0eaf5..a459ad8ff 100755 --- a/scripts/src2asciidoc.py +++ b/scripts/src2asciidoc.py @@ -389,7 +389,7 @@ def regenerate_manpage(filename): options = '\n'.join(groups) # epilog if parser.epilog is not None: - options.append(parser.epilog) + options += parser.epilog _format_block(filename, 'options', options) From 532ec30d00ddc0a1da31e3fecb542efcb04a781b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 22:56:25 +0100 Subject: [PATCH 13/24] Fix executing of virtualenv pylint on Windows. 6a7e454789b8b47ad58b8261b32a69f9f0bc592c broke executing pylint on Windows, because there was a pylint Python script in vev\Scripts, and subprocess tried to execute that instead of the .exe. --- scripts/run_checks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index 0e0b97bb7..d648f1abd 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -91,8 +91,12 @@ def run(name, target=None, print_version=False): if target is not None: args.append(target) with _adjusted_pythonpath(name): + if os.name == 'nt': + exename = name + '.exe' + else: + exename = name # for virtualenvs - executable = os.path.join(os.path.dirname(sys.executable), name) + executable = os.path.join(os.path.dirname(sys.executable), exename) if not os.path.exists(executable): # in $PATH executable = name From 2e45c2c0631513722eea5c9a7a44be52982381b3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 00:02:35 +0100 Subject: [PATCH 14/24] Stop pinning pylint/astroid to 1.3.1/1.2.1. --- .pylintrc | 4 +++- scripts/init_venv.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index 8cb7a35fd..8498bea12 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,6 +2,7 @@ [MASTER] ignore=ez_setup.py +extension-pkg-whitelist=PyQt5,sip [MESSAGES CONTROL] disable=no-self-use, @@ -23,7 +24,8 @@ disable=no-self-use, too-many-instance-attributes, unnecessary-lambda, blacklisted-name, - too-many-lines + too-many-lines, + logging-format-interpolation [BASIC] module-rgx=(__)?[a-z][a-z0-9_]*(__)?$ diff --git a/scripts/init_venv.py b/scripts/init_venv.py index 1b89652f9..49e548933 100644 --- a/scripts/init_venv.py +++ b/scripts/init_venv.py @@ -70,8 +70,8 @@ def get_dev_packages(short=False): Args: short: Remove the version specification. """ - packages = ['colorlog', 'flake8', 'astroid==1.2.1', 'pylint==1.3.1', - 'pep257', 'colorama', 'beautifulsoup4'] + packages = ['colorlog', 'flake8', 'astroid', 'pylint', 'pep257', + 'colorama', 'beautifulsoup4'] if short: packages = [re.split(r'[<>=]', p)[0] for p in packages] return packages From 958e67ab9ea753a40569d537059abd42df8fdb7d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 00:03:13 +0100 Subject: [PATCH 15/24] Add workaround for pylint performance bug. See https://bitbucket.org/logilab/pylint/issue/395/horrible-performance-related-to-inspect --- .run_checks | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.run_checks b/.run_checks index 070f920f1..808d5882f 100644 --- a/.run_checks +++ b/.run_checks @@ -13,7 +13,8 @@ exclude=test_.* [pylint] args=--output-format=colorized,--reports=no,--rcfile=.pylintrc plugins=config,crlf,modeline,settrace,openencoding -exclude=resources.py +# excluding command.py is a WORKAROUND for https://bitbucket.org/logilab/pylint/issue/395/horrible-performance-related-to-inspect +exclude=resources.py,command.py [flake8] args=--config=.flake8 From 6d3f871119a3907cad93537425a986cf4d105cf6 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 00:04:59 +0100 Subject: [PATCH 16/24] Add workaround for unknown pylint no-member bug. --- qutebrowser/test/config/test_config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qutebrowser/test/config/test_config.py b/qutebrowser/test/config/test_config.py index 7555df655..e27c49063 100644 --- a/qutebrowser/test/config/test_config.py +++ b/qutebrowser/test/config/test_config.py @@ -58,6 +58,9 @@ class ConfigParserTests(unittest.TestCase): def test_transformed_option_old(self): """Test a transformed option with the old name.""" + # WORKAROUND for unknown PyQt bug + # Instance of 'str' has no 'name' member + # pylint: disable=no-member self.cp.read_dict({'colors': {'tab.fg.odd': 'pink'}}) self.cfg._from_cp(self.cp) self.assertEqual(self.cfg.get('colors', 'tabs.fg.odd').name(), @@ -65,6 +68,9 @@ class ConfigParserTests(unittest.TestCase): def test_transformed_option_new(self): """Test a transformed section with the new name.""" + # WORKAROUND for unknown PyQt bug + # Instance of 'str' has no 'name' member + # pylint: disable=no-member self.cp.read_dict({'colors': {'tabs.fg.odd': 'pink'}}) self.cfg._from_cp(self.cp) self.assertEqual(self.cfg.get('colors', 'tabs.fg.odd').name(), From 4f20d6123c29088fdebd672cc907565cb7c1c568 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 21 Jan 2015 07:14:48 +0100 Subject: [PATCH 17/24] Update AUTHORS --- README.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.asciidoc b/README.asciidoc index 3cca31379..d6a01f1b7 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -130,8 +130,8 @@ Contributors, sorted by the number of commits in descending order: // QUTE_AUTHORS_START * Florian Bruhin * Claude -* John ShaggyTwoDope Jenkins * Peter Vilim +* John ShaggyTwoDope Jenkins * rikn00 * Martin Zimmermann * Joel Torstensson From 8da4e2b6f44ad68f65c8a155e30750bbe43c4422 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 21 Jan 2015 07:16:29 +0100 Subject: [PATCH 18/24] Update AUTHORS --- README.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/README.asciidoc b/README.asciidoc index d6a01f1b7..63dfbc965 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -145,6 +145,7 @@ Contributors, sorted by the number of commits in descending order: * Matthias Lisin * Helen Sherwood-Taylor * HalosGhost +* Eivind Uggedal * Andreas Fischer // QUTE_AUTHORS_END From 50557a9b3ee13915c5d080d2685c91f8f63eb088 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 22 Jan 2015 06:54:50 +0100 Subject: [PATCH 19/24] crashdialog: Remove Github from contact types. See #447. --- qutebrowser/misc/crashdialog.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qutebrowser/misc/crashdialog.py b/qutebrowser/misc/crashdialog.py index 7ffc908ea..4e2420292 100644 --- a/qutebrowser/misc/crashdialog.py +++ b/qutebrowser/misc/crashdialog.py @@ -96,11 +96,10 @@ class _CrashDialog(QDialog): try: self._contact.setPlainText(state['general']['contact-info']) except KeyError: - self._contact.setPlaceholderText("Github username, mail or " - "IRC") + self._contact.setPlaceholderText("Mail or IRC nickname") except Exception: log.misc.exception("Failed to get contact information!") - self._contact.setPlaceholderText("Github username, mail or IRC") + self._contact.setPlaceholderText("Mail or IRC nickname") self._vbox.addWidget(self._contact, 2) self._vbox.addSpacing(15) From aa3017dd58765ce7cb528a12d4a44c00a4418711 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 22 Jan 2015 06:56:41 +0100 Subject: [PATCH 20/24] crashdialog: Reword contact info text. See #447. --- qutebrowser/misc/crashdialog.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qutebrowser/misc/crashdialog.py b/qutebrowser/misc/crashdialog.py index 4e2420292..db6f88b43 100644 --- a/qutebrowser/misc/crashdialog.py +++ b/qutebrowser/misc/crashdialog.py @@ -88,7 +88,9 @@ class _CrashDialog(QDialog): "- Switched tabs\n" "- etc...") self._vbox.addWidget(self._info, 5) - contact = QLabel("How can I contact you if I need more info?") + contact = QLabel("I'd like to be able to follow up with you, to keep " + "you posted on the status of this crash and get more " + "information if I need it - how can I contact you?") self._vbox.addWidget(contact) self._contact = QTextEdit(tabChangesFocus=True, acceptRichText=False) try: From 3b6a504d7bbb24f3f358d8b997b66f10951a39f9 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 22 Jan 2015 06:58:37 +0100 Subject: [PATCH 21/24] crashdialog: Move contact info to top. See #447. --- qutebrowser/misc/crashdialog.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/qutebrowser/misc/crashdialog.py b/qutebrowser/misc/crashdialog.py index db6f88b43..47091a876 100644 --- a/qutebrowser/misc/crashdialog.py +++ b/qutebrowser/misc/crashdialog.py @@ -81,13 +81,6 @@ class _CrashDialog(QDialog): self._paste_client = pastebin.PastebinClient(self) self._init_text() - info = QLabel("What were you doing when this crash/bug happened?") - self._vbox.addWidget(info) - self._info = QTextEdit(tabChangesFocus=True, acceptRichText=False) - self._info.setPlaceholderText("- Opened http://www.example.com/\n" - "- Switched tabs\n" - "- etc...") - self._vbox.addWidget(self._info, 5) contact = QLabel("I'd like to be able to follow up with you, to keep " "you posted on the status of this crash and get more " "information if I need it - how can I contact you?") @@ -104,6 +97,14 @@ class _CrashDialog(QDialog): self._contact.setPlaceholderText("Mail or IRC nickname") self._vbox.addWidget(self._contact, 2) + info = QLabel("What were you doing when this crash/bug happened?") + self._vbox.addWidget(info) + self._info = QTextEdit(tabChangesFocus=True, acceptRichText=False) + self._info.setPlaceholderText("- Opened http://www.example.com/\n" + "- Switched tabs\n" + "- etc...") + self._vbox.addWidget(self._info, 5) + self._vbox.addSpacing(15) self._debug_log = QTextEdit(tabChangesFocus=True, acceptRichText=False, lineWrapMode=QTextEdit.NoWrap) From 5d5e26eb7b79506cbe713f5843c8e3b0d5042c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Wi=C3=9Fmann?= Date: Sat, 10 Jan 2015 13:23:56 +1100 Subject: [PATCH 22/24] Fix some check_libraries() for arch By now, the python-jinja and python-pygments packages are available in community. --- qutebrowser/misc/earlyinit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/misc/earlyinit.py b/qutebrowser/misc/earlyinit.py index f22637871..eda1e3fee 100644 --- a/qutebrowser/misc/earlyinit.py +++ b/qutebrowser/misc/earlyinit.py @@ -234,14 +234,14 @@ def check_libraries(): 'jinja2': _missing_str("jinja2", debian="apt-get install python3-jinja2", - arch="Install python-jinja from the AUR", + arch="Install python-jinja from community", windows="Install from http://www.lfd.uci.edu/" "~gohlke/pythonlibs/#jinja2 or via pip.", pip="jinja2"), 'pygments': _missing_str("pygments", debian="apt-get install python3-pygments", - arch="Install python-jinja from the AUR", + arch="Install python-pygments from community", windows="Install from http://www.lfd.uci.edu/" "~gohlke/pythonlibs/#pygments or via pip.", pip="pygments"), From 011cd08fc8a22fd09764093edf582c474e3f3817 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 22 Jan 2015 07:01:46 +0100 Subject: [PATCH 23/24] Update AUTHORS --- README.asciidoc | 1 + 1 file changed, 1 insertion(+) diff --git a/README.asciidoc b/README.asciidoc index 63dfbc965..8bfee7fbb 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -141,6 +141,7 @@ Contributors, sorted by the number of commits in descending order: * Regina Hug * Mathias Fussenegger * Larry Hynes +* Thorsten Wißmann * Thiago Barroso Perrotta * Matthias Lisin * Helen Sherwood-Taylor From 5c92144f6bdac5f2b64f2445024e012e6a6c6c25 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 22 Jan 2015 07:10:32 +0100 Subject: [PATCH 24/24] Fix spawn --userscript with multiple args. This is a regression introduced in 4485e4ee1bad6aa2b983aa7616a6f67576c74c27. We didn't unpack the argument list properly before passing it to run_userscripts. Fixes #476. See #448. --- qutebrowser/browser/commands.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 9fb88f599..9e7b50f86 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -813,10 +813,9 @@ class CommandDispatcher: log.procs.debug("Executing: {}, userscript={}".format( args, userscript)) if userscript: - if len(args) > 1: - self.run_userscript(args[0], args[1:]) - else: - self.run_userscript(args[0]) + cmd = args[0] + args = [] if not args else args[1:] + self.run_userscript(cmd, *args) else: try: subprocess.Popen(args)