METADATA 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. Metadata-Version: 2.1
  2. Name: frozenlist
  3. Version: 1.4.1
  4. Summary: A list-like structure which implements collections.abc.MutableSequence
  5. Home-page: https://github.com/aio-libs/frozenlist
  6. Maintainer: aiohttp team <team@aiohttp.org>
  7. Maintainer-email: team@aiohttp.org
  8. License: Apache 2
  9. Project-URL: Chat: Matrix, https://matrix.to/#/#aio-libs:matrix.org
  10. Project-URL: Chat: Matrix Space, https://matrix.to/#/#aio-libs-space:matrix.org
  11. Project-URL: CI: Github Actions, https://github.com/aio-libs/frozenlist/actions
  12. Project-URL: Code of Conduct, https://github.com/aio-libs/.github/blob/master/CODE_OF_CONDUCT.md
  13. Project-URL: Coverage: codecov, https://codecov.io/github/aio-libs/frozenlist
  14. Project-URL: Docs: Changelog, https://github.com/aio-libs/frozenlist/blob/master/CHANGES.rst#changelog
  15. Project-URL: Docs: RTD, https://frozenlist.aio-libs.org
  16. Project-URL: GitHub: issues, https://github.com/aio-libs/frozenlist/issues
  17. Project-URL: GitHub: repo, https://github.com/aio-libs/frozenlist
  18. Classifier: Development Status :: 5 - Production/Stable
  19. Classifier: Intended Audience :: Developers
  20. Classifier: License :: OSI Approved :: Apache Software License
  21. Classifier: Operating System :: POSIX
  22. Classifier: Operating System :: MacOS :: MacOS X
  23. Classifier: Operating System :: Microsoft :: Windows
  24. Classifier: Programming Language :: Cython
  25. Classifier: Programming Language :: Python
  26. Classifier: Programming Language :: Python :: 3
  27. Classifier: Programming Language :: Python :: 3.8
  28. Classifier: Programming Language :: Python :: 3.9
  29. Classifier: Programming Language :: Python :: 3.10
  30. Classifier: Programming Language :: Python :: 3.11
  31. Classifier: Programming Language :: Python :: 3.12
  32. Classifier: Programming Language :: Python :: Implementation :: CPython
  33. Classifier: Programming Language :: Python :: Implementation :: PyPy
  34. Requires-Python: >=3.8
  35. Description-Content-Type: text/x-rst
  36. License-File: LICENSE
  37. frozenlist
  38. ==========
  39. .. image:: https://github.com/aio-libs/frozenlist/workflows/CI/badge.svg
  40. :target: https://github.com/aio-libs/frozenlist/actions
  41. :alt: GitHub status for master branch
  42. .. image:: https://codecov.io/gh/aio-libs/frozenlist/branch/master/graph/badge.svg
  43. :target: https://codecov.io/gh/aio-libs/frozenlist
  44. :alt: codecov.io status for master branch
  45. .. image:: https://img.shields.io/pypi/v/frozenlist.svg?logo=Python&logoColor=white
  46. :target: https://pypi.org/project/frozenlist
  47. :alt: frozenlist @ PyPI
  48. .. image:: https://readthedocs.org/projects/frozenlist/badge/?version=latest
  49. :target: https://frozenlist.aio-libs.org
  50. :alt: Read The Docs build status badge
  51. .. image:: https://img.shields.io/matrix/aio-libs:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
  52. :target: https://matrix.to/#/%23aio-libs:matrix.org
  53. :alt: Matrix Room — #aio-libs:matrix.org
  54. .. image:: https://img.shields.io/matrix/aio-libs-space:matrix.org?label=Discuss%20on%20Matrix%20at%20%23aio-libs-space%3Amatrix.org&logo=matrix&server_fqdn=matrix.org&style=flat
  55. :target: https://matrix.to/#/%23aio-libs-space:matrix.org
  56. :alt: Matrix Space — #aio-libs-space:matrix.org
  57. Introduction
  58. ------------
  59. ``frozenlist.FrozenList`` is a list-like structure which implements
  60. ``collections.abc.MutableSequence``. The list is *mutable* until ``FrozenList.freeze``
  61. is called, after which list modifications raise ``RuntimeError``:
  62. >>> from frozenlist import FrozenList
  63. >>> fl = FrozenList([17, 42])
  64. >>> fl.append('spam')
  65. >>> fl.append('Vikings')
  66. >>> fl
  67. <FrozenList(frozen=False, [17, 42, 'spam', 'Vikings'])>
  68. >>> fl.freeze()
  69. >>> fl
  70. <FrozenList(frozen=True, [17, 42, 'spam', 'Vikings'])>
  71. >>> fl.frozen
  72. True
  73. >>> fl.append("Monty")
  74. Traceback (most recent call last):
  75. File "<stdin>", line 1, in <module>
  76. File "frozenlist/_frozenlist.pyx", line 97, in frozenlist._frozenlist.FrozenList.append
  77. self._check_frozen()
  78. File "frozenlist/_frozenlist.pyx", line 19, in frozenlist._frozenlist.FrozenList._check_frozen
  79. raise RuntimeError("Cannot modify frozen list.")
  80. RuntimeError: Cannot modify frozen list.
  81. FrozenList is also hashable, but only when frozen. Otherwise it also throws a RuntimeError:
  82. >>> fl = FrozenList([17, 42, 'spam'])
  83. >>> hash(fl)
  84. Traceback (most recent call last):
  85. File "<stdin>", line 1, in <module>
  86. File "frozenlist/_frozenlist.pyx", line 111, in frozenlist._frozenlist.FrozenList.__hash__
  87. raise RuntimeError("Cannot hash unfrozen list.")
  88. RuntimeError: Cannot hash unfrozen list.
  89. >>> fl.freeze()
  90. >>> hash(fl)
  91. 3713081631934410656
  92. >>> dictionary = {fl: 'Vikings'} # frozen fl can be a dict key
  93. >>> dictionary
  94. {<FrozenList(frozen=True, [1, 2])>: 'Vikings'}
  95. Installation
  96. ------------
  97. ::
  98. $ pip install frozenlist
  99. The library requires Python 3.8 or newer.
  100. Documentation
  101. -------------
  102. https://frozenlist.aio-libs.org
  103. Communication channels
  104. ----------------------
  105. We have a *Matrix Space* `#aio-libs-space:matrix.org
  106. <https://matrix.to/#/%23aio-libs-space:matrix.org>`_ which is
  107. also accessible via Gitter.
  108. Requirements
  109. ------------
  110. - Python >= 3.8
  111. License
  112. -------
  113. ``frozenlist`` is offered under the Apache 2 license.
  114. Source code
  115. -----------
  116. The project is hosted on GitHub_
  117. Please file an issue in the `bug tracker
  118. <https://github.com/aio-libs/frozenlist/issues>`_ if you have found a bug
  119. or have some suggestions to improve the library.
  120. .. _GitHub: https://github.com/aio-libs/frozenlist
  121. =========
  122. Changelog
  123. =========
  124. ..
  125. You should *NOT* be adding new change log entries to this file, this
  126. file is managed by towncrier. You *may* edit previous change logs to
  127. fix problems like typo corrections or such.
  128. To add a new change log entry, please see
  129. https://pip.pypa.io/en/latest/development/contributing/#news-entries
  130. we named the news folder "changes".
  131. WARNING: Don't drop the next directive!
  132. .. towncrier release notes start
  133. 1.4.1 (2023-12-15)
  134. ==================
  135. Packaging updates and notes for downstreams
  136. -------------------------------------------
  137. - Declared Python 3.12 and PyPy 3.8-3.10 supported officially
  138. in the distribution package metadata.
  139. *Related issues and pull requests on GitHub:*
  140. `#553 <https://github.com/aio-libs/yarl/issues/553>`__.
  141. - Replaced the packaging is replaced from an old-fashioned ``setup.py`` to an
  142. in-tree `PEP 517 <https://peps.python.org/pep-517>`__ build backend -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  143. Whenever the end-users or downstream packagers need to build ``frozenlist``
  144. from source (a Git checkout or an sdist), they may pass a ``config_settings``
  145. flag ``pure-python``. If this flag is not set, a C-extension will be built
  146. and included into the distribution.
  147. Here is how this can be done with ``pip``:
  148. .. code-block:: console
  149. $ python3 -m pip install . --config-settings=pure-python=
  150. This will also work with ``-e | --editable``.
  151. The same can be achieved via ``pypa/build``:
  152. .. code-block:: console
  153. $ python3 -m build --config-setting=pure-python=
  154. Adding ``-w | --wheel`` can force ``pypa/build`` produce a wheel from source
  155. directly, as opposed to building an ``sdist`` and then building from it.
  156. *Related issues and pull requests on GitHub:*
  157. `#560 <https://github.com/aio-libs/yarl/issues/560>`__.
  158. Contributor-facing changes
  159. --------------------------
  160. - It is now possible to request line tracing in Cython builds using the
  161. ``with-cython-tracing`` `PEP 517 <https://peps.python.org/pep-517>`__ config setting
  162. -- `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  163. This can be used in CI and development environment to measure coverage
  164. on Cython modules, but is not normally useful to the end-users or
  165. downstream packagers.
  166. Here's a usage example:
  167. .. code-block:: console
  168. $ python3 -Im pip install . --config-settings=with-cython-tracing=true
  169. For editable installs, this setting is on by default. Otherwise, it's
  170. off unless requested explicitly.
  171. The following produces C-files required for the Cython coverage
  172. plugin to map the measurements back to the PYX-files:
  173. .. code-block:: console
  174. $ python -Im pip install -e .
  175. Alternatively, the ``FROZENLIST_CYTHON_TRACING=1`` environment variable
  176. can be set to do the same as the `PEP 517 <https://peps.python.org/pep-517>`__ config setting.
  177. *Related issues and pull requests on GitHub:*
  178. `#560 <https://github.com/aio-libs/yarl/issues/560>`__.
  179. - Coverage collection has been implemented for the Cython modules
  180. -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  181. It will also be reported to Codecov from any non-release CI jobs.
  182. *Related issues and pull requests on GitHub:*
  183. `#561 <https://github.com/aio-libs/yarl/issues/561>`__.
  184. - A step-by-step ``Release Guide`` guide has
  185. been added, describing how to release *frozenlist* -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  186. This is primarily targeting the maintainers.
  187. *Related issues and pull requests on GitHub:*
  188. `#563 <https://github.com/aio-libs/yarl/issues/563>`__.
  189. - Detailed ``Contributing Guidelines`` on
  190. authoring the changelog fragments have been published in the
  191. documentation -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
  192. *Related issues and pull requests on GitHub:*
  193. `#564 <https://github.com/aio-libs/yarl/issues/564>`__.
  194. ----
  195. 1.4.0 (2023-07-12)
  196. ==================
  197. The published source distribution package became buildable
  198. under Python 3.12.
  199. ----
  200. Bugfixes
  201. --------
  202. - Removed an unused ``typing.Tuple`` import
  203. `#411 <https://github.com/aio-libs/frozenlist/issues/411>`_
  204. Deprecations and Removals
  205. -------------------------
  206. - Dropped Python 3.7 support.
  207. `#413 <https://github.com/aio-libs/frozenlist/issues/413>`_
  208. Misc
  209. ----
  210. - `#410 <https://github.com/aio-libs/frozenlist/issues/410>`_, `#433 <https://github.com/aio-libs/frozenlist/issues/433>`_
  211. ----
  212. 1.3.3 (2022-11-08)
  213. ==================
  214. - Fixed CI runs when creating a new release, where new towncrier versions
  215. fail when the current version section is already present.
  216. ----
  217. 1.3.2 (2022-11-08)
  218. ==================
  219. Misc
  220. ----
  221. - Updated the CI runs to better check for test results and to avoid deprecated syntax. `#327 <https://github.com/aio-libs/frozenlist/issues/327>`_
  222. ----
  223. 1.3.1 (2022-08-02)
  224. ==================
  225. The published source distribution package became buildable
  226. under Python 3.11.
  227. ----
  228. 1.3.0 (2022-01-18)
  229. ==================
  230. Bugfixes
  231. --------
  232. - Do not install C sources with binary distributions.
  233. `#250 <https://github.com/aio-libs/frozenlist/issues/250>`_
  234. Deprecations and Removals
  235. -------------------------
  236. - Dropped Python 3.6 support
  237. `#274 <https://github.com/aio-libs/frozenlist/issues/274>`_
  238. ----
  239. 1.2.0 (2021-10-16)
  240. ==================
  241. Features
  242. --------
  243. - ``FrozenList`` now supports being used as a generic type as per PEP 585, e.g. ``frozen_int_list: FrozenList[int]`` (requires Python 3.9 or newer).
  244. `#172 <https://github.com/aio-libs/frozenlist/issues/172>`_
  245. - Added support for Python 3.10.
  246. `#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
  247. - Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes.
  248. `#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
  249. - Started shipping platform-specific arm64 wheels for Apple Silicon.
  250. `#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
  251. ----
  252. 1.1.1 (2020-11-14)
  253. ==================
  254. Bugfixes
  255. --------
  256. - Provide x86 Windows wheels.
  257. `#169 <https://github.com/aio-libs/frozenlist/issues/169>`_
  258. ----
  259. 1.1.0 (2020-10-13)
  260. ==================
  261. Features
  262. --------
  263. - Add support for hashing of a frozen list.
  264. `#136 <https://github.com/aio-libs/frozenlist/issues/136>`_
  265. - Support Python 3.8 and 3.9.
  266. - Provide wheels for ``aarch64``, ``i686``, ``ppc64le``, ``s390x`` architectures on
  267. Linux as well as ``x86_64``.
  268. ----
  269. 1.0.0 (2019-11-09)
  270. ==================
  271. Deprecations and Removals
  272. -------------------------
  273. - Dropped support for Python 3.5; only 3.6, 3.7 and 3.8 are supported going forward.
  274. `#24 <https://github.com/aio-libs/frozenlist/issues/24>`_