- Remove duplication from the environment section
- Dropped support for Python 3.2
- Indicated setup and teardown in report
- Fixed colour of errors in report
- Fix version parsing of py.test to work with py.test release candidates
- More general handling of the health check problem where things could fail
because of a cache miss - now one "free" example is generated before the start
of the health check run.
- Fix a bug where Hypothesis would error when running on Python 2.7.3 or earlier
because it was trying to pass a bytearray object to struct.unpack (which is
only supported since 2.7.4).
We used to use flake8-pep257 because docstrings claims no codes are ignorable
(which is wrong). However, that doesn't work with pydocstyle, so we had a
separate pydocstyle environment (and flake8-pep257 to check tests with relaxed
rules).
Now we only use flake8-docstrings + pydocstyle (which it switches to if it's
available, even though it still depends on pep257), and drop the pydocstyle tox
env.
As soon as flake8-docstrings is updated to drop the (unneeded) pep257
dependency, we can drop it as well.
This means we can now run things like running pylint --version without having
to set PYTHONPATH correctly now.
When using skip_install=true, the plugins wouldn't work as they need to import
qutebrowser.
We have to keep setting PYTHONPATH in run_pylint_on_tests.py, otherwise we get
this error I don't quite understand:
F: 1, 0: error while code parsing: Unable to load file
'/home/florian/proj/qutebrowser/git/__init__.py' ([Errno 2] No such
file or directory: '...') (parse-error)
(3.0.2: performance fix)
------------------
3.0.1 - 2016-02-18
------------------
* Fix a case where it was possible to trigger an "Unreachable" assertion when
running certain flaky stateful tests.
* Improve shrinking of large stateful tests by eliminating a case where it was
hard to delete early steps.
* Improve efficiency of drawing binary(min_size=n, max_size=n) significantly by
provide a custom implementation for fixed size blocks that can bypass a lot
of machinery.
* Set default home directory based on the current working directory at the
point Hypothesis is imported, not whenever the function first happens to be
called.
------------------
3.0.0 - 2016-02-17
------------------
Codename: This really should have been 2.1.
Externally this looks like a very small release. It has one small breaking change
that probably doesn't affect anyone at all (some behaviour that never really worked
correctly is now outright forbidden) but necessitated a major version bump and one
visible new feature.
Internally this is a complete rewrite. Almost nothing other than the public API is
the same.
New features:
* Addition of data() strategy which allows you to draw arbitrary data interactively
within the test.
* New "exploded" database format which allows you to more easily check the example
database into a source repository while supporting merging.
* Better management of how examples are saved in the database.
* Health checks will now raise as errors when they fail. It was too easy to have
the warnings be swallowed entirely.
New limitations:
* choices and streaming strategies may no longer be used with find(). Neither may
data() (this is the change that necessitated a major version bump).
Feature removal:
* The ForkingTestCase executor has gone away. It may return in some more working
form at a later date.
Performance improvements:
* A new model which allows flatmap, composite strategies and stateful testing to
perform *much* better. They should also be more reliable.
* Filtering may in some circumstances have improved significantly. This will
help especially in cases where you have lots of values with individual filters
on them, such as lists(x.filter(...)).
* Modest performance improvements to the general test runner by avoiding expensive
operations
In general your tests should have got faster. If they've instead got significantly
slower, I'm interested in hearing about it.
Data distribution:
The data distribution should have changed significantly. This may uncover bugs the
previous version missed. It may also miss bugs the previous version could have
uncovered. Hypothesis is now producing less strongly correlated data than it used
to, but the correlations are extended over more of the structure.
Shrinking:
Shrinking quality should have improved. In particular Hypothesis can now perform
simultaneous shrinking of separate examples within a single test (previously it
was only able to do this for elements of a single collection). In some cases
performance will have improved, in some cases it will have got worse but generally
shouldn't have by much.
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.
* 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.
- 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
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.
- 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.
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
- 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.
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.
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.
* 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
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.
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.