Commit Graph

310 Commits

Author SHA1 Message Date
Florian Bruhin
8534010f02 tox: Update flake8 to 2.5.4.
Actually parse output_file and enable_extensions from config files.
2016-02-11 19:29:05 +01:00
Florian Bruhin
5311576c34 Check pep257 via flake8.
We'll still keep the pydocstyle environment though until flake8-pep257 adds
support for that:

https://github.com/Robpol86/flake8-pep257/issues/6
2016-02-10 19:18:47 +01:00
Florian Bruhin
d6267c30f6 tox: Update decorator to 4.0.9.
No changes.
2016-02-08 23:46:41 +01:00
Florian Bruhin
5ae677376b Rerun TestPyQIODevice.test_qprocess if needed.
This adds a new pytest-rerunfailures dependency. For some reason, that test
sometimes fails with an empty string read, and I can't tell why.
2016-02-08 06:54:47 +01:00
Florian Bruhin
c332db4703 tox: Update decorator to 4.0.8.
Switched to a new changelog format (the one in http://keepachangelog.com/)
since it was contributed by Alexander Artemenko. Re-added a newline to support
old version of Python, as requested by azjps.
2016-02-07 17:57:39 +01:00
Florian Bruhin
66f52dbd86 tox: Update wheel to 0.29.0.
- Fix compression type of files in archive
2016-02-07 12:31:08 +01:00
Florian Bruhin
e3508cc37c tox: Filter decorator==4.0.7 for requirements.io.
See https://github.com/micheles/decorator/issues/25
2016-02-07 12:13:51 +01:00
Florian Bruhin
8f74734718 tox: Update cherrypy to 5.0.1.
* Removed deprecated support for ``ssl_certificate`` and
  ``ssl_private_key`` attributes and implicit construction
  of SSL adapter on Python 2 WSGI servers.
* Default SSL Adapter on Python 2 is the builtin SSL adapter,
  matching Python 3 behavior.
* In proxy tool, defer to Host header for resolving the base if no base is
  supplied.
2016-02-06 16:35:29 +01:00
Florian Bruhin
7ef368fc13 tox: Update wheel to 0.28.0.
- Fix file modes in archive
- Support forcing a platform tag using –plat-name on pure-Python wheels, as
  well as nonstandard platform tags on non-pure wheels
- Add SOABI tags to platform-specific wheels built for Python 2.X
- Support reproducible wheel files, wheels that can be rebuilt and will hash to
  the same values as previous builds
- Support for changes in keyring >= 8.0
- Use the file context manager when checking if dependency_links.txt is empty,
  fixes problems building wheels under PyPy on Windows
- Don’t attempt to (recursively) create a build directory ending with ..
  (invalid on all platforms, but code was only executed on Windows)
- Added the PyPA Code of Conduct
2016-02-06 16:33:37 +01:00
Florian Bruhin
30f68e55d6 tox: Update xvfbwrapper to 0.2.8.
- better error handling when xvfb is not installed
- don't hardcode tmp dir location
- use terminate instead of kill so Xvfb can clean up lock files
2016-01-31 13:06:28 +01:00
Florian Bruhin
bf2adf19b2 tox: Update pytest-cov to 2.2.1.
- Fixed incorrect merging of coverage data when xdist was used and coverage was
  >= 4.0.
2016-01-30 23:39:55 +01:00
Florian Bruhin
c9deee0835 tox: Update flake8 to 2.5.2.
- Parse output_file and enable_extensions from config files
- Raise upper bound on mccabe plugin to allow for version 0.4.0
2016-01-30 23:39:55 +01:00
Florian Bruhin
67fd94b189 tox: Update check-manifest to 0.31.
- Drop Python 3.2 support.
- Ignore commented-out lines in MANIFEST.in.
2016-01-30 23:39:55 +01:00
Florian Bruhin
dc07f7ca9b Add a .pydocstylerc. 2016-01-30 23:39:55 +01:00
Florian Bruhin
39ca471685 tox: Switch from pep257 to pydocstyle.
Major Updates
-------------

The project was renamed to pydocstyle and the new release will be 1.0.0!

New Features
------------

- Added support for Python 3.5.
- Classes nested inside classes are no longer considered private. Nested
  classes are considered public if their names are not prepended with an
  underscore and if their parent class is public, recursively.
- Added the D403 error code - "First word of the first line should be properly
  capitalized". This new error is turned on by default.
- Added support for .pydocstylerc and as configuration file name.

Bug Fixes
---------

- Fixed an issue where a NameError was raised when parsing complex definitions
  of __all__.
- Fixed a bug where D202 was falsely reported when a function with just a
  docstring and no content was followed by a comment.
- Fixed wrong __all__ definition in main module.
- Fixed a bug where an AssertionError could occur when parsing __future__
  imports.
2016-01-30 23:23:21 +01:00
Florian Bruhin
6af1cce45f tox: Update pytest-mock to 0.10.1.
- Fix regression in frozen tests due to distutils import dependency.
- Fix regression when using pytest-mock with pytest-2.7.X.
2016-01-28 06:22:00 +01:00
Florian Bruhin
b4972b3c08 tox: Update pytest-mock to 0.10.0.
pytest-mock now monkeypatches the mock library to improve pytest output
for failures of mock call assertions like Mock.assert_called_with().
2016-01-27 22:32:21 +01:00
Florian Bruhin
2b6d35b987 tox: Update mccabe to 0.4.0.
- Stop testing on Python 3.2
- Add support for async/await keywords on Python 3.5 from PEP 0492
2016-01-27 22:30:58 +01:00
Florian Bruhin
dcd62abe2b tox: Update httpbin to 0.4.1.
Added floating-point support for /delay endpoint
2016-01-27 22:20:07 +01:00
Florian Bruhin
959e96f05a tox: Update ebb-lint to 0.4.4
- Read from stdin
- Strip trailing whitespace and \ before tokenizing.
- EOF bug?
2016-01-27 06:41:00 +01:00
Florian Bruhin
8e5014fc0f tox: Update pytest to 2.8.7.
- use predictable object resolution for monkeypatch

- allow for double nodeids in junitxml,
  this was a regression failing plugins combinations like pytest-pep8 +
  pytest-flakes

- Workaround for exception that occurs in pyreadline when using ``--pdb`` with
  standard I/O capture enabled.

- Better error message in case the target of a ``monkeypatch`` call raises an
  ``ImportError``.

- monkeypatch calls (setattr, setenv, etc.) are now O(1).

- captured stdout and stderr are now properly displayed before entering pdb
  when ``--pdb`` is used instead of being thrown away.

- pytest warnings emitted during ``pytest_terminal_summary`` are now properly
  displayed.

- fixed internal UnicodeDecodeError when doctests contain unicode.

- Add captured stdout to jUnit XML report on setup error.
2016-01-25 06:11:09 +01:00
Florian Bruhin
e9662b71f0 Move pytest arguments to pytest.ini.
Closes #1260.
2016-01-24 21:10:22 +01:00
Florian Bruhin
95fe54f010 Avoid running coverage when it's unneeded.
Unfortunately running coverage means our tests need more than a minute longer
to run.

We still run it in the following scenarios:
    - Full 'tox' run
    - On Travis CI on Linux
    - On the buildbot on Archlinux

But not anymore in the following scenarios:
    - When running 'tox -e py35' (or py34)
    - On Travis CI on OS X
    - On AppVeyor
    - On the buildbot except on Archlinux
2016-01-24 20:17:28 +01:00
Florian Bruhin
90c34bce17 tox: Filter pytest 2.8.6 for requirements.io. 2016-01-24 18:32:24 +01:00
Florian Bruhin
fd12aaef5f tox: Update pytest-catchlog to 1.2.2.
- Fix unicode vs str compatibility issues between Python2 and Python3.
2016-01-24 16:56:12 +01:00
Florian Bruhin
e6d9799c4b Revert "tox: Update pytest to 2.8.6."
This reverts commit cf0e13d51a.
See https://github.com/pytest-dev/pytest/issues/1338
2016-01-24 16:54:49 +01:00
Florian Bruhin
cf0e13d51a tox: Update pytest to 2.8.6.
- allow for double nodeids in junitxml,
  this was a regression failing plugins combinations like pytest-pep8 +
  pytest-flakes

- Workaround for exception that occurs in pyreadline when using ``--pdb`` with
  standard I/O capture enabled.

- Better error message in case the target of a ``monkeypatch`` call raises an
  ``ImportError``.

- monkeypatch calls (setattr, setenv, etc.) are now O(1).

- captured stdout and stderr are now properly displayed before entering pdb
  when ``--pdb`` is used instead of being thrown away.

- pytest warnings emitted during ``pytest_terminal_summary`` are now properly
  displayed.

- fixed internal UnicodeDecodeError when doctests contain unicode.

- Add captured stdout to jUnit XML report on setup error.
2016-01-24 01:02:14 +01:00
Florian Bruhin
7fa0dc68bf flake8: Add flake8-pep3101 plugin.
Checks for old string formatting.
https://pypi.python.org/pypi/flake8-pep3101/
2016-01-22 19:40:10 +01:00
Florian Bruhin
7945e632ba flake8: Add flake8-mock plugin. 2016-01-22 19:17:55 +01:00
Florian Bruhin
dbdbc1d8db flake8: Add flake8-deprecated plugin.
Warns about deprecated method calls.
https://pypi.python.org/pypi/flake8-deprecated/
2016-01-22 19:13:23 +01:00
Florian Bruhin
f74d1f26c7 flake8: Add flake8-string-format plugin.
string format checker, plugin for flake8
https://pypi.python.org/pypi/flake8-string-format/
2016-01-22 19:00:29 +01:00
Florian Bruhin
8bdb1b6b14 flake8: Add flake8-copyright plugin.
Adds copyright checks to flake8
https://pypi.python.org/pypi/flake8-copyright/
2016-01-22 17:46:33 +01:00
Florian Bruhin
3a7ced5843 flake8: Add ebb-lint plugin.
lint for ensuring quality software
https://pypi.python.org/pypi/ebb-lint/
2016-01-22 17:33:58 +01:00
Florian Bruhin
58fb2826ee flake8: Add flake8-putty plugin.
Apply a bit of putty to flake8.
https://pypi.python.org/pypi/flake8-putty/
2016-01-22 17:33:58 +01:00
Florian Bruhin
fccde768ed flake8: Add pep8-naming plugin.
Check PEP-8 naming conventions, plugin for flake8
https://pypi.python.org/pypi/pep8-naming/
2016-01-22 17:33:58 +01:00
Florian Bruhin
7e3507aba1 flake8: Add flake8-debugger plugin.
flake8 debug statement checker
https://github.com/JBKahn/flake8-debugger
2016-01-22 17:33:58 +01:00
Florian Bruhin
1952e070fd Initial switch to flake8. 2016-01-22 17:33:58 +01:00
Florian Bruhin
a1eb26c042 tox: Don't install unneeded deps for tox -e mkvenv.
Fixes #1225.
2016-01-19 06:19:54 +01:00
Florian Bruhin
31af303d07 tox: Update pep8 to 1.7.
We're now ready for #1226, but this only updates pep8 for now.

Changes:

* Reverted the fix, "options passed on command line are only ones accepted"
feature. This has many unintended consequences in pep8 and flake8 and needs to
be reworked when I have more time.
* Added support for Python 3.5.
* Added support for multi-line config_file option parsing.
* Improved parameter parsing.

Bugs:

* Fixed BytesWarning on Python 3.
2016-01-18 07:40:42 +01:00
Florian Bruhin
e79e01fc97 tox: Update pylint/astroid to 1.5.4/1.4.4.
pylint:

* Merge StringMethodChecker with StringFormatChecker. This fixes a
  bug where disabling all the messages and enabling only a handful of
  messages from the StringFormatChecker would have resulted in no
  messages at all.

* Don't apply unneeded-not over sets.

astroid:

* unpack_infer raises InferenceError if it can't operate
  with the given sequences of nodes.

* Support accessing properties with super().

* Enforce strong updates per frames.

  When looking up a name in a scope, Scope.lookup will return
  only the values which will be reachable after execution, as seen
  in the following code:

       a = 1
       a = 2

  In this case it doesn't make sense to return two values, but
  only the last one.
2016-01-18 07:38:34 +01:00
Florian Bruhin
df98312f42 tox: Update pylint to 1.5.3.
* Handle the import fallback idiom with regard to wrong-import-order.

* Decouple the displaying of reports from the displaying of messages

  Some reporters are aggregating the messages instead of displaying
  them when they are available. The actual displaying was conflatted
  in the generate_reports. Unfortunately this behaviour was flaky
  and in the case of the JSON reporter, the messages weren't shown
  at all if a file had syntax errors or if it was missing.
  In order to fix this, the aggregated messages can now be
  displayed with Reporter.display_message, while the reports are
  displayed with display_reports.

* Ignore function calls with variadic arguments without a context.

  Inferring variadic positional arguments and keyword arguments
  will result into empty Tuples and Dicts, which can lead in
  some cases to false positives with regard to no-value-for-parameter.
  In order to avoid this, until we'll have support for call context
  propagation, we're ignoring such cases if detected.

* Treat AsyncFunctionDef just like FunctionDef nodes,
  by implementing visit_asyncfunctiondef in terms of
  visit_functiondef.

* Take in account kwonlyargs when verifying that arguments
  are defined with the check_docs extension.

* Suppress reporting 'unneeded-not' inside `__ne__` methods
2016-01-12 08:05:27 +01:00
Florian Bruhin
01ffd9f46f tox: Update hypothesis to 2.0.0.
2.0.0 - 2016-01-10
------------------

Codename: A new beginning

This release cleans up all of the legacy that accrued in the course of
Hypothesis 1.0. These are mostly things that were emitting deprecation warnings
in 1.19.0, but there were a few additional changes.

In particular:

- non-strategy values will no longer be converted to strategies when used in
  given or find.
- FailedHealthCheck is now an error and not a warning.
- Handling of non-ascii reprs in user types have been simplified by using raw
  strings in more places in Python 2.
- given no longer allows mixing positional and keyword arguments.
- given no longer works with functions with defaults.
- given no longer turns provided arguments into defaults - they will not appear
  in the argspec at all.
- the basic() strategy no longer exists.
- the n_ary_tree strategy no longer exists.
- the average_list_length setting no longer exists. Note: If you're using using
  recursive() this will cause you a significant slow down. You should pass
  explicit average_size parameters to collections in recursive calls.
- @rule can no longer be applied to the same method twice.
- Python 2.6 and 3.3 are no longer officially supported, although in practice
  they still work fine.

This also includes two non-deprecation changes:

- given's keyword arguments no longer have to be the rightmost arguments and
  can appear anywhere in the method signature.
- The max_shrinks setting would sometimes not have been respected.

1.19.0 - 2016-01-09
-------------------

Codename: IT COMES

This release heralds the beginning of a new and terrible age of Hypothesis 2.0.

It's primary purpose is some final deprecations prior to said release. The goal
is that if your code emits no warnings under this release then it will probably
run unchanged under Hypothesis 2.0 (there are some caveats to this: 2.0 will
drop support for some Python versions, and if you're using internal APIs then
as usual that may break without warning).

It does have two new features:

- New @seed() decorator which allows you to manually seed a test. This may be
  harmlessly combined with and overrides the derandomize setting.
- settings objects may now be used as a decorator to fix those settings to a
  particular @given test.

API changes (old usage still works but is deprecated):

- Settings has been renamed to settings (lower casing) in order to make the
  decorator usage more natural.
- Functions for the storage directory that were in hypothesis.settings are now
  in a new hypothesis.configuration module.

Additional deprecations:

- the average_list_length setting has been deprecated in favour of being
  explicit.
- the basic() strategy has been deprecated as it is impossible to support it
  under a Conjecture based model, which will hopefully be implemented at some
  point in the 2.x series.
- the n_ary_tree strategy (which was never actually part of the public API) has
  been deprecated.
- Passing settings or random as keyword arguments to given is deprecated (use
  the new functionality instead)

Bug fixes:

- No longer emit PendingDeprecationWarning for __iter__ and StopIteration in
  streaming() values.
- When running in health check mode with non strict, don't print quite so many
  errors for an exception in reify.
- When an assumption made in a test or a filter is flaky, tests will now raise
  Flaky instead of UnsatisfiedAssumption.
2016-01-10 21:42:57 +01:00
Florian Bruhin
60b04422a3 Replace pytest-sugar by pytest-instafail.
While pytest-sugar was nice to look at, it produced a lot of issues:

- Unusable on CI
- Unusable on OS X and Windows
- Garbage when terminal was resized during tests
- Missing space after test name since some while

This replaces it by pytest-instafail, which replaces the most important feature
of sugar, and on top of that, also works on CI.
2016-01-08 10:29:01 +01:00
Florian Bruhin
879725100f tox: Get rid of pytest-cache. 2016-01-08 10:29:01 +01:00
Florian Bruhin
a0a6b488e6 tox: Update pytest-qt to 1.11.0.
- New qt_wait_signal_raising ini option can be used to override the default
  value of the raising parameter of the qtbot.waitSignal and qtbot.waitSignals
  functions when omitted:

  Calls which explicitly pass the raising parameter are not affected.

- qtbot now has a new assertNotEmitted context manager which can be used to
  ensure the given signal is not emitted.
2016-01-08 09:38:29 +01:00
Florian Bruhin
7ed3edd00f tox: Add pytest-repeat.
Useful to track down flaky tests.
2016-01-07 21:03:48 +01:00
Florian Bruhin
b1b767ed96 tests: Don't start Xvfb for unittests-nodisp. 2016-01-06 08:36:40 +01:00
Florian Bruhin
4bae668294 tox: Update xvfbwrapper to 0.2.7.
Do not pass open file descriptors to Xvfb
2015-12-29 14:50:42 +01:00
Florian Bruhin
5f248abd7d tox: Update requests to 2.9.1.
Bugfixes

- Resolve regression introduced in 2.9.0 that made it impossible to send binary
  strings as bodies in Python 3.
- Fixed errors when calculating cookie expiration dates in certain locales.

Miscellaneous

- Updated bundled urllib3 to 1.13.1.
2015-12-29 14:47:42 +01:00
Florian Bruhin
2f51dae2b3 tox: Update hypothesis to 1.18.1.
- Hypothesis will no longer write generated code to the file system. This will
  improve performance on some systems (e.g. if you're using PythonAnywhere
  which is running your code from NFS) and prevent some annoying interactions
  with auto-restarting systems.

- Hypothesis will cache the creation of some strategies. This can significantly
  improve performance for code that uses flatmap or composite and thus has to
  instantiate strategies a lot.
2015-12-29 14:45:49 +01:00