Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

METADATA 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. Metadata-Version: 2.1
  2. Name: attrs
  3. Version: 23.1.0
  4. Summary: Classes Without Boilerplate
  5. Project-URL: Documentation, https://www.attrs.org/
  6. Project-URL: Changelog, https://www.attrs.org/en/stable/changelog.html
  7. Project-URL: Bug Tracker, https://github.com/python-attrs/attrs/issues
  8. Project-URL: Source Code, https://github.com/python-attrs/attrs
  9. Project-URL: Funding, https://github.com/sponsors/hynek
  10. Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=pypi
  11. Author-email: Hynek Schlawack <hs@ox.cx>
  12. License-Expression: MIT
  13. License-File: LICENSE
  14. Keywords: attribute,boilerplate,class
  15. Classifier: Development Status :: 5 - Production/Stable
  16. Classifier: Intended Audience :: Developers
  17. Classifier: License :: OSI Approved :: MIT License
  18. Classifier: Programming Language :: Python :: 3.7
  19. Classifier: Programming Language :: Python :: 3.8
  20. Classifier: Programming Language :: Python :: 3.9
  21. Classifier: Programming Language :: Python :: 3.10
  22. Classifier: Programming Language :: Python :: 3.11
  23. Classifier: Programming Language :: Python :: Implementation :: CPython
  24. Classifier: Programming Language :: Python :: Implementation :: PyPy
  25. Classifier: Typing :: Typed
  26. Requires-Python: >=3.7
  27. Requires-Dist: importlib-metadata; python_version < '3.8'
  28. Provides-Extra: cov
  29. Requires-Dist: attrs[tests]; extra == 'cov'
  30. Requires-Dist: coverage[toml]>=5.3; extra == 'cov'
  31. Provides-Extra: dev
  32. Requires-Dist: attrs[docs,tests]; extra == 'dev'
  33. Requires-Dist: pre-commit; extra == 'dev'
  34. Provides-Extra: docs
  35. Requires-Dist: furo; extra == 'docs'
  36. Requires-Dist: myst-parser; extra == 'docs'
  37. Requires-Dist: sphinx; extra == 'docs'
  38. Requires-Dist: sphinx-notfound-page; extra == 'docs'
  39. Requires-Dist: sphinxcontrib-towncrier; extra == 'docs'
  40. Requires-Dist: towncrier; extra == 'docs'
  41. Requires-Dist: zope-interface; extra == 'docs'
  42. Provides-Extra: tests
  43. Requires-Dist: attrs[tests-no-zope]; extra == 'tests'
  44. Requires-Dist: zope-interface; extra == 'tests'
  45. Provides-Extra: tests-no-zope
  46. Requires-Dist: cloudpickle; platform_python_implementation == 'CPython' and extra == 'tests-no-zope'
  47. Requires-Dist: hypothesis; extra == 'tests-no-zope'
  48. Requires-Dist: mypy>=1.1.1; platform_python_implementation == 'CPython' and extra == 'tests-no-zope'
  49. Requires-Dist: pympler; extra == 'tests-no-zope'
  50. Requires-Dist: pytest-mypy-plugins; platform_python_implementation == 'CPython' and python_version < '3.11' and extra == 'tests-no-zope'
  51. Requires-Dist: pytest-xdist[psutil]; extra == 'tests-no-zope'
  52. Requires-Dist: pytest>=4.3.0; extra == 'tests-no-zope'
  53. Description-Content-Type: text/markdown
  54. <p align="center">
  55. <a href="https://www.attrs.org/">
  56. <img src="https://raw.githubusercontent.com/python-attrs/attrs/main/docs/_static/attrs_logo.svg" width="35%" alt="attrs" />
  57. </a>
  58. </p>
  59. *attrs* is the Python package that will bring back the **joy** of **writing classes** by relieving you from the drudgery of implementing object protocols (aka [dunder methods](https://www.attrs.org/en/latest/glossary.html#term-dunder-methods)).
  60. [Trusted by NASA](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile#list-of-qualifying-repositories-for-mars-2020-helicopter-contributor-achievement) for Mars missions since 2020!
  61. Its main goal is to help you to write **concise** and **correct** software without slowing down your code.
  62. ## Sponsors
  63. *attrs* would not be possible without our [amazing sponsors](https://github.com/sponsors/hynek).
  64. Especially those generously supporting us at the *The Organization* tier and higher:
  65. <p align="center">
  66. <a href="https://www.variomedia.de/">
  67. <img src="https://raw.githubusercontent.com/python-attrs/attrs/main/.github/sponsors/Variomedia.svg" width="200" height="60"></img>
  68. </a>
  69. <a href="https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo">
  70. <img src="https://raw.githubusercontent.com/python-attrs/attrs/main/.github/sponsors/Tidelift.svg" width="200" height="60"></img>
  71. </a>
  72. <a href="https://sentry.io/">
  73. <img src="https://raw.githubusercontent.com/python-attrs/attrs/main/.github/sponsors/Sentry.svg" width="200" height="60"></img>
  74. </a>
  75. <a href="https://filepreviews.io/">
  76. <img src="https://raw.githubusercontent.com/python-attrs/attrs/main/.github/sponsors/FilePreviews.svg" width="200" height="60"></img>
  77. </a>
  78. </p>
  79. <p align="center">
  80. <strong>Please consider <a href="https://github.com/sponsors/hynek">joining them</a> to help make <em>attrs</em>’s maintenance more sustainable!</strong>
  81. </p>
  82. <!-- teaser-end -->
  83. ## Example
  84. *attrs* gives you a class decorator and a way to declaratively define the attributes on that class:
  85. <!-- code-begin -->
  86. ```pycon
  87. >>> from attrs import asdict, define, make_class, Factory
  88. >>> @define
  89. ... class SomeClass:
  90. ... a_number: int = 42
  91. ... list_of_numbers: list[int] = Factory(list)
  92. ...
  93. ... def hard_math(self, another_number):
  94. ... return self.a_number + sum(self.list_of_numbers) * another_number
  95. >>> sc = SomeClass(1, [1, 2, 3])
  96. >>> sc
  97. SomeClass(a_number=1, list_of_numbers=[1, 2, 3])
  98. >>> sc.hard_math(3)
  99. 19
  100. >>> sc == SomeClass(1, [1, 2, 3])
  101. True
  102. >>> sc != SomeClass(2, [3, 2, 1])
  103. True
  104. >>> asdict(sc)
  105. {'a_number': 1, 'list_of_numbers': [1, 2, 3]}
  106. >>> SomeClass()
  107. SomeClass(a_number=42, list_of_numbers=[])
  108. >>> C = make_class("C", ["a", "b"])
  109. >>> C("foo", "bar")
  110. C(a='foo', b='bar')
  111. ```
  112. After *declaring* your attributes, *attrs* gives you:
  113. - a concise and explicit overview of the class's attributes,
  114. - a nice human-readable `__repr__`,
  115. - equality-checking methods,
  116. - an initializer,
  117. - and much more,
  118. *without* writing dull boilerplate code again and again and *without* runtime performance penalties.
  119. **Hate type annotations**!?
  120. No problem!
  121. Types are entirely **optional** with *attrs*.
  122. Simply assign `attrs.field()` to the attributes instead of annotating them with types.
  123. ---
  124. This example uses *attrs*'s modern APIs that have been introduced in version 20.1.0, and the *attrs* package import name that has been added in version 21.3.0.
  125. The classic APIs (`@attr.s`, `attr.ib`, plus their serious-business aliases) and the `attr` package import name will remain **indefinitely**.
  126. Please check out [*On The Core API Names*](https://www.attrs.org/en/latest/names.html) for a more in-depth explanation.
  127. ## Data Classes
  128. On the tin, *attrs* might remind you of `dataclasses` (and indeed, `dataclasses` [are a descendant](https://hynek.me/articles/import-attrs/) of *attrs*).
  129. In practice it does a lot more and is more flexible.
  130. For instance it allows you to define [special handling of NumPy arrays for equality checks](https://www.attrs.org/en/stable/comparison.html#customization), or allows more ways to [plug into the initialization process](https://www.attrs.org/en/stable/init.html#hooking-yourself-into-initialization).
  131. For more details, please refer to our [comparison page](https://www.attrs.org/en/stable/why.html#data-classes).
  132. ## Project Information
  133. - [**Changelog**](https://www.attrs.org/en/stable/changelog.html)
  134. - [**Documentation**](https://www.attrs.org/)
  135. - [**PyPI**](https://pypi.org/project/attrs/)
  136. - [**Source Code**](https://github.com/python-attrs/attrs)
  137. - [**Contributing**](https://github.com/python-attrs/attrs/blob/main/.github/CONTRIBUTING.md)
  138. - [**Third-party Extensions**](https://github.com/python-attrs/attrs/wiki/Extensions-to-attrs)
  139. - **License**: [MIT](https://www.attrs.org/en/latest/license.html)
  140. - **Get Help**: please use the `python-attrs` tag on [StackOverflow](https://stackoverflow.com/questions/tagged/python-attrs)
  141. - **Supported Python Versions**: 3.7 and later
  142. ### *attrs* for Enterprise
  143. Available as part of the Tidelift Subscription.
  144. The maintainers of *attrs* and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source packages you use to build your applications.
  145. Save time, reduce risk, and improve code health, while paying the maintainers of the exact packages you use.
  146. [Learn more.](https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
  147. ## Release Information
  148. ### Backwards-incompatible Changes
  149. - Python 3.6 has been dropped and packaging switched to static package data using [Hatch](https://hatch.pypa.io/latest/).
  150. [#993](https://github.com/python-attrs/attrs/issues/993)
  151. ### Deprecations
  152. - The support for *zope-interface* via the `attrs.validators.provides` validator is now deprecated and will be removed in, or after, April 2024.
  153. The presence of a C-based package in our developement dependencies has caused headaches and we're not under the impression it's used a lot.
  154. Let us know if you're using it and we might publish it as a separate package.
  155. [#1120](https://github.com/python-attrs/attrs/issues/1120)
  156. ### Changes
  157. - `attrs.filters.exclude()` and `attrs.filters.include()` now support the passing of attribute names as strings.
  158. [#1068](https://github.com/python-attrs/attrs/issues/1068)
  159. - `attrs.has()` and `attrs.fields()` now handle generic classes correctly.
  160. [#1079](https://github.com/python-attrs/attrs/issues/1079)
  161. - Fix frozen exception classes when raised within e.g. `contextlib.contextmanager`, which mutates their `__traceback__` attributes.
  162. [#1081](https://github.com/python-attrs/attrs/issues/1081)
  163. - `@frozen` now works with type checkers that implement [PEP-681](https://peps.python.org/pep-0681/) (ex. [pyright](https://github.com/microsoft/pyright/)).
  164. [#1084](https://github.com/python-attrs/attrs/issues/1084)
  165. - Restored ability to unpickle instances pickled before 22.2.0.
  166. [#1085](https://github.com/python-attrs/attrs/issues/1085)
  167. - `attrs.asdict()`'s and `attrs.astuple()`'s type stubs now accept the `attrs.AttrsInstance` protocol.
  168. [#1090](https://github.com/python-attrs/attrs/issues/1090)
  169. - Fix slots class cellvar updating closure in CPython 3.8+ even when `__code__` introspection is unavailable.
  170. [#1092](https://github.com/python-attrs/attrs/issues/1092)
  171. - `attrs.resolve_types()` can now pass `include_extras` to `typing.get_type_hints()` on Python 3.9+, and does so by default.
  172. [#1099](https://github.com/python-attrs/attrs/issues/1099)
  173. - Added instructions for pull request workflow to `CONTRIBUTING.md`.
  174. [#1105](https://github.com/python-attrs/attrs/issues/1105)
  175. - Added *type* parameter to `attrs.field()` function for use with `attrs.make_class()`.
  176. Please note that type checkers ignore type metadata passed into `make_class()`, but it can be useful if you're wrapping _attrs_.
  177. [#1107](https://github.com/python-attrs/attrs/issues/1107)
  178. - It is now possible for `attrs.evolve()` (and `attr.evolve()`) to change fields named `inst` if the instance is passed as a positional argument.
  179. Passing the instance using the `inst` keyword argument is now deprecated and will be removed in, or after, April 2024.
  180. [#1117](https://github.com/python-attrs/attrs/issues/1117)
  181. - `attrs.validators.optional()` now also accepts a tuple of validators (in addition to lists of validators).
  182. [#1122](https://github.com/python-attrs/attrs/issues/1122)
  183. ---
  184. [Full changelog](https://www.attrs.org/en/stable/changelog.html)