We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Cannot import `secure_filename`
```python
In [1]: import werkzeug                                                                                                        

In [2]: werkzeug.secure_filename                                                                                               
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-1002393a11fd> in <module>
----> 1 werkzeug.secure_filename

~/pypath/werkzeug/__init__.py in __getattr__(self, name)
    186             module = __import__(object_origins[name], None, None, [name])
    187             for extra_name in all_by_module[module.__name__]:
--> 188                 setattr(self, extra_name, getattr(module, extra_name))
    189             return getattr(module, name)
    190         elif name in attribute_modules:

AttributeError: module 'werkzeug.utils' has no attribute 'dump_cookie'
```

My checkout is up-to-date as of today, 3454460b6231f9b690144f7706a246f78b485d9b

It looks like "dump_cookie" got moved to ".http" but wasn't updated in `__init__.py` of the module? Not sure.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/werkzeug/__init__.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """
3     werkzeug
4     ~~~~~~~~
5 
6     Werkzeug is the Swiss Army knife of Python web development.
7 
8     It provides useful classes and functions for any WSGI application to make
9     the life of a python web developer much easier.  All of the provided
10     classes are independent from each other so you can mix it with any other
11     library.
12 
13 
14     :copyright: 2007 Pallets
15     :license: BSD-3-Clause
16 """
17 import sys
18 from types import ModuleType
19 
20 __version__ = "1.0.0.dev0"
21 
22 # This import magic raises concerns quite often which is why the implementation
23 # and motivation is explained here in detail now.
24 #
25 # The majority of the functions and classes provided by Werkzeug work on the
26 # HTTP and WSGI layer.  There is no useful grouping for those which is why
27 # they are all importable from "werkzeug" instead of the modules where they are
28 # implemented.  The downside of that is, that now everything would be loaded at
29 # once, even if unused.
30 #
31 # The implementation of a lazy-loading module in this file replaces the
32 # werkzeug package when imported from within.  Attribute access to the werkzeug
33 # module will then lazily import from the modules that implement the objects.
34 
35 # import mapping to objects in other modules
36 all_by_module = {
37     "werkzeug.debug": ["DebuggedApplication"],
38     "werkzeug.local": [
39         "Local",
40         "LocalManager",
41         "LocalProxy",
42         "LocalStack",
43         "release_local",
44     ],
45     "werkzeug.serving": ["run_simple"],
46     "werkzeug.test": ["Client", "EnvironBuilder", "create_environ", "run_wsgi_app"],
47     "werkzeug.testapp": ["test_app"],
48     "werkzeug.exceptions": ["abort", "Aborter"],
49     "werkzeug.urls": [
50         "url_decode",
51         "url_encode",
52         "url_quote",
53         "url_quote_plus",
54         "url_unquote",
55         "url_unquote_plus",
56         "url_fix",
57         "Href",
58         "iri_to_uri",
59         "uri_to_iri",
60     ],
61     "werkzeug.formparser": ["parse_form_data"],
62     "werkzeug.utils": [
63         "escape",
64         "environ_property",
65         "append_slash_redirect",
66         "redirect",
67         "cached_property",
68         "import_string",
69         "dump_cookie",
70         "parse_cookie",
71         "unescape",
72         "format_string",
73         "find_modules",
74         "header_property",
75         "html",
76         "xhtml",
77         "HTMLBuilder",
78         "validate_arguments",
79         "ArgumentValidationError",
80         "bind_arguments",
81         "secure_filename",
82     ],
83     "werkzeug.wsgi": [
84         "get_current_url",
85         "get_host",
86         "pop_path_info",
87         "peek_path_info",
88         "ClosingIterator",
89         "FileWrapper",
90         "make_line_iter",
91         "LimitedStream",
92         "responder",
93         "wrap_file",
94         "extract_path_info",
95     ],
96     "werkzeug.datastructures": [
97         "MultiDict",
98         "CombinedMultiDict",
99         "Headers",
100         "EnvironHeaders",
101         "ImmutableList",
102         "ImmutableDict",
103         "ImmutableMultiDict",
104         "TypeConversionDict",
105         "ImmutableTypeConversionDict",
106         "Accept",
107         "MIMEAccept",
108         "CharsetAccept",
109         "LanguageAccept",
110         "RequestCacheControl",
111         "ResponseCacheControl",
112         "ETags",
113         "HeaderSet",
114         "WWWAuthenticate",
115         "Authorization",
116         "FileMultiDict",
117         "CallbackDict",
118         "FileStorage",
119         "OrderedMultiDict",
120         "ImmutableOrderedMultiDict",
121     ],
122     "werkzeug.useragents": ["UserAgent"],
123     "werkzeug.http": [
124         "parse_etags",
125         "parse_date",
126         "http_date",
127         "cookie_date",
128         "parse_cache_control_header",
129         "is_resource_modified",
130         "parse_accept_header",
131         "parse_set_header",
132         "quote_etag",
133         "unquote_etag",
134         "generate_etag",
135         "dump_header",
136         "parse_list_header",
137         "parse_dict_header",
138         "parse_authorization_header",
139         "parse_www_authenticate_header",
140         "remove_entity_headers",
141         "is_entity_header",
142         "remove_hop_by_hop_headers",
143         "parse_options_header",
144         "dump_options_header",
145         "is_hop_by_hop_header",
146         "unquote_header_value",
147         "quote_header_value",
148         "HTTP_STATUS_CODES",
149     ],
150     "werkzeug.wrappers": [
151         "BaseResponse",
152         "BaseRequest",
153         "Request",
154         "Response",
155         "AcceptMixin",
156         "ETagRequestMixin",
157         "ETagResponseMixin",
158         "ResponseStreamMixin",
159         "CommonResponseDescriptorsMixin",
160         "UserAgentMixin",
161         "AuthorizationMixin",
162         "WWWAuthenticateMixin",
163         "CommonRequestDescriptorsMixin",
164     ],
165     "werkzeug.middleware.dispatcher": ["DispatcherMiddleware"],
166     "werkzeug.middleware.shared_data": ["SharedDataMiddleware"],
167     "werkzeug.security": ["generate_password_hash", "check_password_hash"],
168     # the undocumented easteregg ;-)
169     "werkzeug._internal": ["_easteregg"],
170 }
171 
172 # modules that should be imported when accessed as attributes of werkzeug
173 attribute_modules = frozenset(["exceptions", "routing"])
174 
175 object_origins = {}
176 for module, items in all_by_module.items():
177     for item in items:
178         object_origins[item] = module
179 
180 
181 class module(ModuleType):
182     """Automatically import objects from the modules."""
183 
184     def __getattr__(self, name):
185         if name in object_origins:
186             module = __import__(object_origins[name], None, None, [name])
187             for extra_name in all_by_module[module.__name__]:
188                 setattr(self, extra_name, getattr(module, extra_name))
189             return getattr(module, name)
190         elif name in attribute_modules:
191             __import__("werkzeug." + name)
192         return ModuleType.__getattribute__(self, name)
193 
194     def __dir__(self):
195         """Just show what we want to show."""
196         result = list(new_module.__all__)
197         result.extend(
198             (
199                 "__file__",
200                 "__doc__",
201                 "__all__",
202                 "__docformat__",
203                 "__name__",
204                 "__path__",
205                 "__package__",
206                 "__version__",
207             )
208         )
209         return result
210 
211 
212 # keep a reference to this module so that it's not garbage collected
213 old_module = sys.modules["werkzeug"]
214 
215 
216 # setup the new module and patch it into the dict of loaded modules
217 new_module = sys.modules["werkzeug"] = module("werkzeug")
218 new_module.__dict__.update(
219     {
220         "__file__": __file__,
221         "__package__": "werkzeug",
222         "__path__": __path__,
223         "__doc__": __doc__,
224         "__version__": __version__,
225         "__all__": tuple(object_origins) + tuple(attribute_modules),
226         "__docformat__": "restructuredtext en",
227     }
228 )
229 
230 
231 # Due to bootstrapping issues we need to import exceptions here.
232 # Don't ask :-(
233 __import__("werkzeug.exceptions")
234
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/src/werkzeug/__init__.py b/src/werkzeug/__init__.py
--- a/src/werkzeug/__init__.py
+++ b/src/werkzeug/__init__.py
@@ -66,8 +66,6 @@
         "redirect",
         "cached_property",
         "import_string",
-        "dump_cookie",
-        "parse_cookie",
         "unescape",
         "format_string",
         "find_modules",
@@ -146,6 +144,8 @@
         "unquote_header_value",
         "quote_header_value",
         "HTTP_STATUS_CODES",
+        "dump_cookie",
+        "parse_cookie",
     ],
     "werkzeug.wrappers": [
         "BaseResponse",

{"golden_diff": "diff --git a/src/werkzeug/__init__.py b/src/werkzeug/__init__.py\n--- a/src/werkzeug/__init__.py\n+++ b/src/werkzeug/__init__.py\n@@ -66,8 +66,6 @@\n         \"redirect\",\n         \"cached_property\",\n         \"import_string\",\n-        \"dump_cookie\",\n-        \"parse_cookie\",\n         \"unescape\",\n         \"format_string\",\n         \"find_modules\",\n@@ -146,6 +144,8 @@\n         \"unquote_header_value\",\n         \"quote_header_value\",\n         \"HTTP_STATUS_CODES\",\n+        \"dump_cookie\",\n+        \"parse_cookie\",\n     ],\n     \"werkzeug.wrappers\": [\n         \"BaseResponse\",\n", "issue": "Cannot import `secure_filename`\n```python\r\nIn [1]: import werkzeug                                                                                                        \r\n\r\nIn [2]: werkzeug.secure_filename                                                                                               \r\n---------------------------------------------------------------------------\r\nAttributeError                            Traceback (most recent call last)\r\n<ipython-input-2-1002393a11fd> in <module>\r\n----> 1 werkzeug.secure_filename\r\n\r\n~/pypath/werkzeug/__init__.py in __getattr__(self, name)\r\n    186             module = __import__(object_origins[name], None, None, [name])\r\n    187             for extra_name in all_by_module[module.__name__]:\r\n--> 188                 setattr(self, extra_name, getattr(module, extra_name))\r\n    189             return getattr(module, name)\r\n    190         elif name in attribute_modules:\r\n\r\nAttributeError: module 'werkzeug.utils' has no attribute 'dump_cookie'\r\n```\r\n\r\nMy checkout is up-to-date as of today, 3454460b6231f9b690144f7706a246f78b485d9b\r\n\r\nIt looks like \"dump_cookie\" got moved to \".http\" but wasn't updated in `__init__.py` of the module? Not sure.\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\n    werkzeug\n    ~~~~~~~~\n\n    Werkzeug is the Swiss Army knife of Python web development.\n\n    It provides useful classes and functions for any WSGI application to make\n    the life of a python web developer much easier.  All of the provided\n    classes are independent from each other so you can mix it with any other\n    library.\n\n\n    :copyright: 2007 Pallets\n    :license: BSD-3-Clause\n\"\"\"\nimport sys\nfrom types import ModuleType\n\n__version__ = \"1.0.0.dev0\"\n\n# This import magic raises concerns quite often which is why the implementation\n# and motivation is explained here in detail now.\n#\n# The majority of the functions and classes provided by Werkzeug work on the\n# HTTP and WSGI layer.  There is no useful grouping for those which is why\n# they are all importable from \"werkzeug\" instead of the modules where they are\n# implemented.  The downside of that is, that now everything would be loaded at\n# once, even if unused.\n#\n# The implementation of a lazy-loading module in this file replaces the\n# werkzeug package when imported from within.  Attribute access to the werkzeug\n# module will then lazily import from the modules that implement the objects.\n\n# import mapping to objects in other modules\nall_by_module = {\n    \"werkzeug.debug\": [\"DebuggedApplication\"],\n    \"werkzeug.local\": [\n        \"Local\",\n        \"LocalManager\",\n        \"LocalProxy\",\n        \"LocalStack\",\n        \"release_local\",\n    ],\n    \"werkzeug.serving\": [\"run_simple\"],\n    \"werkzeug.test\": [\"Client\", \"EnvironBuilder\", \"create_environ\", \"run_wsgi_app\"],\n    \"werkzeug.testapp\": [\"test_app\"],\n    \"werkzeug.exceptions\": [\"abort\", \"Aborter\"],\n    \"werkzeug.urls\": [\n        \"url_decode\",\n        \"url_encode\",\n        \"url_quote\",\n        \"url_quote_plus\",\n        \"url_unquote\",\n        \"url_unquote_plus\",\n        \"url_fix\",\n        \"Href\",\n        \"iri_to_uri\",\n        \"uri_to_iri\",\n    ],\n    \"werkzeug.formparser\": [\"parse_form_data\"],\n    \"werkzeug.utils\": [\n        \"escape\",\n        \"environ_property\",\n        \"append_slash_redirect\",\n        \"redirect\",\n        \"cached_property\",\n        \"import_string\",\n        \"dump_cookie\",\n        \"parse_cookie\",\n        \"unescape\",\n        \"format_string\",\n        \"find_modules\",\n        \"header_property\",\n        \"html\",\n        \"xhtml\",\n        \"HTMLBuilder\",\n        \"validate_arguments\",\n        \"ArgumentValidationError\",\n        \"bind_arguments\",\n        \"secure_filename\",\n    ],\n    \"werkzeug.wsgi\": [\n        \"get_current_url\",\n        \"get_host\",\n        \"pop_path_info\",\n        \"peek_path_info\",\n        \"ClosingIterator\",\n        \"FileWrapper\",\n        \"make_line_iter\",\n        \"LimitedStream\",\n        \"responder\",\n        \"wrap_file\",\n        \"extract_path_info\",\n    ],\n    \"werkzeug.datastructures\": [\n        \"MultiDict\",\n        \"CombinedMultiDict\",\n        \"Headers\",\n        \"EnvironHeaders\",\n        \"ImmutableList\",\n        \"ImmutableDict\",\n        \"ImmutableMultiDict\",\n        \"TypeConversionDict\",\n        \"ImmutableTypeConversionDict\",\n        \"Accept\",\n        \"MIMEAccept\",\n        \"CharsetAccept\",\n        \"LanguageAccept\",\n        \"RequestCacheControl\",\n        \"ResponseCacheControl\",\n        \"ETags\",\n        \"HeaderSet\",\n        \"WWWAuthenticate\",\n        \"Authorization\",\n        \"FileMultiDict\",\n        \"CallbackDict\",\n        \"FileStorage\",\n        \"OrderedMultiDict\",\n        \"ImmutableOrderedMultiDict\",\n    ],\n    \"werkzeug.useragents\": [\"UserAgent\"],\n    \"werkzeug.http\": [\n        \"parse_etags\",\n        \"parse_date\",\n        \"http_date\",\n        \"cookie_date\",\n        \"parse_cache_control_header\",\n        \"is_resource_modified\",\n        \"parse_accept_header\",\n        \"parse_set_header\",\n        \"quote_etag\",\n        \"unquote_etag\",\n        \"generate_etag\",\n        \"dump_header\",\n        \"parse_list_header\",\n        \"parse_dict_header\",\n        \"parse_authorization_header\",\n        \"parse_www_authenticate_header\",\n        \"remove_entity_headers\",\n        \"is_entity_header\",\n        \"remove_hop_by_hop_headers\",\n        \"parse_options_header\",\n        \"dump_options_header\",\n        \"is_hop_by_hop_header\",\n        \"unquote_header_value\",\n        \"quote_header_value\",\n        \"HTTP_STATUS_CODES\",\n    ],\n    \"werkzeug.wrappers\": [\n        \"BaseResponse\",\n        \"BaseRequest\",\n        \"Request\",\n        \"Response\",\n        \"AcceptMixin\",\n        \"ETagRequestMixin\",\n        \"ETagResponseMixin\",\n        \"ResponseStreamMixin\",\n        \"CommonResponseDescriptorsMixin\",\n        \"UserAgentMixin\",\n        \"AuthorizationMixin\",\n        \"WWWAuthenticateMixin\",\n        \"CommonRequestDescriptorsMixin\",\n    ],\n    \"werkzeug.middleware.dispatcher\": [\"DispatcherMiddleware\"],\n    \"werkzeug.middleware.shared_data\": [\"SharedDataMiddleware\"],\n    \"werkzeug.security\": [\"generate_password_hash\", \"check_password_hash\"],\n    # the undocumented easteregg ;-)\n    \"werkzeug._internal\": [\"_easteregg\"],\n}\n\n# modules that should be imported when accessed as attributes of werkzeug\nattribute_modules = frozenset([\"exceptions\", \"routing\"])\n\nobject_origins = {}\nfor module, items in all_by_module.items():\n    for item in items:\n        object_origins[item] = module\n\n\nclass module(ModuleType):\n    \"\"\"Automatically import objects from the modules.\"\"\"\n\n    def __getattr__(self, name):\n        if name in object_origins:\n            module = __import__(object_origins[name], None, None, [name])\n            for extra_name in all_by_module[module.__name__]:\n                setattr(self, extra_name, getattr(module, extra_name))\n            return getattr(module, name)\n        elif name in attribute_modules:\n            __import__(\"werkzeug.\" + name)\n        return ModuleType.__getattribute__(self, name)\n\n    def __dir__(self):\n        \"\"\"Just show what we want to show.\"\"\"\n        result = list(new_module.__all__)\n        result.extend(\n            (\n                \"__file__\",\n                \"__doc__\",\n                \"__all__\",\n                \"__docformat__\",\n                \"__name__\",\n                \"__path__\",\n                \"__package__\",\n                \"__version__\",\n            )\n        )\n        return result\n\n\n# keep a reference to this module so that it's not garbage collected\nold_module = sys.modules[\"werkzeug\"]\n\n\n# setup the new module and patch it into the dict of loaded modules\nnew_module = sys.modules[\"werkzeug\"] = module(\"werkzeug\")\nnew_module.__dict__.update(\n    {\n        \"__file__\": __file__,\n        \"__package__\": \"werkzeug\",\n        \"__path__\": __path__,\n        \"__doc__\": __doc__,\n        \"__version__\": __version__,\n        \"__all__\": tuple(object_origins) + tuple(attribute_modules),\n        \"__docformat__\": \"restructuredtext en\",\n    }\n)\n\n\n# Due to bootstrapping issues we need to import exceptions here.\n# Don't ask :-(\n__import__(\"werkzeug.exceptions\")\n", "path": "src/werkzeug/__init__.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\n    werkzeug\n    ~~~~~~~~\n\n    Werkzeug is the Swiss Army knife of Python web development.\n\n    It provides useful classes and functions for any WSGI application to make\n    the life of a python web developer much easier.  All of the provided\n    classes are independent from each other so you can mix it with any other\n    library.\n\n\n    :copyright: 2007 Pallets\n    :license: BSD-3-Clause\n\"\"\"\nimport sys\nfrom types import ModuleType\n\n__version__ = \"1.0.0.dev0\"\n\n# This import magic raises concerns quite often which is why the implementation\n# and motivation is explained here in detail now.\n#\n# The majority of the functions and classes provided by Werkzeug work on the\n# HTTP and WSGI layer.  There is no useful grouping for those which is why\n# they are all importable from \"werkzeug\" instead of the modules where they are\n# implemented.  The downside of that is, that now everything would be loaded at\n# once, even if unused.\n#\n# The implementation of a lazy-loading module in this file replaces the\n# werkzeug package when imported from within.  Attribute access to the werkzeug\n# module will then lazily import from the modules that implement the objects.\n\n# import mapping to objects in other modules\nall_by_module = {\n    \"werkzeug.debug\": [\"DebuggedApplication\"],\n    \"werkzeug.local\": [\n        \"Local\",\n        \"LocalManager\",\n        \"LocalProxy\",\n        \"LocalStack\",\n        \"release_local\",\n    ],\n    \"werkzeug.serving\": [\"run_simple\"],\n    \"werkzeug.test\": [\"Client\", \"EnvironBuilder\", \"create_environ\", \"run_wsgi_app\"],\n    \"werkzeug.testapp\": [\"test_app\"],\n    \"werkzeug.exceptions\": [\"abort\", \"Aborter\"],\n    \"werkzeug.urls\": [\n        \"url_decode\",\n        \"url_encode\",\n        \"url_quote\",\n        \"url_quote_plus\",\n        \"url_unquote\",\n        \"url_unquote_plus\",\n        \"url_fix\",\n        \"Href\",\n        \"iri_to_uri\",\n        \"uri_to_iri\",\n    ],\n    \"werkzeug.formparser\": [\"parse_form_data\"],\n    \"werkzeug.utils\": [\n        \"escape\",\n        \"environ_property\",\n        \"append_slash_redirect\",\n        \"redirect\",\n        \"cached_property\",\n        \"import_string\",\n        \"unescape\",\n        \"format_string\",\n        \"find_modules\",\n        \"header_property\",\n        \"html\",\n        \"xhtml\",\n        \"HTMLBuilder\",\n        \"validate_arguments\",\n        \"ArgumentValidationError\",\n        \"bind_arguments\",\n        \"secure_filename\",\n    ],\n    \"werkzeug.wsgi\": [\n        \"get_current_url\",\n        \"get_host\",\n        \"pop_path_info\",\n        \"peek_path_info\",\n        \"ClosingIterator\",\n        \"FileWrapper\",\n        \"make_line_iter\",\n        \"LimitedStream\",\n        \"responder\",\n        \"wrap_file\",\n        \"extract_path_info\",\n    ],\n    \"werkzeug.datastructures\": [\n        \"MultiDict\",\n        \"CombinedMultiDict\",\n        \"Headers\",\n        \"EnvironHeaders\",\n        \"ImmutableList\",\n        \"ImmutableDict\",\n        \"ImmutableMultiDict\",\n        \"TypeConversionDict\",\n        \"ImmutableTypeConversionDict\",\n        \"Accept\",\n        \"MIMEAccept\",\n        \"CharsetAccept\",\n        \"LanguageAccept\",\n        \"RequestCacheControl\",\n        \"ResponseCacheControl\",\n        \"ETags\",\n        \"HeaderSet\",\n        \"WWWAuthenticate\",\n        \"Authorization\",\n        \"FileMultiDict\",\n        \"CallbackDict\",\n        \"FileStorage\",\n        \"OrderedMultiDict\",\n        \"ImmutableOrderedMultiDict\",\n    ],\n    \"werkzeug.useragents\": [\"UserAgent\"],\n    \"werkzeug.http\": [\n        \"parse_etags\",\n        \"parse_date\",\n        \"http_date\",\n        \"cookie_date\",\n        \"parse_cache_control_header\",\n        \"is_resource_modified\",\n        \"parse_accept_header\",\n        \"parse_set_header\",\n        \"quote_etag\",\n        \"unquote_etag\",\n        \"generate_etag\",\n        \"dump_header\",\n        \"parse_list_header\",\n        \"parse_dict_header\",\n        \"parse_authorization_header\",\n        \"parse_www_authenticate_header\",\n        \"remove_entity_headers\",\n        \"is_entity_header\",\n        \"remove_hop_by_hop_headers\",\n        \"parse_options_header\",\n        \"dump_options_header\",\n        \"is_hop_by_hop_header\",\n        \"unquote_header_value\",\n        \"quote_header_value\",\n        \"HTTP_STATUS_CODES\",\n        \"dump_cookie\",\n        \"parse_cookie\",\n    ],\n    \"werkzeug.wrappers\": [\n        \"BaseResponse\",\n        \"BaseRequest\",\n        \"Request\",\n        \"Response\",\n        \"AcceptMixin\",\n        \"ETagRequestMixin\",\n        \"ETagResponseMixin\",\n        \"ResponseStreamMixin\",\n        \"CommonResponseDescriptorsMixin\",\n        \"UserAgentMixin\",\n        \"AuthorizationMixin\",\n        \"WWWAuthenticateMixin\",\n        \"CommonRequestDescriptorsMixin\",\n    ],\n    \"werkzeug.middleware.dispatcher\": [\"DispatcherMiddleware\"],\n    \"werkzeug.middleware.shared_data\": [\"SharedDataMiddleware\"],\n    \"werkzeug.security\": [\"generate_password_hash\", \"check_password_hash\"],\n    # the undocumented easteregg ;-)\n    \"werkzeug._internal\": [\"_easteregg\"],\n}\n\n# modules that should be imported when accessed as attributes of werkzeug\nattribute_modules = frozenset([\"exceptions\", \"routing\"])\n\nobject_origins = {}\nfor module, items in all_by_module.items():\n    for item in items:\n        object_origins[item] = module\n\n\nclass module(ModuleType):\n    \"\"\"Automatically import objects from the modules.\"\"\"\n\n    def __getattr__(self, name):\n        if name in object_origins:\n            module = __import__(object_origins[name], None, None, [name])\n            for extra_name in all_by_module[module.__name__]:\n                setattr(self, extra_name, getattr(module, extra_name))\n            return getattr(module, name)\n        elif name in attribute_modules:\n            __import__(\"werkzeug.\" + name)\n        return ModuleType.__getattribute__(self, name)\n\n    def __dir__(self):\n        \"\"\"Just show what we want to show.\"\"\"\n        result = list(new_module.__all__)\n        result.extend(\n            (\n                \"__file__\",\n                \"__doc__\",\n                \"__all__\",\n                \"__docformat__\",\n                \"__name__\",\n                \"__path__\",\n                \"__package__\",\n                \"__version__\",\n            )\n        )\n        return result\n\n\n# keep a reference to this module so that it's not garbage collected\nold_module = sys.modules[\"werkzeug\"]\n\n\n# setup the new module and patch it into the dict of loaded modules\nnew_module = sys.modules[\"werkzeug\"] = module(\"werkzeug\")\nnew_module.__dict__.update(\n    {\n        \"__file__\": __file__,\n        \"__package__\": \"werkzeug\",\n        \"__path__\": __path__,\n        \"__doc__\": __doc__,\n        \"__version__\": __version__,\n        \"__all__\": tuple(object_origins) + tuple(attribute_modules),\n        \"__docformat__\": \"restructuredtext en\",\n    }\n)\n\n\n# Due to bootstrapping issues we need to import exceptions here.\n# Don't ask :-(\n__import__(\"werkzeug.exceptions\")\n", "path": "src/werkzeug/__init__.py"}]}