Commit Graph

381 Commits

Author SHA1 Message Date
Florian Bruhin
7898507775 tox: Update pytest-mock to 1.0.0
Fix AttributeError with mocker.spy when spying on inherited methods
2016-05-20 13:10:48 +02:00
Florian Bruhin
33236b5314 Make tox -e mkenv work
This is a common typo, so let's just make things work. It does the exact
same thing as tox -e mkvenv.
2016-05-15 09:59:44 +02:00
Florian Bruhin
42460c3c04 tox: Update pyparsing to 2.1.4
- Split out the '==' behavior in ParserElement, now implemented
  as the ParserElement.matches() method. Using '==' for string test
  purposes will be removed in a future release.

- Expanded capabilities of runTests(). Will now accept embedded
  comments (default is Python style, leading '#' character, but
  customizable). Comments will be emitted along with the tests and
  test output. Useful during test development, to create a test string
  consisting only of test case description comments separated by
  blank lines, and then fill in the test cases. Will also highlight
  ParseFatalExceptions with "(FATAL)".

- Added a 'pyparsing_common' class containing common/helpful little
  expressions such as integer, float, identifier, etc. I used this
  class as a sort of embedded namespace, to contain these helpers
  without further adding to pyparsing's namespace bloat.

- Minor enhancement to traceParseAction decorator, to retain the
  parse action's name for the trace output.

- Added optional 'fatal' keyword arg to addCondition, to indicate that
  a condition failure should halt parsing immediately.
2016-05-13 21:21:14 +02:00
Florian Bruhin
a7ece80d34 Merge branch 'pyinstaller' 2016-05-13 06:21:28 +02:00
Florian Bruhin
d507727bb3 tox: Update PyInstaller to 3.2
- Even the “main” script is now byte-compiled
- The manual is on readthedocs.io now
- On installation try to compile the bootloader if there is none for the
  current plattform
- (Unix) Use objcopy to create a valid ELF file
- (Linux): Compile with _FORTIFY_SOURCE
- New, updated and fixed hooks: CherryPy, Cryptography, enchant,
  gi.repository.GdkPixbuf, gst, Lib2to3, PyQt4, PyQt5, PySide, SciPy,
  sphinx, sqlalchemy, traitlets, wx.lib.pubsub
- For windowed mode add isatty() for our dummy NullWriter
- Suppress “Failed to execute script” in case of SystemExit
- Do not apply Upx compressor for bootloader files
- Fix absolute path for lib used via ctypes
- (OSX) Fix binary cache on NFS
- (Windows) Fix message in grab_version
- (Windows) Fix wrong icon paramter in Windows example
- (Windows) Fix win32 unicode handling
- (Windows) Fix unnecessary rebuilds caused by rebuilding winmanifest
- (Cygwin) Fix finding the Python library for Cygwin 64-bit
- (OSX) Fix compilation issue
- (Windows) No longer bundle pefile, use package from for windows
- (Windows) Provide a more robust means of executing a Python script
- AIX fixes.
- Update waf to version 1.8.20
- Fix excludedimports, more predictable order how hooks are applied
- Internal impovements and code clean-up
- Clean-ups fixes and improvements for the test suite
2016-05-13 05:23:19 +02:00
Florian Bruhin
af1880fc1d tox: Update pyflakes to 1.2.3 2016-05-12 21:11:14 +02:00
Florian Bruhin
768ff8b193 tox: update pyparsing to 2.1.3
- _trim_arity fix in 2.1.2 was very version-dependent on Py 3.5.0.
  Now works for Python 2.x, 3.3, 3.4, 3.5.0, and 3.5.1 (and hopefully
  beyond).

This fixes pyparsing/flake8-putyt/flake8 being broken with python 3.4:

    >>> import pyparsing
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File ".../pyparsing.py", line 3478, in <module>
        _escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
      File ".../pyparsing.py", line 948, in setParseAction
        self.parseAction = list(map(_trim_arity, list(fns)))
      File ".../pyparsing.py", line 808, in _trim_arity
        this_line = extract_stack()[-1]
      File ".../pyparsing.py", line 793, in extract_stack
        return [(frame_summary.filename, frame_summary.lineno)]
    AttributeError: 'tuple' object has no attribute 'filename'

See https://sourceforge.net/p/pyparsing/bugs/95/
2016-05-12 20:32:03 +02:00
Florian Bruhin
e095f9ded2 tox: Downgrade pyparsing to 2.1.1
It seems pyparsing 2.1.2 is broken with Python 3.4:

    >>> import pyparsing
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File ".../pyparsing.py", line 3478, in <module>
        _escapedPunc = Word( _bslash, r"\[]-*.$+^?()~ ", exact=2 ).setParseAction(lambda s,l,t:t[0][1])
      File ".../pyparsing.py", line 948, in setParseAction
        self.parseAction = list(map(_trim_arity, list(fns)))
      File ".../pyparsing.py", line 808, in _trim_arity
        this_line = extract_stack()[-1]
      File ".../pyparsing.py", line 793, in extract_stack
        return [(frame_summary.filename, frame_summary.lineno)]
    AttributeError: 'tuple' object has no attribute 'filename'

That breaks flake8-putty and thus flake8.
See https://sourceforge.net/p/pyparsing/bugs/95/
2016-05-11 08:15:12 +02:00
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
d3d765fb97 tox: Update pyflakes to 1.2.2
- Avoid traceback when exception is del-ed in except
2016-05-06 19:02:59 +02:00
Florian Bruhin
16f071c778 tox: Update pyflakes to 1.2.1
1.2.1 (2015-05-05):
  - Fix false RedefinedWhileUnused for submodule imports

1.2.0 (2016-05-03):
  - Warn against reusing exception names after the except: block on Python 3
  - Improve the error messages for imports
2016-05-06 16:24:58 +02:00
Florian Bruhin
4a1a87a4db I don't know how to magit 2016-05-04 07:03:46 +02:00
Florian Bruhin
9c09c266a6 tox: Exclude pyflakes 1.2.0 for requirements.io 2016-05-04 07:02:33 +02:00
Florian Bruhin
dc1b0920ab tox: Update hypothesis to 3.1.3
- Another charmap problem. In 3.1.2 text/characters would break on
  systems which had /tmp/ mounted on a different partition than the
  Hypothesis storage directory (usually in home). This fixes that.
2016-05-01 17:49:44 +02:00
Florian Bruhin
2875596a1e tox: Update flake8-docstrings to 0.2.6
- Respect pep257’s default ignore list
- Handle AllError and other exceptions from pep257
2016-05-01 17:48:58 +02:00
Florian Bruhin
c718254e0c tox: Update CherryPy to 5.3.0
* Add support for specifying a certificate authority when serving SSL
  using the built-in SSL support.
* Use ssl.create_default_context when available.
* Catch platform-specific socket errors on OS X.
* Fix parsing of URIs containing ``://`` in the path part.
2016-04-30 18:42:50 +02:00
Florian Bruhin
379c6561e5 tox: Update requests everywhere 2016-04-30 17:51:04 +02:00
Florian Bruhin
fe9a27a607 tox: Update hypothesis to 3.1.2
Anything which used a text() or characters() strategy was broken on
Windows and I hadn't updated appveyor to use the new repository location
so I didn't notice. This is now fixed and windows support should work
correctly.
2016-04-30 17:49:38 +02:00
Florian Bruhin
ccdd832cbc tox: Update CherryPy to 5.2.0 2016-04-30 17:49:28 +02:00
Florian Bruhin
f613835873 tox: Update requests to 2.10.0
- SOCKS proxy support
- Updated bundled urllib3 to 1.15.1.
2016-04-30 14:32:43 +02:00
Florian Bruhin
294e0799c2 tox: Update hypothesis to 3.1.1
- Fix concurrency issue when running tests that use text() from multiple
  processes at once
- Improve performance of code using lists with max_size
- Fix install on Python 2 with ancient versions of pip so that it
  installs the enum34 backport
- Remove duplicated __all__ exports from hypothesis.strategies
- Update headers to point to new repository location.
- Allow use of strategies that can’t be used in find() (e.g. choices) in
  stateful testing.
2016-04-29 22:25:50 +02:00
Florian Bruhin
a5679dff04 tox: Update werkzeug to 0.11.9
- Corrected an issue that caused the debugger not to use the
  machine GUID on POSIX systems.
- Corrected an Unicode error on Python 3 for the debugger's
  PIN usage.
- Corrected the timestamp verification in the pin debug code.
  Without this fix the pin was remebered until too long.
2016-04-25 06:12:12 +02:00
Florian Bruhin
eeb830e040 travis: Ignore doc changes when building a PR
Fixes #1441
2016-04-20 22:35:02 +02:00
Florian Bruhin
3237e36db5 tox: Update hacking to 0.11.0 2016-04-20 20:16:50 +02:00
Florian Bruhin
210374a73d tox: Update Werkzeug to 0.11.8
- fixed a regression on Python 3 for the debugger.
- fixed a problem with the machine GUID detection code on OS X
  on Python 3.
2016-04-15 19:27:28 +02:00
Florian Bruhin
4368daf0d8 tox: Update Werkzeug to 0.11.6
- werkzeug.serving: Still show the client address on bad requests.
- improved the PIN based protection for the debugger to make it harder to
  brute force via trying cookies.  Please keep in mind that the debugger
  *is not intended for running on production environments*
- increased the pin timeout to a week to make it less annoying for people
  which should decrease the change that users disable the pin check
  entirely.
- werkzeug.serving: Fix broken HTTP_HOST when path starts with double slash.
2016-04-14 18:00:06 +02:00
Florian Bruhin
917aaefa5a tox: Update flake8-future-import 2016-04-08 07:49:11 +02:00
Florian Bruhin
f097b2e57f tox: Update flake8-putty to 0.3.2
Fix regex selector matching multiple codes
2016-04-08 07:38:30 +02:00
Florian Bruhin
642dc46ba9 flake8: Add hacking 2016-04-08 07:35:53 +02:00
Florian Bruhin
735db072c6 flake8: Add flake8-future-import 2016-04-08 07:10:15 +02:00
Florian Bruhin
41d52386e8 tox: Add flake8-tuple/flake8-tidy-imports
flake8-tuple: Check code for 1-element tuples
flake8-tidy-imports: A flake8 plugin that helps you write tidier
                     imports.
2016-04-08 07:00:29 +02:00
Florian Bruhin
1bf15a053d tox: Add a pyinstaller env 2016-04-07 08:50:36 +02:00
Florian Bruhin
485af2dde7 tox: Update flake8-putty to 0.3.1
- Allow regex selector to use codes extracted from each line
- Add predefined ignore pattern # flake8: disable=<codes>
- Add environment marker selector (PEP 0496)
- Fix bug when filename selector contained trailing whitespace
- Switched to using tox-travis, and added PyPy 3 testing
2016-04-07 07:12:54 +02:00
Florian Bruhin
455e32cc0c tox: Update pytest-rerunfailures to 2.0.0
Drop support for Python 3.2, since supporting it became too much of a
hassle. (Reason: Virtualenv 14+ / PIP 8+ do not support Python 3.2
anymore.)
2016-04-06 18:55:54 +02:00
Florian Bruhin
9ea7716b06 Stop supporting running tests without Xvfb/DISPLAY
This always caused problems and unneeded complexity in the past, and it
also increases Travis CI runtime.

We now require either a DISPLAY during tests or Xvfb being installed.
2016-04-06 08:27:43 +02:00
Florian Bruhin
1d89ea397a tox: Update setuptools in cxfreeze-windows env
In 43a4a6a3e7 we added
pkg_resources._vendor.pyparsing to the frozen modules - however, older
setuptools (and thus pkg_resources) versions don't have that module yet,
so freezing would fail.
2016-04-04 19:03:13 +02:00
Florian Bruhin
b704c7167b tox: Update pytest-rerunfailures to 1.0.2
- Add support for --resultlog option by parsing reruns accordingly.
2016-03-29 18:48:33 +02:00
Florian Bruhin
c0f9ab9b2b tox: Update Werkzeug to 0.11.5
- werkzeug.serving: Fix crash when attempting SSL connection to HTTP
  server.
2016-03-28 20:14:15 +02:00
Florian Bruhin
3ccbf3ce1f tox: Use -m pytest instead of -m py.test
Using -m py.test seems to cause some issues, see e.g.
https://github.com/The-Compiler/qutebrowser/pull/1317#issuecomment-196923033
2016-03-26 12:15:56 +01:00
Florian Bruhin
20799f9740 tox: Update astroid/pylint to 1.4.5/1.5.5
astroid
-------

2016-03-21 -- 1.4.5

    * decoratornames() does not leak InferenceError anymore.

    * wildcard_imported_names() got replaced by _public_names()

      Our understanding of wildcard imports through __all__ was
      half baked to say at least, since we couldn't account for
      modifications of the list, which results in tons of false positives.
      Instead, we replaced it with _public_names(), a method which returns
      all the names that are publicly available in a module, that is that
      don't start with an underscore, even though this means that there
      is a possibility for other names to be leaked out even though
      they are not present in the __all__ variable.

      The method is private in 1.4.X.

pylint
------

2016-03-21 -- 1.5.5

    * Let visit_importfrom from Python 3 porting checker be called when everything is disabled

      Because the visit method was filtering the patterns it was expecting to be activated,
      it didn't run when everything but one pattern was disabled, leading to spurious false
      positives

    * Don't emit unsubscriptable-value for classes with unknown
      base classes.

    * Use an OrderedDict for storing the configuration elements

      This fixes an issue related to impredictible order of the disable / enable
      elements from a config file. In certain cases, the disable was coming before
      the enable which resulted in classes of errors to be enabled, even though the intention
      was to disable them. The best example for this was in the context of running multiple
      processes, each one of it having different enables / disables that affected the output.

    * Don't consider bare and broad except handlers as ignoring NameError,
      AttributeError and similar exceptions, in the context of checkers for
      these issues.
2016-03-21 21:05:01 +01:00
Florian Bruhin
fdce4e9692 tox: Update pytest-bdd to 2.16.1
- Cleaned up hooks of the plugin
- Fixed report serialization
2016-03-19 10:41:36 +01:00
Florian Bruhin
4c8f84f97d tox: Update to pytest 2.9.1
- Improve error message when a plugin fails to load.
- pytest.fail with non-ascii characters raises an internal pytest error.
- junit parses report.nodeid incorrectly, when params IDs contain ::.
- SyntaxErrors containing non-ascii lines at the point of failure generated an
  internal py.test error.
- When passing in a bytestring regex pattern to parameterize attempt to decode
  it as utf-8 ignoring errors.
- parametrized test nodes cannot be specified to run on the command line.
2016-03-18 22:41:42 +01:00
Florian Bruhin
236572e0f5 Check docs on Travis, take two
We don't regenerate the authors there, as that doesn't work due to Travis
cloning with --depth=50
2016-03-16 06:22:36 +01:00
Florian Bruhin
07d31634c6 Add script to check for doc changes 2016-03-15 22:43:47 +01:00
Florian Bruhin
8a0d89d940 tox: Update Mako to 1.0.4
[test] [feature] The default test runner is now py.test. Running “python
setup.py test” will make use of py.test instead of nose. nose still works as a
test runner as well, however.

[lexer] [bug] Major improvements to lexing of intricate Python sections which
may contain complex backslash sequences, as well as support for the bitwise
operator (e.g. pipe symbol) inside of expression sections distinct from the
Mako “filter” operator, provided the operator is enclosed within parentheses or
brackets. Pull request courtesy Daniel Martin.

[feature] Added new method Template.list_defs(). Pull request courtesy Jonathan
Vanasco.
2016-03-11 06:55:05 +01:00
Florian Bruhin
a94abb0858 tox: Update CherryPy to 5.1.0
* Bugfix for ``test_HTTP11_pipelining`` test in Python 3.5
* Bugfix regarding the keyword arguments support for Python 3 on the config
  file.
* Bugfix for ``test_2_KeyboardInterrupt`` test in Python 3.5.
  by monkey patching the HTTPRequest given a bug on CPython
  that is affecting the testsuite (https://bugs.python.org/issue23377).
* Add additional parameter ``raise_subcls`` to the tests helpers
  `openURL` and ``CPWebCase.getPage`` to have finer control on
  which exceptions can be raised.
* Add support for direct keywords on the calls (e.g. ``foo=bar``) on
  the config file under Python 3.
* Add additional validation to determine if the process is running
  as a daemon on ``cherrypy.process.plugins.SignalHandler`` to allow
  the execution of the testsuite under CI tools.
2016-03-11 06:53:52 +01:00
Florian Bruhin
119f01bd5f tox: Add {posargs} to pylint envs 2016-03-10 20:11:15 +01:00
Florian Bruhin
82b52d8799 tox: Rename pylint-tip to pylint-master 2016-03-10 20:11:15 +01:00