1# SPDX-License-Identifier: MIT

2

3 import sys

4 import warnings

5

6 from functools import partial

7

8 from . import converters, exceptions, filters, setters, validators

9 from ._cmp import cmp_using

10 from ._config import get_run_validators, set_run_validators

11 from ._funcs import asdict, assoc, astuple, evolve, has, resolve_types

12 from ._make import (

13 NOTHING,

14 Attribute,

15 Factory,

16 attrib,

17 attrs,

18 fields,

19 fields_dict,

20 make_class,

21 validate,

22)

23 from ._next_gen import define, field, frozen, mutable

24 from ._version_info import VersionInfo

25

26

27 if sys.version_info < (3, 7): # pragma: no cover

28 warnings.warn(

29 "Running attrs on Python 3.6 is deprecated & we intend to drop "

30 "support soon. If that's a problem for you, please let us know why & "

31 "we MAY re-evaluate: <https://github.com/python-attrs/attrs/pull/993>",

32 DeprecationWarning,

33 )

34

35__version__ = "22.2.0"

36__version_info__ = VersionInfo._from_version_string(__version__)

37

38__title__ = "attrs"

39__description__ = "Classes Without Boilerplate"

40__url__ = "https://www.attrs.org/"

41__uri__ = __url__

42__doc__ = __description__ + " <" + __uri__ + ">"

43

44__author__ = "Hynek Schlawack"

45__email__ = "hs@ox.cx"

46

47__license__ = "MIT"

48__copyright__ = "Copyright (c) 2015 Hynek Schlawack"

49

50

51 s = attributes = attrs

52 ib = attr = attrib

53 dataclass = partial(attrs, auto_attribs=True) # happy Easter ;)

54

55

56 class AttrsInstance:

57 pass

58

59

60__all__ = [

61 "Attribute",

62 "AttrsInstance",

63 "Factory",

64 "NOTHING",

65 "asdict",

66 "assoc",

67 "astuple",

68 "attr",

69 "attrib",

70 "attributes",

71 "attrs",

72 "cmp_using",

73 "converters",

74 "define",

75 "evolve",

76 "exceptions",

77 "field",

78 "fields",

79 "fields_dict",

80 "filters",

81 "frozen",

82 "get_run_validators",

83 "has",

84 "ib",

85 "make_class",

86 "mutable",

87 "resolve_types",

88 "s",

89 "set_run_validators",

90 "setters",

91 "validate",

92 "validators",

93]