httpbin
=======
- Allow /redirect-to to work with multiple methods
- Allow MD5 or SHA-256 to be chosen as algorithms for HTTP Digest Auth
- Set a 10MB limit on /drip
Flask
=====
Version 0.11.1
--------------
Bugfix release, released on June 7th 2016.
- Fixed a bug that prevented ``FLASK_APP=foobar/__init__.py`` from
working.
Version 0.11
------------
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.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.
Version 0.10.2
--------------
(bugfix release, release date to be announced)
- Fixed broken `test_appcontext_signals()` test case.
- Raise an :exc:`AttributeError` in :func:`flask.helpers.find_package` with a
useful message explaining why it is raised when a PEP 302 import hook is used
without an `is_package()` method.
- Fixed an issue causing exceptions raised before entering a request or app
context to be passed to teardown handlers.
- Fixed an issue with query parameters getting removed from requests in
the test client when absolute URLs were requested.
- Made `@before_first_request` into a decorator as intended.
- Fixed an etags bug when sending a file streams with a name.
- Fixed `send_from_directory` not expanding to the application root path
correctly.
- Changed logic of before first request handlers to flip the flag after
invoking. This will allow some uses that are potentially dangerous but
should probably be permitted.
- Fixed Python 3 bug when a handler from `app.url_build_error_handlers`
reraises the `BuildError`.
- Prepare CLI options to pytest 3.0, to avoid a deprecation warning.
- Fix error due to missing CHANGES.rst when creating the source
distribution by adding a MANIFEST.in.
- Fixed regression causing spurious errors when xdist was used.
- Fixed DeprecationWarning about incorrect addoption use.
- Fixed deprecated use of funcarg fixture API.
- Try to import mock first instead of unittest.mock. This gives the user
flexibility to install a newer mock version from PyPI instead of using
the one available in the Python distribution.
- mock.sentinel is now aliased as mocker.sentinel for convenience.
See #1702.
Breaking Changes
With pytest-qt 2.0, we changed some defaults to values we think are much
better, however this required some backwards-incompatible changes:
- pytest-qt now defaults to using PyQt5 if PYTEST_QT_API is not set.
Before, it preferred PySide which is using the discontinued Qt4.
- Python 3 versions prior to 3.4 are no longer supported.
- The @pytest.mark.qt_log_ignore mark now defaults to extend=True, i.e.
extends the patterns defined in the config file rather than overriding
them. You can pass extend=False to get the old behaviour of overriding
the patterns.
- qtbot.waitSignal now defaults to raising=True and raises an exception
on timeouts. You can set qt_wait_signal_raising = false in your config
to get back the old behaviour.
- PYTEST_QT_FORCE_PYQT environment variable is no longer supported. Set
PYTEST_QT_API to the appropriate value instead or the new qt_api
configuration option in your pytest.ini file.
New Features
- From this version onward, pytest-qt is licensed under the MIT license.
- New qtmodeltester fixture to test QAbstractItemModel subclasses.
- waitSignal and waitSignals can receive an optional callback that can
evaluate if the arguments of emitted signals should resume execution
or not.
- Now which Qt binding pytest-qt will use can be configured by the
qt_api config option.
- While pytestqt.qt_compat is an internal module and shouldn't be
imported directly, it is known that some test suites did import it.
This module now uses a lazy-load mechanism to load Qt classes and
objects, so the old symbols (QtCore, QApplication, etc.) are no longer
available from it.
Other Changes
- Exceptions caught by pytest-qt in sys.excepthook are now also printed
to stderr, making debugging them easier from within an IDE.
Version 4.2
------------
- Since concurrency=multiprocessing uses subprocesses, options specified
on the coverage.py command line will not be communicated down to them.
Only options in the configuration file will apply to the subprocesses.
Previously, the options didn't apply to the subprocesses, but there
was no indication. Now it is an error to use
--concurrency=multiprocessing and other run-affecting options on the
command line. This prevents failures like those reported in issue 495.
- Filtering the HTML report is now faster, thanks to Ville Skyttä.
Version 4.2b1
-------------
Work from the PyCon 2016 Sprints!
- BACKWARD INCOMPATIBILITY: the coverage combine command now ignores an
existing .coverage data file. It used to include that file in its
combining. This caused confusing results, and extra tox "clean" steps.
If you want the old behavior, use the new coverage combine --append
option.
- The concurrency option can now take multiple values, to support
programs using multiprocessing and another library such as eventlet.
This is only possible in the configuration file, not from the command
line. The configuration file is the only way for sub-processes to all
run with the same options.
- Using a concurrency setting of multiprocessing now implies --parallel
so that the main program is measured similarly to the sub-processes.
- When using automatic subprocess measurement, running coverage commands
would create spurious data files. This is now fixed.
- A new configuration option, report:sort, controls what column of the
text report is used to sort the rows.
- The HTML report has a more-visible indicator for which column is being
sorted.
- If the HTML report cannot find the source for a file, the message now
suggests using the -i flag to allow the report to continue.
- When reports are ignoring errors, there's now a warning if a file
cannot be parsed, rather than being silently ignored.
- A new option for coverage debug is available: coverage debug config
shows the current configuration.
- Running coverage as a module (python -m coverage) no longer shows the
program name as __main__.py.
- The test_helpers module has been moved into a separate pip-installable
package: unittest-mixins.
Implement systemd's socket activation mechanism for CherryPy servers,
based on work sponsored by Endless Computers.
Socket Activation allows one to setup a system so that systemd will sit
on a port and start services 'on demand' (a little bit like inetd and
xinetd used to do).
7.0.0
-----
Removed the long-deprecated backward compatibility for
legacy config keys in the engine. Use the config for the
namespaced-plugins instead:
- autoreload_on -> autoreload.on
- autoreload_frequency -> autoreload.frequency
- autoreload_match -> autoreload.match
- reload_files -> autoreload.files
- deadlock_poll_frequency -> timeout_monitor.frequency
6.2.1
-----
Fix KeyError in Bus.publish when signal handlers set in config.
* Beautiful Soup is no longer compatible with Python 2.6. This
actually happened a few releases ago, but it's now official.
* Beautiful Soup will now work with versions of html5lib greater than
0.99999999.
* If a search against each individual value of a multi-valued
attribute fails, the search will be run one final time against the
complete attribute value considered as a single string. That is, if
a tag has class="foo bar" and neither "foo" nor "bar" matches, but
"foo bar" does, the tag is now considered a match.
This happened in previous versions, but only when the value being
searched for was a string. Now it also works when that value is
a regular expression, a list of strings, etc.
* Fixed a bug that deranged the tree when a whitespace element was
reparented into a tag that contained an identical whitespace
element.
* Added support for CSS selector values that contain quoted spaces,
such as tag[style="display: foo"].
* Corrected handling of XML processing instructions.
* Corrected an encoding error that happened when a BeautifulSoup
object was copied.
* The contents of <textarea> tags will no longer be modified when the
tree is prettified.
* When a BeautifulSoup object is pickled but its tree builder cannot
be pickled, its .builder attribute is set to None instead of being
destroyed. This avoids a performance problem once the object is
unpickled.
* Specify the file and line number when warning about a
BeautifulSoup object being instantiated without a parser being
specified.
* The `limit` argument to `select()` now works correctly, though it's
not implemented very efficiently.
* Fixed a Python 3 ByteWarning when a URL was passed in as though it
were markup. Thanks to James Salter for a patch and
test.
* We don't run the check for a filename passed in as markup if the
'filename' contains a less-than character; the less-than character
indicates it's most likely a very small document.
* Added tool to automatically convert request params based on type
annotations (primarily in Python 3). For example:
@cherrypy.tools.params()
def resource(self, limit: int):
assert isinstance(limit, int)
- Test functions defined using @given can now be called from other
threads
- Attempting to delete a settings property would previously have
silently done the wrong thing. Now it raises an AttributeError.
- Creating a settings object with a custom database_file parameter was
silently getting ignored and the default was being used instead. Now
it’s not.
On Windows when running two Hypothesis processes in parallel (e.g. using
pytest-xdist) they could race with each other and one would raise an
exception due to the non-atomic nature of file renaming on Windows and
the fact that you can't rename over an existing file. This is now fixed.
- Add support for specifying output location for html, xml, and annotate
report.
- Fix bug hiding test failure when cov-fail-under failed.
- For coverage >= 4.0, match the default behaviour of coverage report
and error if coverage fails to find the source instead of just
printing a warning.
- Fixed bug occurred when bare --cov parameter was used with xdist.
- Add support for skip_covered and added --cov-report=term-skip-covered
command line options.