Debian Codegraph @

third_party/python/frozenlist/frozenlist-1.5.0.dist-info/METADATA

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