Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/werkzeug/__init__.py: 69%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

13 statements  

1from __future__ import annotations 

2 

3import typing as t 

4 

5from .serving import run_simple as run_simple 

6from .test import Client as Client 

7from .wrappers import Request as Request 

8from .wrappers import Response as Response 

9 

10 

11def __getattr__(name: str) -> t.Any: 

12 if name == "__version__": 

13 import importlib.metadata 

14 import warnings 

15 

16 warnings.warn( 

17 "The '__version__' attribute is deprecated and will be removed in" 

18 " Werkzeug 3.1. Use feature detection or" 

19 " 'importlib.metadata.version(\"werkzeug\")' instead.", 

20 DeprecationWarning, 

21 stacklevel=2, 

22 ) 

23 return importlib.metadata.version("werkzeug") 

24 

25 raise AttributeError(name)