METADATA 13 KB

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