Commit Graph

7912 Commits

Author SHA1 Message Date
Florian Bruhin
3098d1fd8c tox: Hardcode more indirect deps for flake8 env
We added more flake8 checkers but never regenerated those, causing some
updates to happen silently and (probably?) breaking stuff.
2016-05-11 06:34:19 +02:00
Florian Bruhin
7a51387fb3 Move comment in tox.ini
On Travis CI, the flake8 env suddenly started to fail (pip upgrade?):

    Invalid requirement: 'pep257==0.7.0  # still needed by flake8-docstrings but ignored'
    Traceback (most recent call last):
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py", line 92, in __init__
        req = REQUIREMENT.parseString(requirement_string)
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1172, in parseString
        raise exc
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1162, in parseString
        loc, tokens = self._parse( instring, 0 )
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1028, in _parseNoCache
        loc,tokens = self.parseImpl( instring, preloc, doActions )
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 2462, in parseImpl
        loc, exprtokens = e._parse( instring, loc, doActions )
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1032, in _parseNoCache
        loc,tokens = self.parseImpl( instring, preloc, doActions )
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 2265, in parseImpl
        raise ParseException(instring, loc, self.errmsg, self)
    pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 15), (line:1, col:16)
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/req/req_install.py", line 78, in __init__
        req = Requirement(req)
      File "/home/travis/build/The-Compiler/qutebrowser/.tox/flake8/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
        requirement_string[e.loc:e.loc + 8]))
    pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'# still '"

I can't reproduce this locally, but I hope this'll help.
2016-05-11 06:08:48 +02:00
Florian Bruhin
ac41c0ba18 tox: Update CherryPy to 5.4.0
* ``cherrypy.test.webtest.WebCase`` now honors a
  'WEBTEST_INTERACTIVE' environment variable to disable
  interactive tests (still enabled by default). Set to '0'
  or 'false' or 'False' to disable interactive tests.
* Fix AttributeError when listiterator was accessed
  using the ``next`` attribute.
* Removed ``cherrypy.lib.sessions.PostgresqlSession``.
* Fix errors with redirects to Unicode URLs.
2016-05-11 05:16:51 +02:00
Florian Bruhin
181a785ce6 Update changelog
[ci skip]
2016-05-10 23:49:10 +02:00
Florian Bruhin
62d35db16a Merge branch 'rcorre-show_binding2' 2016-05-10 23:48:30 +02:00
Florian Bruhin
cb27dbbfb5 Fix error message check for :bind test 2016-05-10 23:47:16 +02:00
Florian Bruhin
ea243ae022 Renumber keybindings in keyinput.feature
An unique keybinding for each test means we have some level of
isolation and can understand error messages more easily.

As we're >10 now, let's use a leading zero to avoid shadowed
keybindings.
2016-05-10 23:46:02 +02:00
Florian Bruhin
90c42ff2e2 Regenerate docs 2016-05-10 23:39:48 +02:00
Florian Bruhin
24d16dd0a7 Merge branch 'show_binding2' of https://github.com/rcorre/qutebrowser into rcorre-show_binding2 2016-05-10 23:39:32 +02:00
Florian Bruhin
36da07c73b Fix lint 2016-05-10 07:56:54 +02:00
Florian Bruhin
5eff35ba30 cmdutils.register: annotation -> arg for flags
Instead of using a 'flag' key in the annotation dict, we now use a flags
argument to @cmdutils.register which is a {argument: flag} dict.

See #637.
2016-05-10 07:35:41 +02:00
Florian Bruhin
49fb981e7f Add test for completion count in cmdutils.register 2016-05-10 07:12:50 +02:00
Florian Bruhin
9ca5acd546 Add tests for flags with @cmdutils.register 2016-05-10 07:00:10 +02:00
Florian Bruhin
b17ecd1376 Add tests for cmdutils.register/star_args_optional 2016-05-10 06:41:42 +02:00
Florian Bruhin
73fbfb9731 Replace 'nargs' annotation by star_args_optional
Before we used a {'nargs': '*'} annotation for the respective argument
to tell qutebrowser it's optional for the commandline. Now we instead
use a star_args_optional argument for @cmdutils.register as a first step
towards freeing up argument annotations for PEP 484.

See #637.
2016-05-09 22:49:24 +02:00
Florian Bruhin
e4e98c6c23 Delete QTextDocument properly in completion.
The CompletionItemDelegate gets reused by Qt for various items in the
completion. Every time _get_textdoc() was called we created a new
QTextDocument, but since it has a long-living parent set (the delegate)
the old one was never actually garbage collected.

We now explicitly delete the old QTextDocument as it's not needed
anymore by either Qt or Python.

See #1476.
2016-05-09 09:11:14 +02:00
Florian Bruhin
56f1d885f9 Use parens instead of \ to continue line 2016-05-09 07:18:12 +02:00
Florian Bruhin
2c6826f9e0 Merge branch 'phansch-bdd_test_insert_mode' 2016-05-09 07:15:48 +02:00
Florian Bruhin
8f3dda6709 Regenerate authors 2016-05-09 07:15:19 +02:00
Florian Bruhin
a8845be9e6 Merge branch 'bdd_test_insert_mode' of https://github.com/phansch/qutebrowser into phansch-bdd_test_insert_mode 2016-05-09 07:15:10 +02:00
Florian Bruhin
e132c1cc1e Merge branch 'Kingdread-confirm-quit-downloads' 2016-05-09 07:07:59 +02:00
Florian Bruhin
7f99c36ec5 Update changelog 2016-05-09 07:07:46 +02:00
Florian Bruhin
f7dc9b54bd Add a test for #846 2016-05-09 07:06:58 +02:00
Daniel Schadt
1fa50021c1 downloads: use right index for beginInsertRows
len(self.downloads) is already the index of the item in the download
list, this should be used for beginInsertRows(). The +1 is only for the
human readable part.
2016-05-08 23:36:31 +02:00
Daniel Schadt
99182e3e79 downloads: change len() to sum() 2016-05-08 23:36:31 +02:00
Daniel Schadt
643d2cc6dd fix confirm-quit=downloads with finished downloads
Issue #846

.rowCount() returns all downloads, even the finished ones that have not
yet been removed from the list. For confirming the quit event, we should
only consider downloads that are still running.
2016-05-08 23:36:31 +02:00
Florian Bruhin
a23aa1cc47 Fix broken supports_selection() test 2016-05-08 22:39:39 +02:00
Florian Bruhin
89c7b0e7f8 Simplify if-statement 2016-05-08 22:18:14 +02:00
Florian Bruhin
165504c1f2 bdd: Fix clipboard_contains_multiline 2016-05-08 22:09:19 +02:00
Florian Bruhin
59ec5fa947 Show debug instead of warning for #670
The user can't do much about this anyways, and I have no idea what
triggers it, so let's not annoy them about it.
2016-05-08 22:08:08 +02:00
Florian Bruhin
b9b6f357da Add utils.supports_selection() 2016-05-08 22:06:59 +02:00
Florian Bruhin
3e6ac28c66 Fix ;Y on systems not supporting primary selection
Instead we paste clipboard like we already do with some other commands
when primary selection is not supported.

Fixes #1336
2016-05-08 21:59:25 +02:00
Florian Bruhin
4d9a98a11d Paste clipboard with :paste-primary on Windows 2016-05-08 21:18:57 +02:00
Florian Bruhin
ddc1f803c0 Clean up assertion 2016-05-08 20:01:35 +02:00
Florian Bruhin
f49cc4e901 Only keep contain tests 2016-05-08 19:57:59 +02:00
Florian Bruhin
65ed878dcf Update copyright 2016-05-08 19:57:18 +02:00
Florian Bruhin
fdb28e4c71 Add test_sortfilter from #950 2016-05-08 19:56:41 +02:00
Florian Bruhin
55f6ce1c95 Merge branch 'fix-link-pyqt' of https://github.com/Kingdread/qutebrowser into Kingdread-fix-link-pyqt 2016-05-08 19:12:26 +02:00
Florian Bruhin
f306ca9b53 Fix lint 2016-05-08 11:14:42 +02:00
Florian Bruhin
b4272975f2 Revert "Use lists instead of tuples"
This reverts commit eb5bfc1659.
2016-05-08 11:09:47 +02:00
Daniel Schadt
dcb2c7f868 link_pyqt: fix crash with spaces in pypath
This fixes a bug where link_pyqt crashes when the path to the python
interpreter contains a space.
2016-05-08 01:08:36 +02:00
Florian Bruhin
95fa78fce3 Merge branch 'jcorentin-test_adblock' 2016-05-07 23:45:53 +02:00
Florian Bruhin
4403f02ac5 Fix HostBlocker.on_config_changed with no datadir 2016-05-07 23:35:30 +02:00
Florian Bruhin
6d1764e732 Clear blocked hosts on start correctly 2016-05-07 23:31:35 +02:00
Florian Bruhin
b6add69705 Improve exception handling in HostBlocker
In on_config_changed, we now ignore FileNotFoundError as that's a common
occurence and not something worth logging.

In case of other OSError's we now also log the exact error message.
2016-05-07 23:30:32 +02:00
Florian Bruhin
f6544786c1 dict 2016-05-07 22:41:22 +02:00
Florian Bruhin
2d8bde62a5 docstring 2016-05-07 22:39:53 +02:00
Florian Bruhin
9e64e5eab4 Check CommandError exception value 2016-05-07 22:39:09 +02:00
Florian Bruhin
f4f329714d Reformat dicts 2016-05-07 22:38:37 +02:00
Florian Bruhin
1a03388fb5 Fix docstrings 2016-05-07 22:28:06 +02:00