Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/werkzeug/datastructures/__init__.py: 87%

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

45 statements  

1from __future__ import annotations 

2 

3import typing as t 

4 

5from .accept import Accept as Accept 

6from .accept import CharsetAccept as CharsetAccept 

7from .accept import LanguageAccept as LanguageAccept 

8from .accept import MIMEAccept as MIMEAccept 

9from .auth import Authorization as Authorization 

10from .auth import WWWAuthenticate as WWWAuthenticate 

11from .cache_control import RequestCacheControl as RequestCacheControl 

12from .cache_control import ResponseCacheControl as ResponseCacheControl 

13from .csp import ContentSecurityPolicy as ContentSecurityPolicy 

14from .etag import ETags as ETags 

15from .file_storage import FileMultiDict as FileMultiDict 

16from .file_storage import FileStorage as FileStorage 

17from .headers import EnvironHeaders as EnvironHeaders 

18from .headers import Headers as Headers 

19from .mixins import ImmutableDictMixin as ImmutableDictMixin 

20from .mixins import ImmutableHeadersMixin as ImmutableHeadersMixin 

21from .mixins import ImmutableListMixin as ImmutableListMixin 

22from .mixins import ImmutableMultiDictMixin as ImmutableMultiDictMixin 

23from .mixins import UpdateDictMixin as UpdateDictMixin 

24from .range import ContentRange as ContentRange 

25from .range import IfRange as IfRange 

26from .range import Range as Range 

27from .structures import CallbackDict as CallbackDict 

28from .structures import CombinedMultiDict as CombinedMultiDict 

29from .structures import HeaderSet as HeaderSet 

30from .structures import ImmutableDict as ImmutableDict 

31from .structures import ImmutableList as ImmutableList 

32from .structures import ImmutableMultiDict as ImmutableMultiDict 

33from .structures import ImmutableTypeConversionDict as ImmutableTypeConversionDict 

34from .structures import iter_multi_items as iter_multi_items 

35from .structures import MultiDict as MultiDict 

36from .structures import TypeConversionDict as TypeConversionDict 

37 

38 

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

40 import warnings 

41 

42 if name == "OrderedMultiDict": 

43 from .structures import _OrderedMultiDict 

44 

45 warnings.warn( 

46 "'OrderedMultiDict' is deprecated and will be removed in Werkzeug" 

47 " 3.2. Use 'MultiDict' instead.", 

48 DeprecationWarning, 

49 stacklevel=2, 

50 ) 

51 return _OrderedMultiDict 

52 

53 if name == "ImmutableOrderedMultiDict": 

54 from .structures import _ImmutableOrderedMultiDict 

55 

56 warnings.warn( 

57 "'OrderedMultiDict' is deprecated and will be removed in Werkzeug" 

58 " 3.2. Use 'ImmutableMultiDict' instead.", 

59 DeprecationWarning, 

60 stacklevel=2, 

61 ) 

62 return _ImmutableOrderedMultiDict 

63 

64 raise AttributeError(name)