Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ProfilerMiddleware filename_format for floats #1539

Merged
merged 1 commit into from May 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions CHANGES.rst
Expand Up @@ -7,12 +7,15 @@ Unreleased

- Properly handle multi-line header folding in development server in
Python 2.7. (:issue:`1080`)
- Restore the ``response`` argument to :exc:`exceptions.Unauthorized`.
- Restore the ``response`` argument to :exc:`~exceptions.Unauthorized`.
(:pr:`1527`)
- :exc:`exceptions.Unauthorized` doesn't add the ``WWW-Authenticate``
- :exc:`~exceptions.Unauthorized` doesn't add the ``WWW-Authenticate``
header if ``www_authenticate`` is not given. (:issue:`1516`)
- The default URL converter correctly encodes bytes to string rather
than representing them with ``b''``. (:issue:`1502`)
- Fix the filename format string in
:class:`~middleware.profiler.ProfilerMiddleware` to correctly handle
float values. (:issue:`1511`)


Version 0.15.2
Expand Down
2 changes: 1 addition & 1 deletion src/werkzeug/middleware/profiler.py
Expand Up @@ -77,7 +77,7 @@ def __init__(
sort_by=("time", "calls"),
restrictions=(),
profile_dir=None,
filename_format="{method}.{path}.{elapsed:06d}ms.{time:d}.prof",
filename_format="{method}.{path}.{elapsed:.0f}ms.{time:.0f}.prof",
):
self._app = app
self._stream = stream
Expand Down