Commit Graph

8978 Commits

Author SHA1 Message Date
Florian Bruhin
1564563662 Don't enable warnings if log was never inited
Otherwise, anything importing qtutils (which uses ignore_py_warnings
on module level) would enable warnings. This means pylint showed its own
warnings because of qute_pylint.config.
2016-07-25 13:03:58 +02:00
Florian Bruhin
c3f53312af Fix 'is not' string comparison 2016-07-23 19:51:13 +02:00
Florian Bruhin
e887d9a381 Remove useless super-calls 2016-07-23 18:39:27 +02:00
Marshall Lochbaum
3ffb726b98 Merge branch 'master' into mark-del-no-args 2016-07-23 12:12:19 -04:00
Marshall Lochbaum
f52c7f13d3 Update numbers in urlmarks test 2016-07-23 12:05:26 -04:00
Marshall Lochbaum
9eeda62adf Use quickmark-add rather than quickmark-save in test 2016-07-23 12:05:26 -04:00
Marshall Lochbaum
1781d0fba3 Use DoesNotExistError rather than CommandError in get_by_qurl 2016-07-23 12:05:21 -04:00
Marshall Lochbaum
9758b52d91 Assume _current_url is valid (remove try/except) 2016-07-23 12:05:21 -04:00
Marshall Lochbaum
02731743c0 Use qtutils.ensure_valid instead of testing isValid in get_by_qurl 2016-07-23 12:05:11 -04:00
Florian Bruhin
04fdce9058 Close file stream in qute_pylint.modeline 2016-07-23 17:00:05 +02:00
Marshall Lochbaum
cba25d2bbb Remove quickmark_del and bookmark_del from the urlmark classes (use delete instead) 2016-07-23 10:55:57 -04:00
Florian Bruhin
3d4a01ef4c Merge branch 'winged-issue_1033_bookmark_display' 2016-07-23 15:48:41 +02:00
Florian Bruhin
19077c8b47 Update docs 2016-07-23 15:47:31 +02:00
Florian Bruhin
91b754d6ea Merge branch 'issue_1033_bookmark_display' of https://github.com/winged/qutebrowser into winged-issue_1033_bookmark_display 2016-07-23 15:42:33 +02:00
David Vogt
1f320b8686 Various fixes after code review.
* Move documentation changes of bookmark / quickmarks to docstrings, as the
  asciidoc is autogenerated from those
* Fix some whitespaces in the BDD test cases
* Improved docstring in qute_bookmarks handler
2016-07-23 14:50:28 +02:00
Florian Bruhin
02a06732ff Also ignore ImportWarning for pkg_resources import 2016-07-23 14:15:39 +02:00
Florian Bruhin
78fd614237 Merge branch 'ganwell-issue_1670_tests_fail_due_to_SSL_error' 2016-07-23 14:03:08 +02:00
David Vogt
11bf5c8809 Minor cleanups. Whitespace / indentation CSS.
There were some CSS classes that were not used in the bookmarks page.
Also, fixes a small indentation / code alignment issue
2016-07-23 13:06:56 +02:00
Florian Bruhin
d1cc542835 Update authors 2016-07-23 13:05:55 +02:00
Florian Bruhin
40a3e24b05 Ignore warning when importing pkg_resources
On Debian Jessie we get a PendingDeprecationWarning which we now see
since the log is init'ed earlier.
2016-07-23 13:04:53 +02:00
Florian Bruhin
64f208486e Add log.ignore_py_warnings() 2016-07-23 13:04:45 +02:00
Florian Bruhin
36bb5cf285 Merge branch 'issue_1670_tests_fail_due_to_SSL_error' of https://github.com/ganwell/qutebrowser into ganwell-issue_1670_tests_fail_due_to_SSL_error 2016-07-23 12:46:16 +02:00
David Vogt
8bbfcc01be Sort bookmarks / quickmarks by title or name respectively. 2016-07-23 12:32:05 +02:00
David Vogt
12e7b4f244 Extend command documentation regarding bookmarks page
Add links to the qute:bookmarks page in the documentation for `:bookmark-add`
and `:quickmark-add` commands.
2016-07-23 12:27:31 +02:00
David Vogt
85be6565fc Implement feature request #1033: Bookmark display
There is a new page now, qute:bookmarks that will display all bookmarks and
quickmarks. It's still missing a search / filter feature, but you can use
the built-in search / navigation just as easily for now.
2016-07-23 12:09:49 +02:00
Jean-Louis Fuchs
f040fd5a6d Ignore missing SSLv3 messages from Qt 2016-07-23 10:01:56 +00:00
Jean-Louis Fuchs
ef01566621 Initialize qt logging to qutebrowser as early as possible 2016-07-23 09:54:13 +00:00
Florian Bruhin
76eab7617b Remove @pyqtSlot for functions and non-QObjects
Fixes #1669
2016-07-23 11:42:50 +02:00
Marshall Lochbaum
e9660ad676 Fix incorrect number in test 2016-07-21 22:45:36 -04:00
Marshall Lochbaum
ff682606ab Add tests for bookmark-del and quickmark-del with no arguments 2016-07-21 22:34:10 -04:00
Marshall Lochbaum
19949101c6 Make quickmark_del with no argument delete the current page's mark (fixes #1661) 2016-07-21 22:32:04 -04:00
Marshall Lochbaum
83005bc072 Make bookmark_del with no argument delete the current page's mark 2016-07-21 21:14:54 -04:00
Florian Bruhin
63e466f019 Remove @pyqtSlot for some non-QObject classes
Not sure if I got all, but at least I got the ones which fail
immediately on start.

See #1669.
2016-07-21 14:56:12 +02:00
Florian Bruhin
ac2553794c flake8: Ignore all dotfiles 2016-07-21 14:55:50 +02:00
Florian Bruhin
aabee4828e Merge branch 'rcorre-cut_test_clutter' 2016-07-20 16:19:49 +02:00
Florian Bruhin
a1c4e6e2cf Rename shadowed tmpdir variable 2016-07-20 16:13:46 +02:00
Florian Bruhin
5f2dc53d94 tox: Set distshare = {toxworkdir}
This is kind uf unorthodox and the "distshare" setting seems to be
deprecated, but we don't get a ~/.tox this way.

See #1637
2016-07-20 16:02:14 +02:00
Florian Bruhin
c4fb43df58 pylint: Set persistent=n
See #1637
2016-07-20 15:51:57 +02:00
Florian Bruhin
c7eec246d3 Merge branch 'cut_test_clutter' of https://github.com/rcorre/qutebrowser into rcorre-cut_test_clutter 2016-07-20 15:28:58 +02:00
Florian Bruhin
bf06f4a4d7 tests: Use dedicated logger for message mock
The message mock might handle a message during pytest-qt's processEvents
during test setup. If that happens, depending on the fixture order,
pytest-caplog might not be set up first, which is why the
self._caplog.at_level call can fail:

  File "c:\projects\qutebrowser\qutebrowser\misc\guiprocess.py", line 105, in on_finished
    immediately=True)
  File "C:\projects\qutebrowser\tests\helpers\messagemock.py", line 71, in _handle_error
    self._handle(Level.error, *args, **kwargs)
  File "C:\projects\qutebrowser\tests\helpers\messagemock.py", line 65, in _handle
    with self._caplog.at_level(log_level):  # needed so we don't fail
  File "C:\projects\qutebrowser\.tox\py34\lib\site-packages\pytest_catchlog.py", line 232, in at_level
    obj = logger and logging.getLogger(logger) or self.handler
  File "C:\projects\qutebrowser\.tox\py34\lib\site-packages\pytest_catchlog.py", line 186, in handler
    return self._item.catch_log_handler
  AttributeError: 'Function' object has no attribute 'catch_log_handler'

Full stack:

    c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytestqt\plugin.py(100)pytest_runtest_setup()
  -> _process_events()
    c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytestqt\plugin.py(140)_process_events()
  -> app.processEvents()
    c:\projects\qutebrowser-git\qutebrowser\misc\guiprocess.py(94)on_error()
  -> self._what, msg), immediately=True)
    c:\projects\qutebrowser-git\tests\helpers\messagemock.py(71)_handle_error()
  -> self._handle(Level.error, *args, **kwargs)
    c:\projects\qutebrowser-git\tests\helpers\messagemock.py(65)_handle()
  -> with self._caplog.at_level(log_level):  # needed so we don't fail
    c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytest_catchlog.py(235)at_level()
  -> obj = logger and logging.getLogger(logger) or self.handler
  > c:\projects\qutebrowser-git\.tox\py34\lib\site-packages\pytest_catchlog.py(189)handler()->None

This should fix broken AppVeyor builds.

Fixes #1662.
2016-07-20 14:23:09 +02:00
Florian Bruhin
811361dbbe test requirements: Update beautifulsoup4 to 4.5.0
* Beautiful Soup is no longer compatible with Python 2.6. This
  actually happened a few releases ago, but it's now official.

* Beautiful Soup will now work with versions of html5lib greater than
  0.99999999.

* If a search against each individual value of a multi-valued
  attribute fails, the search will be run one final time against the
  complete attribute value considered as a single string. That is, if
  a tag has class="foo bar" and neither "foo" nor "bar" matches, but
  "foo bar" does, the tag is now considered a match.

  This happened in previous versions, but only when the value being
  searched for was a string. Now it also works when that value is
  a regular expression, a list of strings, etc.

* Fixed a bug that deranged the tree when a whitespace element was
  reparented into a tag that contained an identical whitespace
  element.

* Added support for CSS selector values that contain quoted spaces,
  such as tag[style="display: foo"].

* Corrected handling of XML processing instructions.

* Corrected an encoding error that happened when a BeautifulSoup
  object was copied.

* The contents of <textarea> tags will no longer be modified when the
  tree is prettified.

* When a BeautifulSoup object is pickled but its tree builder cannot
  be pickled, its .builder attribute is set to None instead of being
  destroyed. This avoids a performance problem once the object is
  unpickled.

* Specify the file and line number when warning about a
  BeautifulSoup object being instantiated without a parser being
  specified.

* The `limit` argument to `select()` now works correctly, though it's
  not implemented very efficiently.

* Fixed a Python 3 ByteWarning when a URL was passed in as though it
  were markup. Thanks to James Salter for a patch and
  test.

* We don't run the check for a filename passed in as markup if the
  'filename' contains a less-than character; the less-than character
  indicates it's most likely a very small document.
2016-07-20 14:07:01 +02:00
Florian Bruhin
dfbd31f35f Use /usr/bin/env shebang for bash userscripts
See #1665
2016-07-20 11:06:35 +02:00
Florian Bruhin
6130226a23 doc/stacktrace: Add qt5-webengine-debug 2016-07-20 09:40:09 +02:00
Florian Bruhin
d271c31edf pylint requirements: Update pylint to 1.6.4
* Recurse into all the ancestors when checking if an object is an exception

  Since we were going only into the first level, we weren't inferring
  when a class used a metaclass which defined a base Exception class
  for the aforementioned class.
2016-07-19 19:22:25 +02:00
Florian Bruhin
4161f4d6eb test requirements: Update CherryPy to 6.2.0
* Added tool to automatically convert request params based on type
  annotations (primarily in Python 3). For example:

    @cherrypy.tools.params()
    def resource(self, limit: int):
        assert isinstance(limit, int)
2016-07-19 09:36:51 +02:00
Florian Bruhin
70f14329e3 pylint requirements: Update pylint to 1.6.3
* Do not crash when inferring uninferable exception types for docparams
  extension
2016-07-19 09:24:51 +02:00
Ryan Roden-Corrent
48dbf505ce Limit config_tmpdir use in test_configtypes.
Only use the fixture in the test class that tries to access the config
dir (TestFileAndUserStyleSheet) rather than the whole test.
2016-07-18 21:49:37 -04:00
Ryan Roden-Corrent
7b3406a3e4 Use monkeypatch.setenv instead of os.putenv.
This ensures the environment is modified only for the test using the
fixture rather than for the whole test run.
2016-07-18 21:39:35 -04:00
Florian Bruhin
ea8e1f1131 Merge branch 'lahwaacz-#1657' 2016-07-18 14:31:20 +02:00
Florian Bruhin
8a290bf9b2 Add a test for #1657/#1658 2016-07-18 14:31:01 +02:00