Skip to content

Commit

Permalink
Merge pull request #1539 from pallets/profiler-format
Browse files Browse the repository at this point in the history
Fix ProfilerMiddleware filename_format for floats
  • Loading branch information
davidism authored May 12, 2019
2 parents 3f7a5dd + 0388fc9 commit d590cc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions CHANGES.rst
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit d590cc7

Please sign in to comment.