Commit Graph

8177 Commits

Author SHA1 Message Date
Florian Bruhin
1d87eee4d7 Fix starting when sys.stderr is None 2016-05-27 14:48:46 +02:00
Florian Bruhin
afcb018ee2 Fix some spelling mistakes
Found via http://jwilk.net/software/mwic
2016-05-27 12:07:00 +02:00
Florian Bruhin
29aedef420 Fix :debug-console with PyQt 5.6 2016-05-27 00:18:23 +02:00
Florian Bruhin
2fb5de8bd3 test_insert_mode: Always set fake clipboard
Otherwise if we only run a keypress test, the fake clipboard won't be
activated and thus the subsequent :yank-selected would write to the real
clipboard.
2016-05-27 00:12:53 +02:00
Florian Bruhin
6c4beef783 Work around flake8-string-format bug
When using flake8-string-format on Python 3.5 with str.format(*group) it
failed:

  Traceback (most recent call last):
    File "./.venv-flakes/bin/flake8", line 11, in <module>
      sys.exit(main())
    File ".../site-packages/flake8/main.py", line 33, in main
      report = flake8_style.check_files()
    File ".../site-packages/flake8/engine.py", line 181, in check_files
      return self._retry_serial(self._styleguide.check_files, paths=paths)
    File ".../site-packages/flake8/engine.py", line 172, in _retry_serial
      return func(*args, **kwargs)
    File ".../site-packages/pep8.py", line 1842, in check_files
      runner(path)
    File ".../site-packages/flake8/engine.py", line 126, in input_file
      return fchecker.check_all(expected=expected, line_offset=line_offset)
    File ".../site-packages/pep8.py", line 1574, in check_all
      self.check_ast()
    File ".../site-packages/pep8.py", line 1521, in check_ast
      for lineno, offset, text, check in checker.run():
    File ".../site-packages/flake8_string_format.py", line 288, in run
      assert isinstance(call.args, ast.Starred) is bool(has_starargs)
  AssertionError

This works around that issue.
See https://github.com/xZise/flake8-string-format/issues/11
2016-05-26 23:50:58 +02:00
Florian Bruhin
ee848ce09e tox: Update sortedcontainers to 1.5.1 2016-05-26 21:42:34 +02:00
Tarcisio Fedrizzi
a3e6761db6 Fixes pylint error 2016-05-26 18:01:01 +02:00
Tarcisio Fedrizzi
a9e96df5df Adds unit test when force_search is True 2016-05-26 18:01:01 +02:00
Tarcisio Fedrizzi
7da6faa7af Changes fuzzy_url to force search even when paths are passed 2016-05-26 18:01:01 +02:00
Tarcisio Fedrizzi
462f9d7e4c Refators discussed in the review
- refactors what discussed in the review
- adds unit tests for schemas without host and path
2016-05-26 18:01:01 +02:00
Florian Bruhin
7c89f0c024 Merge branch 'nginth-singleoptioncrash' 2016-05-26 07:48:49 +02:00
Florian Bruhin
998f025553 Update docs 2016-05-26 07:45:17 +02:00
Florian Bruhin
a589c09f2e Merge branch 'singleoptioncrash' of https://github.com/nginth/qutebrowser into nginth-singleoptioncrash 2016-05-26 07:41:09 +02:00
Florian Bruhin
9d018b8fbd pylint: Disable too-many-return-statements 2016-05-26 07:39:47 +02:00
Nick Ginther
1ea99c5958 add completing single option argument test 2016-05-25 17:52:36 -05:00
Nick Ginther
2065f292ab fix crash on empty parts[] (#1523) 2016-05-25 16:45:06 -05:00
Florian Bruhin
20cfadbda7 Merge branch 'nginth-tabindexfix' 2016-05-25 22:10:59 +02:00
Florian Bruhin
4c0f85564d Update docs 2016-05-25 22:10:45 +02:00
Florian Bruhin
824e662154 Merge branch 'tabindexfix' of https://github.com/nginth/qutebrowser into nginth-tabindexfix 2016-05-25 22:09:01 +02:00
Florian Bruhin
a6abc86456 Merge branch 'rcorre-better_keyhints' 2016-05-25 22:07:23 +02:00
Florian Bruhin
ed6432136f Update docs 2016-05-25 22:06:59 +02:00
Florian Bruhin
c96722f169 Merge branch 'better_keyhints' of https://github.com/rcorre/qutebrowser into rcorre-better_keyhints 2016-05-25 22:04:51 +02:00
Nick Ginther
c70accda22 restructure code 2016-05-25 13:46:31 -05:00
Florian Bruhin
5a82bf3357 Add some more logging for SSL errors 2016-05-25 20:45:54 +02:00
Tarcisio Fedrizzi
73c200fb14 Tweaks the multi-line heuristic to handle scheme-like text
Adds some options to implement a way to treat multiline text that starts
with a scheme-like line as text instead as an URL.
2016-05-25 08:05:57 +02:00
Ryan Roden-Corrent
f58e2d91dc Add a keyhint blacklist.
Replace the setting ui.show-keyhints with ui.keyhint-blacklist, which
is a list of globs for keychains that shouldn't be hinted. This allows
users to prevent showing keyhints for keychains they already know.

keyhint-blacklist='*' is equivalent to show-keyhints=False.

Resolves #1515.
2016-05-24 20:46:39 -04:00
Florian Bruhin
f100eb6e03 Mark iframe hint tests as xfail_norun as a stopgap
See #1525.
2016-05-24 22:23:42 +02:00
Nick Ginther
8c487e9a5f fix tabindex statusbar not updating (#1247) 2016-05-24 15:18:22 -05:00
Florian Bruhin
3bbc950616 Fix lint 2016-05-24 21:53:50 +02:00
Florian Bruhin
f692d34d94 Merge branch 'Yatekii-master' 2016-05-24 21:37:02 +02:00
Florian Bruhin
9ef12a0af8 Regenerate authors 2016-05-24 21:36:47 +02:00
Florian Bruhin
846fe8b943 Add a test for #1484 2016-05-24 21:36:09 +02:00
Florian Bruhin
ea1d8902d5 Add logging for #1484 2016-05-24 21:35:48 +02:00
Florian Bruhin
0fb6e508e6 Merge branch 'master' of https://github.com/Yatekii/qutebrowser into Yatekii-master 2016-05-24 21:32:24 +02:00
Florian Bruhin
ce9324029e tox: Update werkzeug to 0.11.10
- Fixed a bug that occurs when running on Python 2.6 and using a broken
  locale.
- Fixed a crash when running the debugger on Google App Engine.
- Fixed an issue with multipart parsing that could cause memory
  exhaustion.
2016-05-24 15:45:19 +02:00
Florian Bruhin
f5c67785c7 tox: Remove pytest-html
We don't use pytest-html anywhere anymore since switching from the
buildbot to Travis CI.
2016-05-24 15:44:39 +02:00
Florian Bruhin
153e955561 tox: Update pbr to 1.10.0 2016-05-24 15:43:09 +02:00
Florian Bruhin
40601adef0 tox: Update hypothesis to 3.2.0
All tests using @given now fix the global random seed. This removes the
health check for that. If a non-zero seed is required for the final
falsifying example, it will be reported. Otherwise Hypothesis will
assume randomization was not a significant factor for the test and be
silent on the subject. If you use the random_module() strategy this will
continue to work and will always display the seed.
2016-05-24 15:41:55 +02:00
Florian Bruhin
c6cb8e5099 Remove unneeded "# pragma: no branch" comments
Those are not needed anymore with coverage 4.1.
2016-05-24 15:40:50 +02:00
Florian Bruhin
11363b9533 Fix some invalid "# pragma: no cover" comments
We accidentally used "# pragma: no coverage" instead.
2016-05-24 15:40:18 +02:00
Ryan Roden-Corrent
b1aaf0f10f Only show keyhints after a short delay.
If a user knows the keychain and can type it quickly, we shouldn't
annoy them with a popup. Only show the keyhint if the user doesn't
complete their keychain in 500ms.

The isVisible() check in the tests is somewhat invalid now because it
is never immediately visible and I don't want to add a delay to unit
tests. I added a check that text() is not set for one test that was
only checking isVisible().

Addresses part of #1515.
2016-05-23 21:21:03 -04:00
Noah Huesser
299c66b82c Possibly fixed issue: #1484 2016-05-23 11:32:27 +02:00
Florian Bruhin
002e5801f1 Improve logging in add_js_bridge 2016-05-22 14:55:53 +02:00
Florian Bruhin
4066696956 tox/requirements: Update coverage to 4.1
Version 4.1 --- 2016-05-21

- The internal attribute Reporter.file_reporters was removed in 4.1b3.
  It should have come has no surprise that there were third-party tools
  out there using that attribute. It has been restored, but with a
  deprecation warning.

Version 4.1b3 --- 2016-05-10

- When running your program, execution can jump from an except X: line
  to some other line when an exception other than X happens. This jump
  is no longer considered a branch when measuring branch coverage.
- When measuring branch coverage, yield statements that were never
  resumed were incorrectly marked as missing. This is now fixed.
- During branch coverage of single-line callables like lambdas and
  generator expressions, coverage.py can now distinguish between them
  never being called, or being called but not completed.
- The HTML report now has a map of the file along the rightmost edge of
  the page, giving an overview of where the missed lines are. Thanks,
  Dmitry Shishov.
- The HTML report now uses different monospaced fonts, favoring Consolas
  over Courier. Along the way not properly handling one-space indents
  was fixed. The index page also has slightly different styling, to try
  to make the clickable detail pages more apparent.
- Missing branches reported with coverage report -m will now say ->exit
  for missed branches to the exit of a function, rather than a negative
  number.
- coverage --help and coverage --version now mention which tracer is
  installed, to help diagnose problems. The docs mention which features
  need the C extension.
- Officially support PyPy 5.1, which required no changes, just updates
  to the docs.
- The Coverage.report function had two parameters with non-None
  defaults, which have been changed. show_missing used to default to
  True, but now defaults to None. If you had been calling
  Coverage.report without specifying show_missing, you'll need to
  explicitly set it to True to keep the same behavior. skip_covered used
  to default to False. It is now None, which doesn't change the
  behavior.
- It's never been possible to pass a namespace module to one of the
  analysis functions, but now at least we raise a more specific error
  message, rather than getting confused.
- The coverage.process_startup function now returns the Coverage
  instance it creates.
- Make a small tweak to how we compare threads, to avoid buggy custom
  comparison code in thread classes.

Version 4.1b2 --- 2016-01-23

- Problems with the new branch measurement in 4.1 beta 1 were fixed:
  - Class docstrings were considered executable. Now they no longer are.
  - yield from and await were considered returns from functions, since
    they could tranfer control to the caller. This produced unhelpful
    "missing branch" reports in a number of circumstances. Now they no
    longer are considered returns.
  - In unusual situations, a missing branch to a negative number was
    reported.
- The XML report now produces correct package names for modules found in
  directories specified with source=.
- coverage report won't produce trailing whitespace.

Version 4.1b1 --- 2016-01-10

- Branch analysis has been rewritten: it used to be based on bytecode,
  but now uses AST analysis. This has changed a number of things:
  - More code paths are now considered runnable, especially in
    try/except structures. This may mean that coverage.py will identify
    more code paths as uncovered. This could either raise or lower your
    overall coverage number.
  - Python 3.5's async and await keywords are properly supported
  - Some long-standing branch coverage bugs were fixed:
    - functions with only a docstring for a body would incorrectly
      report a missing branch on the def line.
    - code in an except block could be incorrectly marked as a missing
      branch.
    - context managers (with statements) in a loop or try block could
      confuse the branch measurement, reporting incorrect partial
      branches.
    - In Python 3.5, an actual partial branch could be marked as
      complete.
- Pragmas to disable coverage measurement can now be used on decorator
  lines, and they will apply to the entire function or class being
  decorated.
- Multiprocessing support is now available on Windows.
- Files with two encoding declarations are properly supported.
- Non-ascii characters in regexes in the configuration file worked in
  3.7, but stopped working in 4.0. Now they work again.
- Form-feed characters would prevent accurate determination of the
  beginning of statements in the rest of the file. This is now fixed.
2016-05-22 14:35:26 +02:00
Florian Bruhin
0f8b298fad Merge branch 'lahwaacz-hints_clicking' 2016-05-20 18:11:54 +02:00
Florian Bruhin
4b5788a878 Update docs 2016-05-20 18:08:46 +02:00
Florian Bruhin
a5c08e23b6 Fix path to link.html in new tests 2016-05-20 17:21:05 +02:00
Florian Bruhin
ea1f46d542 Merge branch 'hints_clicking' of https://github.com/lahwaacz/qutebrowser into lahwaacz-hints_clicking 2016-05-20 17:09:16 +02:00
Florian Bruhin
2c42219b23 Don't autofollow hint when unfiltering w/ rapid
When we are in rapid mode with only one link, after following the hint, fire()
called filter_hints(None) to display all hints again. Then filter_hints tried
to follow that link, fire() tried to show all again, etc., leading to a
RecursionError.

Fixes #1513.

A test will be added via #1510.
2016-05-20 16:41:51 +02:00
Florian Bruhin
107934e4e1 bdd: Wait a bit in "No crash should happen" step
If we don't do this, the qutebrowser process will be terminated and exit
before it actually has a chance to crash.

See #1510
2016-05-20 16:03:52 +02:00