Commit Graph

8260 Commits

Author SHA1 Message Date
Florian Bruhin
e7a6907bc2 tests: Don't run geolocation tests on OS X
We already only run them on CI because they can be kind of
unpredictable, and it seems OS X on Travis hangs when running them too.
2016-05-29 17:35:43 +02:00
Florian Bruhin
7180a6df0b requirements: Update pytest dependency pins
This adds MarkupSafe and removes termcolor and wheel.
2016-05-29 17:34:19 +02:00
Florian Bruhin
d008b2a86c requirements: Pin all pylint dependencies 2016-05-29 17:34:16 +02:00
Florian Bruhin
bceb7cf89e tests: Avoid race conditions for :messages tests
We need to wait until the page is actually loaded before we check the
content.
2016-05-29 17:07:37 +02:00
Florian Bruhin
6f6303e0a6 Use requirements files for tox dependencies
While this makes things a little more complicated and means we'll need to use
`-r` to recreate tox environments, it has several advantages:

- Full support from requires.io (including PRs)
- Workaround for https://bitbucket.org/hpk42/tox/issues/332/ so we can update
  virtualenv/pip
2016-05-29 16:53:54 +02:00
Florian Bruhin
cd7b8c65df Remove OS X specific options from freeze.py 2016-05-29 16:26:21 +02:00
Florian Bruhin
9529d55649 Remove misc/qt_menu.nib
This was needed for cx_Freeze on OS X which we don't use anymore.
2016-05-29 16:24:16 +02:00
Florian Bruhin
d3fe2babd3 tests: Wait until page is loaded by default
When doing quteproc.open_path, by default the test didn't wait until the page
was loaded. This caused unintentional race conditions which e.g. caused
dirbrowser tests to fail on OS X:

https://travis-ci.org/The-Compiler/qutebrowser/jobs/133730001

Now instead we wait by default, unless wait=False is passed to open_path() or
open_url().
2016-05-29 16:14:33 +02:00
Florian Bruhin
9bb425d598 Install Qt5/PyQt5 from custom bottles on OS X
We have a custom build which comes with QtWebKit now.
2016-05-29 15:46:43 +02:00
Florian Bruhin
345768bfc4 Fix requirements installing on Appveyor 2016-05-29 15:28:49 +02:00
Florian Bruhin
a987b714de appveyor: Install pip/tox from requirements files 2016-05-29 15:14:42 +02:00
Florian Bruhin
f4ce199968 ci: Blacklist virtualenv > 15.0.1 2016-05-29 15:09:14 +02:00
Florian Bruhin
f72fc04bb1 Revert "ci: Update virtualenv to 15.0.2"
This reverts commit 3c978aa203.
We need to revert this due to the tox/pip bug with inline comments.
2016-05-29 15:08:43 +02:00
Florian Bruhin
51122a8010 tox: Blacklist Flask 0.11.0 2016-05-29 14:35:48 +02:00
Florian Bruhin
a921ee2a8f Revert "tox: Update Flask to 0.11.0"
This reverts commit 986288c408.
2016-05-29 14:35:37 +02:00
Florian Bruhin
986288c408 tox: Update Flask to 0.11.0
Released on May 29th 2016, codename Absinthe.

- Added support to serializing top-level arrays to
  :func:`flask.jsonify`. This introduces a security risk in ancient
  browsers. See :ref:`json-security` for details.
- Added before_render_template signal.
- Added `**kwargs` to :meth:`flask.Test.test_client` to support passing
  additional keyword arguments to the constructor of
  :attr:`flask.Flask.test_client_class`.
- Added ``SESSION_REFRESH_EACH_REQUEST`` config key that controls the
  set-cookie behavior.  If set to ``True`` a permanent session will be
  refreshed each request and get their lifetime extended, if set to
  ``False`` it will only be modified if the session actually modifies.
  Non permanent sessions are not affected by this and will always
  expire if the browser window closes.
- Made Flask support custom JSON mimetypes for incoming data.
- Added support for returning tuples in the form ``(response, headers)``
  from a view function.
- Added :meth:`flask.Config.from_json`.
- Added :attr:`flask.Flask.config_class`.
- Added :meth:`flask.config.Config.get_namespace`.
- Templates are no longer automatically reloaded outside of debug mode.
  This can be configured with the new ``TEMPLATES_AUTO_RELOAD`` config
  key.
- Added a workaround for a limitation in Python 3.3's namespace loader.
- Added support for explicit root paths when using Python 3.3's
  namespace packages.
- Added :command:`flask` and the ``flask.cli`` module to start the local
  debug server through the click CLI system. This is recommended over
  the old ``flask.run()`` method as it works faster and more reliable
  due to a different design and also replaces ``Flask-Script``.
- Error handlers that match specific classes are now checked first,
  thereby allowing catching exceptions that are subclasses of HTTP
  exceptions (in ``werkzeug.exceptions``).  This makes it possible
  for an extension author to create exceptions that will by default
  result in the HTTP error of their choosing, but may be caught with
  a custom error handler if desired.
- Added :meth:`flask.Config.from_mapping`.
- Flask will now log by default even if debug is disabled. The log
  format is now hardcoded but the default log handling can be disabled
  through the ``LOGGER_HANDLER_POLICY`` configuration key.
- Removed deprecated module functionality.
- Added the ``EXPLAIN_TEMPLATE_LOADING`` config flag which when enabled
  will instruct Flask to explain how it locates templates. This should
  help users debug when the wrong templates are loaded.
- Enforce blueprint handling in the order they were registered for
  template loading.
- Ported test suite to py.test.
- Deprecated ``request.json`` in favour of ``request.get_json()``.
- Add "pretty" and "compressed" separators definitions in jsonify()
  method.
  Reduces JSON response size when JSONIFY_PRETTYPRINT_REGULAR=False by
  removing unnecessary white space included by default after separators.
- JSON responses are now terminated with a newline character, because it
  is a convention that UNIX text files end with a newline and some
  clients don't deal well when this newline is missing. See
  https://github.com/pallets/flask/pull/1262 -- this came up originally
  as a part of https://github.com/kennethreitz/httpbin/issues/168
- The automatically provided ``OPTIONS`` method is now correctly
  disabled if the user registered an overriding rule with the
  lowercase-version ``options``.
- ``flask.json.jsonify`` now supports the ``datetime.date`` type.
- Don't leak exception info of already catched exceptions to context
  teardown handlers.
- Allow custom Jinja environment subclasses.
- ``flask.g`` now has ``pop()`` and ``setdefault`` methods.
- Turn on autoescape for ``flask.templating.render_template_string`` by
  default.
- ``flask.ext`` is now deprecated.
- ``send_from_directory`` now raises BadRequest if the filename is
  invalid on the server OS.
- Added the ``JSONIFY_MIMETYPE`` configuration variable.
- Exceptions during teardown handling will no longer leave bad
  application contexts lingering around.
2016-05-29 14:22:11 +02:00
Florian Bruhin
344569fb5b tox: Update flake8-string-format to 0.2.2
- Do not check simple expressions, except for docstrings, because they
  cannot be accessed anyway.
- Properly assert starred arguments in Python 3.5. Only the last element
  must be a vararg if varargs are present and not the complete list.
- Output correct column offset on Python 3.4.2, as that used the wrong
  offset inside calls.
2016-05-29 14:19:38 +02:00
Florian Bruhin
c9d49177cc tox: Update sortedcontainers to 1.5.2 2016-05-29 14:17:48 +02:00
Florian Bruhin
b97736b117 Revert "Work around flake8-string-format bug"
This reverts commit 6c4beef783.
2016-05-29 14:17:32 +02:00
Florian Bruhin
1e55db0630 Follow the American way(tm) of spelling things 2016-05-29 10:57:41 +02:00
Florian Bruhin
4b97ef88ac Merge branch 'hcraT-empty_uri' 2016-05-29 10:38:45 +02:00
Florian Bruhin
86d320b6a1 Update docs 2016-05-29 10:38:24 +02:00
Florian Bruhin
6caa89a622 Merge branch 'empty_uri' of https://github.com/hcraT/qutebrowser into hcraT-empty_uri 2016-05-29 00:37:12 +02:00
Florian Bruhin
3c978aa203 ci: Update virtualenv to 15.0.2 2016-05-28 23:27:42 +02:00
Florian Bruhin
b065d8efcd pyinstaller: Set NSHighResolutionCapable = True
This means qutebrowser will show up correctly on HiDPI/Retina screens
without being pixelated.
2016-05-28 23:20:00 +02:00
Florian Bruhin
90fa2a50ce pyinstaller: Use qutebrowser/__main__.py
When we use qutebrowser.py, PyInstaller 3.2 gets confused
somehow (because of the name conflict with qutebrowser/ maybe?) and
doesn't do anything when running the bundled app.

With qutebrowser/__main__.py the generated filename is still correct and
it actually works.
2016-05-28 23:18:29 +02:00
Tarcisio Fedrizzi
ec2935fab0 Fixes flake8 error 2016-05-28 17:38:31 +02:00
Florian Bruhin
fc3e1b4ede tox: Update hypothesis to 3.4.0
models() strategies from hypothesis.extra.django will now respect much
more of Django's validations out of the box. Wherever possible
full_clean() should succeed.

In particular:

- The max_length, blank and choices kwargs are now respected.
- Add support for DecimalField.
- If a field includes validators, the list of validators are used to
  filter the field strategy.
2016-05-27 15:40:50 +02:00
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
Ryan Roden-Corrent
db09cbb960 Implement a feature test for :hint all userscript.
This adds a (testdata) substitution for 'When I run {command}' to allow
providing an absolute path for the userscript.
2016-05-26 07:35:28 -04: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