Commit Graph

251 Commits

Author SHA1 Message Date
Florian Bruhin
a1f4914271 tox: Update pytest-faulthandler to 1.3.0.
Now stops timeout when handling exceptions interactively.
2015-12-16 23:09:02 +01:00
Florian Bruhin
a387e9669c tox: Update requests to 2.9.0.
Minor Improvements (Backwards compatible)

- The verify keyword argument now supports being passed a path to a directory
  of CA certificates, not just a single-file bundle.
- Warnings are now emitted when sending files opened in text mode.
- Added the 511 Network Authentication Required status code to the status code
  registry.

Bugfixes

- For file-like objects that are not seeked to the very beginning, we now send
  the content length for the number of bytes we will actually read, rather than
  the total size of the file, allowing partial file uploads.
- When uploading file-like objects, if they are empty or have no obvious
  content length we set Transfer-Encoding: chunked rather than
  Content-Length: 0.
- We correctly receive the response in buffered mode when uploading chunked
  bodies.
- We now handle being passed a query string as a bytestring on Python 3, by
  decoding it as UTF-8.
- Sessions are now closed in all cases (exceptional and not) when using the
  functional API rather than leaking and waiting for the garbage collector to
  clean them up.
- Correctly handle digest auth headers with a malformed qop directive that
  contains no token, by treating it the same as if no qop directive was
  provided at all.
- Minor performance improvements when removing specific cookies by name.
2015-12-15 17:58:51 +01:00
Florian Bruhin
90c782a891 Revert "Avoid setenv substitution in tox.ini."
This reverts commit 7245e300e6.
This was fixed in tox 2.3.1.
2015-12-15 11:49:06 +01:00
Florian Bruhin
a2423b0b6c tox: Update hypothesis to 1.17.0.
This is actually the same release as 1.16.1, but 1.16.1 has been pulled because
it contains the following additional change that was not intended to be in a
patch release (it's perfectly stable, but is a larger change that should have
required a minor version bump):

Hypothesis will now perform a series of "health checks" as part of running your
tests. These detect and warn about some common error conditions that people
often run into which wouldn't necessarily have caued the test to fail but would
cause e.g. degraded performance or confusing results.
2015-12-15 11:48:07 +01:00
Florian Bruhin
c74bcf95aa tox: Update hypothesis to 1.16.1.
A small bugfix release that allows bdists for Hypothesis to be built under 2.7
- the compat3.py file which had Python 3 syntax wasn't intended to be loaded
under Python 2, but when building a bdist it was. In particular this would
break running setup.py test.
2015-12-15 06:59:06 +01:00
Florian Bruhin
879f99bddf tox: Update pytest to 2.8.5.
- fixed issue where class attributes injected during collection could break pytest.
- precompute junitxml chunks instead of storing the whole tree in objects
- fix ``pytest.deprecated_call()`` receiving multiple arguments
  (Regression introduced in 2.8.4).
2015-12-13 13:17:53 +01:00
Florian Bruhin
7245e300e6 Avoid setenv substitution in tox.ini.
This works around a bug with tox 2.3.0:
https://bitbucket.org/hpk42/tox/issues/294/
2015-12-11 21:39:41 +01:00
Florian Bruhin
b3b2fb51fc tox: Update pytest-faulthandler to 1.2.0.
Now traceback dumping due to a timeout is cancelled when entering pdb.
2015-12-11 06:42:24 +01:00
Florian Bruhin
9b88167ae1 tox: Update decorator to 4.0.6.
Removed a file x.py accidentally entered in the tarball
2015-12-11 06:41:42 +01:00
Florian Bruhin
bed37defde tox: Update check-manifest to 0.30.
- Support git submodules
- Revert the zc.buildout support hack from 0.26 because it causes breakage
- Improve non-ASCII filename handling with Bazaar on Windows.
2015-12-11 06:40:49 +01:00
Florian Bruhin
dc4600008b tox: Update xvfbwrapper to 0.2.6.
Drops Python 2.6 support, no other notable changes it seems.
2015-12-10 06:10:51 +01:00
Florian Bruhin
fd63b21261 tox: Update pytest-catchlog to 1.2.1.
- Allow caplog.records() to be modified.
- Restore Python 2.6 compatibility.
2015-12-09 17:34:29 +01:00
Florian Bruhin
8d7e43e4c4 tox: Update hypothesis to 1.16.0.
There are no public API changes in this release but it includes a behaviour
change that I wasn't comfortable putting in a patch release.

- Functions from hypothesis.strategies will no longer raise InvalidArgument on
  bad arguments. Instead the same errors will be raised when a test using such
  a strategy is run. This may improve startup time in some cases, but the main
  reason for it is so that errors in strategies won't cause errors in loading,
  and it can interact correctly with things like pytest.mark.skipif.
- Errors caused by accidentally invoking the legacy API are now much less
  confusing, although still throw NotImplementedError.
- hypothesis.extra.django is 1.9 compatible.
- When tests are run with max_shrinks=0 this will now still rerun the test on
  failure and will no longer print "Trying example:" before each run.
  Additionally note() will now work correctly when used with max_shrinks=0.
2015-12-09 17:32:45 +01:00
Florian Bruhin
73b4704d6c tox: Update decorator to 4.0.5.
Documented a quirk signaled by David Goldstein when writing decorators for
functions with keyword arguments. Avoided copying the globals, as signaled by
Benjamin Peterson (2015/12/09)
2015-12-09 17:30:42 +01:00
Florian Bruhin
dddd1e87a5 tox: Update pytest to 2.8.4.
- ``deprecated_call()`` now works when the deprecated function has been already
  called by another test in the same module.
- ``--pastebin`` option now works on Python 3.
- ``--pastebin`` now works correctly when captured output contains non-ascii
  characters.
- Fix another error when collecting with a nasty __getattr__().
- fix the summary printed when no tests did run.
- a number of documentation modernizations wrt good practices.
2015-12-06 22:22:33 +01:00
Florian Bruhin
2a030107b9 tox: Upgrade CherryPy to 3.8.0.
Pass ``exc_info`` to logger as keyword rather than formatting the error and
injecting into the message.
2015-12-04 07:16:34 +01:00
Florian Bruhin
cab6bf87b4 tox: Update to pylint 1.5.1.
* Don't emit unsubscriptable-object if the node is found
  inside an abstract class.

* Add wrong-import-position to check_messages's decorator arguments
  for ImportChecker.leave_module

  This fixes an esoteric bug which occurs when ungrouped-imports and
  wrong-import-order are disabled and pylint is executed on multiple files.
  What happens is that without wrong-import-position in check_messages,
  leave_module will never be called, which means that the first non-import node
  from other files might leak into the current file,
  leading to wrong-import-position being emitted by pylint.

* Fix a crash which occurred when old visit methods are encountered
  in plugin modules.

* Don't emit import-self and cyclic-import for relative imports
  of modules with the same name as the package itself.
2015-12-02 17:53:59 +01:00
Florian Bruhin
e1f53302be Revert "tox: Add {posargs} for pylint."
This breaks on Travis/AppVeyor were different environments all get the same
args.
This reverts commit b59951cc98.
2015-12-01 22:51:03 +01:00
Florian Bruhin
b59951cc98 tox: Add {posargs} for pylint. 2015-12-01 20:05:19 +01:00
Florian Bruhin
81f522336f Do PYTHONPATH shenanigans in run_pylint_on_tests.
If we do it in tox.ini, there are two drawbacks:

- We have more stuff in PYTHONPATH even if we don't when actually using
  qutebrowser.
- The separator is platform specific, so we can't easily do this in a portable
  way in tox.ini.
2015-12-01 08:07:42 +01:00
Florian Bruhin
009e29789a tox: Add {toxinidir} to PYTHONPATH for pylint.
Seems like it doesn't like to import qutebrowser from the tests anymore
otherwise...
2015-12-01 07:10:39 +01:00
Florian Bruhin
5dc891f207 pylint: Move expected-line-ending-format to config. 2015-11-30 21:08:17 +01:00
Florian Bruhin
41b9fd7853 tox: Remove --rcfile for pylint.
We don't need this anymore as pylint now reads .pylintrc automatically.
2015-11-30 21:08:17 +01:00
Florian Bruhin
a987c08b69 tox: Set basepython = python3 for pylint. 2015-11-30 07:38:49 +01:00
Florian Bruhin
0004bebc09 tox: Update astroid/pylint to 1.4.1/1.5.0.
This means logilab-common isn't needed anymore and it runs with python 3.5 now.
2015-11-30 07:15:40 +01:00
Florian Bruhin
a008b488b1 tox: Set ignore_errors for some environments.
We want to run pylint on tests as well if the first pylint invocation failed.
2015-11-30 07:00:20 +01:00
Florian Bruhin
03b6459d2f tox: Update py to 1.4.31. 2015-11-28 20:38:20 +01:00
Florian Bruhin
eaec930605 tox: Update coverage to 4.0.3.
- Fixed a mysterious problem that manifested in different ways: sometimes
  hanging the process, sometimes making database connections fail.
- The XML report now has correct <source> elements when using a --source=
  option somewhere besides the current directory.
- Fixed an unusual edge case of detecting source encodings
- Help messages that mention the command to use now properly use the actual
  command name, which might be different than “coverage”.
2015-11-24 21:35:29 +01:00
Florian Bruhin
f48bebb7ff tox: Update hypothesis to 1.15.0.
A release with two new features.

- A 'characters' strategy for more flexible generation of text with particular
  character ranges and types.
- Add support for preconditions to the rule based stateful testing.
2015-11-24 21:34:43 +01:00
Florian Bruhin
16e1a65448 Merge branch 'download-page' of https://github.com/Kingdread/qutebrowser into Kingdread-download-page 2015-11-23 13:16:16 +01:00
Florian Bruhin
8607d527bf tox: Update check-manifest to 0.29.
Fix --python with just a command name, to be found in path.
2015-11-21 10:44:58 +01:00
Daniel Schadt
3466ee03f6 Change development server to cherrypy.wsgiserver
The Flask/Werkzeug development servers had some issues which lead to
failing tests (together with some Qt bugs).
2015-11-20 13:35:24 +01:00
Florian Bruhin
22a8f8def6 tox: Update pytest to 2.8.3.
- add __name__ attribute to testcases in TestCaseFunction to support the
  @unittest.skip decorator on functions and methods.
- collecting tests if test module level obj has __getattr__().
- don't collect tests if their failure cannot be reported correctly e.g. they
  are a callable instance of a class.
- fixed internal error when filtering tracebacks where one entry belongs to a
  file which is no longer available.
- enhancement made to highlight in red the name of the failing tests so
  they stand out in the output.
- minor fixes for interaction with OS X El Capitan system integrity
  protection
2015-11-19 23:00:04 +01:00
Florian Bruhin
bb807cfa07 tox: Update pytest-mock to 0.9.0.
New mocker.resetall function, which calls reset_mock() in all mocked objects up
to that point.
2015-11-18 21:15:36 +01:00
Florian Bruhin
ea5484c3a2 Fix nitpicks. 2015-11-17 19:46:24 +01:00
Florian Bruhin
f20ffca540 Merge branch 'issue923' of https://github.com/lamarpavel/qutebrowser into lamarpavel-issue923 2015-11-17 19:43:35 +01:00
Florian Bruhin
3695e05691 Use pytest-faulthandler on all platforms. 2015-11-13 06:23:31 +01:00
Florian Bruhin
55b83409d9 tox: Update pytest-faulthandler to 1.1.0.
--faulthandler-timeout option is now properly supported in Python 3+; also a
warning is issued instead of an error on platforms without a
faulthandler.dump_traceback_later function.
2015-11-13 06:22:29 +01:00
Florian Bruhin
ef79b87597 tox: Update Werkzeug to 0.11.2.
- Fix inheritable sockets on Windows on Python 3.
- Fixed an issue with the forking server not starting any longer.
- Fixed SSL wrapping on platforms that supported opening sockets
  by file descriptor.
- No longer log from the watchdog reloader.
- Unicode errors in hosts are now better catched or converted into
  bad request errors.
2015-11-12 20:30:26 +01:00
Florian Bruhin
3680f01576 Switch to pytest 2.8.
Closes #1077.

There were two issues:

- Paths for coverage.py suddenly were absolute instead of relative, so we strip
  the common base part if that happens.

  /home/florian/proj/qutebrowser/git/qutebrowser/browser/cookies.py has 100%
  coverage but is not in perfect_files!
  /home/florian/proj/qutebrowser/git/qutebrowser/browser/http.py has 100%
  coverage but is not in perfect_files!
  [...]

- There was an io.UnsupportedOperationError in test_check_coverage.py because
  of pytest-faulthandler, so we just don't load that in the subprocess.
2015-11-11 20:57:47 +01:00
Florian Bruhin
416cfaf002 tests: Switch from pytest-capturelog to catchlog. 2015-11-11 19:57:03 +01:00
Florian Bruhin
a5efbe7412 tox: Update check-manifest to 0.28.
- Fix detection of git submodules.
- Apply ignore patterns in subdirectories too.
2015-11-11 14:57:45 +01:00
Florian Bruhin
cd25a25c96 tox: Update werkzeug to 0.11.1
- Fixed a regression on Python 3 in the debugger.
2015-11-10 19:14:55 +01:00
Florian Bruhin
99e090db78 tox: Update werkzeug to 0.11.
Version 0.11
------------

Released on November 8th 2015, codename Gleisbaumaschine.

- Added ``reloader_paths`` option to ``run_simple`` and other functions in
  ``werkzeug.serving``. This allows the user to completely override the Python
  module watching of Werkzeug with custom paths.
- Many custom cached properties of Werkzeug's classes are now subclasses of
  Python's ``property`` type.
- ``bind_to_environ`` now doesn't differentiate between implicit and explicit
  default port numbers in ``HTTP_HOST``.
- ``BuildErrors`` are now more informative. They come with a complete sentence
  as error message, and also provide suggestions.
- Fix a bug in the user agent parser where Safari's build number instead of
  version would be extracted.
- Fixed issue where RedisCache set_many was broken for twemproxy, which doesn't
  support the default MULTI command.
- ``mimetype`` parameters on request and response classes are now always
  converted to lowercase.
- Changed cache so that cache never expires if timeout is 0. This also fixes
  an issue with redis setex
- Werkzeug now assumes ``UTF-8`` as filesystem encoding on Unix if Python
  detected it as ASCII.
- New optional `has` method on caches.
- Fixed various bugs in `parse_options_header`.
- If the reloader is enabled the server will now open the socket in the parent
  process if this is possible.  This means that when the reloader kicks in
  the connection from client will wait instead of tearing down.  This does
  not work on all Python versions.
- Implemented PIN based authentication for the debugger.  This can optionally
  be disabled but is discouraged.  This change was necessary as it has been
  discovered that too many people run the debugger in production.
- Devserver no longer requires SSL module to be installed.

Version 0.10.5
--------------

(bugfix release, release date yet to be decided)

- Reloader: Correctly detect file changes made by moving temporary files over
  the original, which is e.g. the case with PyCharm.
- Fix bool behavior of ``werkzeug.datastructures.ETags`` under Python 3
2015-11-09 09:46:36 +01:00
Florian Bruhin
30db09bbda tox: Update pyroma to 1.8.3.
- Checking a PyPI package could fail under Python 3.
2015-11-09 09:46:02 +01:00
Florian Bruhin
8ccadda0e9 tox: Update pytest-travis-fold to 1.2.0.
- Recognize 'pytest-cov' and fold coverage report
2015-11-04 23:15:51 +01:00
Florian Bruhin
5fc26bc477 tox: Update coverage to 4.0.2.
- More work on supporting unusually encoded source.
- Files or directories with non-ASCII characters are now handled properly.
- Setting a trace function with sys.settrace was broken by a change in 4.0.1.
- Officially support PyPy 4.0, which required no changes, just updates to the
  docs.
2015-11-04 17:59:46 +01:00
Florian Bruhin
16ba597173 tox: Update check-manifest to 0.27.
Fix utter breakage on Windows, introduced in 0.26. (The bug -- clearing the
environment unnecessarily -- could probably also cause locale-related problems
on other OSes.)
2015-11-02 17:53:20 +01:00
Florian Bruhin
362ef3f74e tox: Fix pylint deps. 2015-11-02 08:01:54 +01:00
Florian Bruhin
611cf7eba7 tox: Re-freeze test dependencies. 2015-11-02 07:47:48 +01:00