Skip to content

Commit 0388fc9

Browse files
lidayandavidism
authored andcommitted
update filename_format for ProfilerMiddleware.
1 parent 3f7a5dd commit 0388fc9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGES.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ Unreleased
77

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

1720

1821
Version 0.15.2

src/werkzeug/middleware/profiler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(
7777
sort_by=("time", "calls"),
7878
restrictions=(),
7979
profile_dir=None,
80-
filename_format="{method}.{path}.{elapsed:06d}ms.{time:d}.prof",
80+
filename_format="{method}.{path}.{elapsed:.0f}ms.{time:.0f}.prof",
8181
):
8282
self._app = app
8383
self._stream = stream

0 commit comments

Comments
 (0)