Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Unreleased
- The Watchdog reloader ignores file closed no write events. :issue:`2945`
- Logging works with client addresses containing an IPv6 scope :issue:`2952`
- Ignore invalid authorization parameters. :issue:`2955`
- Improve type annotation fore ``SharedDataMiddleware``. :issue:`2958`


Version 3.0.4
Expand Down
5 changes: 3 additions & 2 deletions src/werkzeug/middleware/shared_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

from __future__ import annotations

import collections.abc as cabc
import importlib.util
import mimetypes
import os
Expand Down Expand Up @@ -103,7 +104,7 @@ def __init__(
self,
app: WSGIApplication,
exports: (
dict[str, str | tuple[str, str]]
cabc.Mapping[str, str | tuple[str, str]]
| t.Iterable[tuple[str, str | tuple[str, str]]]
),
disallow: None = None,
Expand All @@ -116,7 +117,7 @@ def __init__(
self.cache = cache
self.cache_timeout = cache_timeout

if isinstance(exports, dict):
if isinstance(exports, cabc.Mapping):
exports = exports.items()

for key, value in exports:
Expand Down