Debian Codegraph @

frozenlist.egg-info/PKG-INFO

raw
1 Metadata-Version: 2.4
2 Name: frozenlist
3 Version: 1.8.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.0
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: Operating System :: POSIX
21 Classifier: Operating System :: MacOS :: MacOS X
22 Classifier: Operating System :: Microsoft :: Windows
23 Classifier: Programming Language :: Cython
24 Classifier: Programming Language :: Python
25 Classifier: Programming Language :: Python :: 3
26 Classifier: Programming Language :: Python :: 3.9
27 Classifier: Programming Language :: Python :: 3.10
28 Classifier: Programming Language :: Python :: 3.11
29 Classifier: Programming Language :: Python :: 3.12
30 Classifier: Programming Language :: Python :: 3.13
31 Classifier: Programming Language :: Python :: 3.14
32 Classifier: Programming Language :: Python :: Implementation :: CPython
33 Classifier: Programming Language :: Python :: Implementation :: PyPy
34 Requires-Python: >=3.9
35 Description-Content-Type: text/x-rst
36 License-File: LICENSE
37 Dynamic: license-file
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?flag=pytest
47 :target: https://codecov.io/gh/aio-libs/frozenlist?flags[]=pytest
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
121 Documentation
122 -------------
123
124 https://frozenlist.aio-libs.org
125
126 Communication channels
127 ----------------------
128
129 We have a *Matrix Space* `#aio-libs-space:matrix.org
130 <https://matrix.to/#/%23aio-libs-space:matrix.org>`_ which is
131 also accessible via Gitter.
132
133 License
134 -------
135
136 ``frozenlist`` is offered under the Apache 2 license.
137
138 Source code
139 -----------
140
141 The project is hosted on GitHub_
142
143 Please file an issue in the `bug tracker
144 <https://github.com/aio-libs/frozenlist/issues>`_ if you have found a bug
145 or have some suggestions to improve the library.
146
147 .. _GitHub: https://github.com/aio-libs/frozenlist
148
149 =========
150 Changelog
151 =========
152
153 ..
154 You should *NOT* be adding new change log entries to this file, this
155 file is managed by towncrier. You *may* edit previous change logs to
156 fix problems like typo corrections or such.
157 To add a new change log entry, please see
158 https://pip.pypa.io/en/latest/development/contributing/#news-entries
159 we named the news folder "changes".
160
161 WARNING: Don't drop the next directive!
162
163 .. towncrier release notes start
164
165 v1.8.0
166 ======
167
168 *(2025-10-05)*
169
170
171 Contributor-facing changes
172 --------------------------
173
174 - The ``reusable-cibuildwheel.yml`` workflow has been refactored to
175 be more generic and ``ci-cd.yml`` now holds all the configuration
176 toggles -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
177
178 *Related issues and pull requests on GitHub:*
179 `#668 <https://github.com/aio-libs/frozenlist/issues/668>`__.
180
181 - When building wheels, the source distribution is now passed directly
182 to the ``cibuildwheel`` invocation -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
183
184 *Related issues and pull requests on GitHub:*
185 `#669 <https://github.com/aio-libs/frozenlist/issues/669>`__.
186
187 - Builds and tests have been added to
188 ``ci-cd.yml`` for arm64 Windows wheels -- by `@finnagin <https://github.com/sponsors/finnagin>`__.
189
190 *Related issues and pull requests on GitHub:*
191 `#677 <https://github.com/aio-libs/frozenlist/issues/677>`__.
192
193 - Started building wheels for CPython 3.14 -- by `@kumaraditya303 <https://github.com/sponsors/kumaraditya303>`__.
194
195 *Related issues and pull requests on GitHub:*
196 `#681 <https://github.com/aio-libs/frozenlist/issues/681>`__, `#682 <https://github.com/aio-libs/frozenlist/issues/682>`__.
197
198 - Removed ``--config-settings=pure-python=false`` from ``requirements/dev.txt``.
199 Developers on CPython still get accelerated builds by default. To explicitly build
200 a pure Python wheel, use ``pip install -e . --config-settings=pure-python=true``
201 -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
202
203 *Related issues and pull requests on GitHub:*
204 `#687 <https://github.com/aio-libs/frozenlist/issues/687>`__.
205
206
207 ----
208
209
210 v1.7.0
211 ======
212
213 *(2025-06-09)*
214
215
216 Features
217 --------
218
219 - Added deepcopy support to FrozenList -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
220
221 *Related issues and pull requests on GitHub:*
222 `#659 <https://github.com/aio-libs/frozenlist/issues/659>`__.
223
224
225 Packaging updates and notes for downstreams
226 -------------------------------------------
227
228 - Fixed an issue where ``frozenlist`` binary wheels would be built with debugging symbols and line tracing enabled, which significantly impacted performance. Line tracing is now disabled by default and can only be enabled explicitly -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
229
230 This change ensures that production builds are optimized for performance. Developers who need line tracing for debugging purposes can still enable it by:
231
232 1. Setting the ``FROZENLIST_CYTHON_TRACING`` environment variable
233 2. Using the ``--config-setting=with-cython-tracing=true`` option with pip
234
235 *Related issues and pull requests on GitHub:*
236 `#660 <https://github.com/aio-libs/frozenlist/issues/660>`__.
237
238 - Enabled ``PIP_CONSTRAINT`` environment variable in the build configuration to ensure the pinned Cython version from ``requirements/cython.txt`` is used during wheel builds.
239
240 *Related issues and pull requests on GitHub:*
241 `#661 <https://github.com/aio-libs/frozenlist/issues/661>`__.
242
243
244 ----
245
246
247 v1.6.2
248 ======
249
250 *(2025-06-03)*
251
252
253 No significant changes.
254
255
256 ----
257
258
259 v1.6.1
260 ======
261
262 *(2025-06-02)*
263
264
265 Bug fixes
266 ---------
267
268 - Correctly use ``cimport`` for including ``PyBool_FromLong`` -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__.
269
270 *Related issues and pull requests on GitHub:*
271 `#653 <https://github.com/aio-libs/frozenlist/issues/653>`__.
272
273
274 Packaging updates and notes for downstreams
275 -------------------------------------------
276
277 - Exclude ``_frozenlist.cpp`` from bdists/wheels -- by `@musicinmybrain <https://github.com/sponsors/musicinmybrain>`__.
278
279 *Related issues and pull requests on GitHub:*
280 `#649 <https://github.com/aio-libs/frozenlist/issues/649>`__.
281
282 - Updated to use Cython 3.1 universally across the build path -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__.
283
284 *Related issues and pull requests on GitHub:*
285 `#654 <https://github.com/aio-libs/frozenlist/issues/654>`__.
286
287
288 ----
289
290
291 v1.6.0
292 ======
293
294 *(2025-04-17)*
295
296
297 Bug fixes
298 ---------
299
300 - Stopped implicitly allowing the use of Cython pre-release versions when
301 building the distribution package -- by `@ajsanchezsanz <https://github.com/sponsors/ajsanchezsanz>`__ and
302 `@markgreene74 <https://github.com/sponsors/markgreene74>`__.
303
304 *Related commits on GitHub:*
305 `41591f2 <https://github.com/aio-libs/frozenlist/commit/41591f2>`__.
306
307
308 Features
309 --------
310
311 - Implemented support for the free-threaded build of CPython 3.13 -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__.
312
313 *Related issues and pull requests on GitHub:*
314 `#618 <https://github.com/aio-libs/frozenlist/issues/618>`__.
315
316 - Started building armv7l wheels -- by `@bdraco <https://github.com/sponsors/bdraco>`__.
317
318 *Related issues and pull requests on GitHub:*
319 `#642 <https://github.com/aio-libs/frozenlist/issues/642>`__.
320
321
322 Packaging updates and notes for downstreams
323 -------------------------------------------
324
325 - Stopped implicitly allowing the use of Cython pre-release versions when
326 building the distribution package -- by `@ajsanchezsanz <https://github.com/sponsors/ajsanchezsanz>`__ and
327 `@markgreene74 <https://github.com/sponsors/markgreene74>`__.
328
329 *Related commits on GitHub:*
330 `41591f2 <https://github.com/aio-libs/frozenlist/commit/41591f2>`__.
331
332 - Started building wheels for the free-threaded build of CPython 3.13 -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__.
333
334 *Related issues and pull requests on GitHub:*
335 `#618 <https://github.com/aio-libs/frozenlist/issues/618>`__.
336
337 - The packaging metadata switched to including an SPDX license identifier introduced in `PEP 639 <https://peps.python.org/pep-639>`__ -- by `@cdce8p <https://github.com/sponsors/cdce8p>`__.
338
339 *Related issues and pull requests on GitHub:*
340 `#639 <https://github.com/aio-libs/frozenlist/issues/639>`__.
341
342
343 Contributor-facing changes
344 --------------------------
345
346 - GitHub Actions CI/CD is now configured to manage caching pip-ecosystem
347 dependencies using `re-actors/cache-python-deps`_ -- an action by
348 `@webknjaz <https://github.com/sponsors/webknjaz>`__ that takes into account ABI stability and the exact
349 version of Python runtime.
350
351 .. _`re-actors/cache-python-deps`:
352 https://github.com/marketplace/actions/cache-python-deps
353
354 *Related issues and pull requests on GitHub:*
355 `#633 <https://github.com/aio-libs/frozenlist/issues/633>`__.
356
357 - Organized dependencies into test and lint dependencies so that no
358 unnecessary ones are installed during CI runs -- by `@lysnikolaou <https://github.com/sponsors/lysnikolaou>`__.
359
360 *Related issues and pull requests on GitHub:*
361 `#636 <https://github.com/aio-libs/frozenlist/issues/636>`__.
362
363
364 ----
365
366
367 1.5.0 (2024-10-22)
368 ==================
369
370 Bug fixes
371 ---------
372
373 - An incorrect signature of the ``__class_getitem__`` class method
374 has been fixed, adding a missing ``class_item`` argument under
375 Python 3.8 and older.
376
377 This change also improves the code coverage of this method that
378 was previously missing -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
379
380
381 *Related issues and pull requests on GitHub:*
382 `#567 <https://github.com/aio-libs/frozenlist/issues/567>`__, `#571 <https://github.com/aio-libs/frozenlist/issues/571>`__.
383
384
385 Improved documentation
386 ----------------------
387
388 - Rendered issue, PR, and commit links now lead to
389 ``frozenlist``'s repo instead of ``yarl``'s repo.
390
391
392 *Related issues and pull requests on GitHub:*
393 `#573 <https://github.com/aio-libs/frozenlist/issues/573>`__.
394
395 - On the ``Contributing docs`` page,
396 a link to the ``Towncrier philosophy`` has been fixed.
397
398
399 *Related issues and pull requests on GitHub:*
400 `#574 <https://github.com/aio-libs/frozenlist/issues/574>`__.
401
402
403 Packaging updates and notes for downstreams
404 -------------------------------------------
405
406 - A name of a temporary building directory now reflects
407 that it's related to ``frozenlist``, not ``yarl``.
408
409
410 *Related issues and pull requests on GitHub:*
411 `#573 <https://github.com/aio-libs/frozenlist/issues/573>`__.
412
413 - Declared Python 3.13 supported officially in the distribution package metadata.
414
415
416 *Related issues and pull requests on GitHub:*
417 `#595 <https://github.com/aio-libs/frozenlist/issues/595>`__.
418
419
420 ----
421
422
423 1.4.1 (2023-12-15)
424 ==================
425
426 Packaging updates and notes for downstreams
427 -------------------------------------------
428
429 - Declared Python 3.12 and PyPy 3.8-3.10 supported officially
430 in the distribution package metadata.
431
432
433 *Related issues and pull requests on GitHub:*
434 `#553 <https://github.com/aio-libs/frozenlist/issues/553>`__.
435
436 - Replaced the packaging is replaced from an old-fashioned ``setup.py`` to an
437 in-tree `PEP 517 <https://peps.python.org/pep-517>`__ build backend -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
438
439 Whenever the end-users or downstream packagers need to build ``frozenlist``
440 from source (a Git checkout or an sdist), they may pass a ``config_settings``
441 flag ``pure-python``. If this flag is not set, a C-extension will be built
442 and included into the distribution.
443
444 Here is how this can be done with ``pip``:
445
446 .. code-block:: console
447
448 $ python3 -m pip install . --config-settings=pure-python=
449
450 This will also work with ``-e | --editable``.
451
452 The same can be achieved via ``pypa/build``:
453
454 .. code-block:: console
455
456 $ python3 -m build --config-setting=pure-python=
457
458 Adding ``-w | --wheel`` can force ``pypa/build`` produce a wheel from source
459 directly, as opposed to building an ``sdist`` and then building from it.
460
461
462 *Related issues and pull requests on GitHub:*
463 `#560 <https://github.com/aio-libs/frozenlist/issues/560>`__.
464
465
466 Contributor-facing changes
467 --------------------------
468
469 - It is now possible to request line tracing in Cython builds using the
470 ``with-cython-tracing`` `PEP 517 <https://peps.python.org/pep-517>`__ config setting
471 -- `@webknjaz <https://github.com/sponsors/webknjaz>`__.
472
473 This can be used in CI and development environment to measure coverage
474 on Cython modules, but is not normally useful to the end-users or
475 downstream packagers.
476
477 Here's a usage example:
478
479 .. code-block:: console
480
481 $ python3 -Im pip install . --config-settings=with-cython-tracing=true
482
483 For editable installs, this setting is on by default. Otherwise, it's
484 off unless requested explicitly.
485
486 The following produces C-files required for the Cython coverage
487 plugin to map the measurements back to the PYX-files:
488
489 .. code-block:: console
490
491 $ python -Im pip install -e .
492
493 Alternatively, the ``FROZENLIST_CYTHON_TRACING=1`` environment variable
494 can be set to do the same as the `PEP 517 <https://peps.python.org/pep-517>`__ config setting.
495
496
497 *Related issues and pull requests on GitHub:*
498 `#560 <https://github.com/aio-libs/frozenlist/issues/560>`__.
499
500 - Coverage collection has been implemented for the Cython modules
501 -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
502
503 It will also be reported to Codecov from any non-release CI jobs.
504
505
506 *Related issues and pull requests on GitHub:*
507 `#561 <https://github.com/aio-libs/frozenlist/issues/561>`__.
508
509 - A step-by-step ``Release Guide`` guide has
510 been added, describing how to release *frozenlist* -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
511
512 This is primarily targeting the maintainers.
513
514
515 *Related issues and pull requests on GitHub:*
516 `#563 <https://github.com/aio-libs/frozenlist/issues/563>`__.
517
518 - Detailed ``Contributing Guidelines`` on
519 authoring the changelog fragments have been published in the
520 documentation -- by `@webknjaz <https://github.com/sponsors/webknjaz>`__.
521
522
523 *Related issues and pull requests on GitHub:*
524 `#564 <https://github.com/aio-libs/frozenlist/issues/564>`__.
525
526
527 ----
528
529
530 1.4.0 (2023-07-12)
531 ==================
532
533 The published source distribution package became buildable
534 under Python 3.12.
535
536
537 ----
538
539
540 Bugfixes
541 --------
542
543 - Removed an unused ``typing.Tuple`` import
544 `#411 <https://github.com/aio-libs/frozenlist/issues/411>`_
545
546
547 Deprecations and Removals
548 -------------------------
549
550 - Dropped Python 3.7 support.
551 `#413 <https://github.com/aio-libs/frozenlist/issues/413>`_
552
553
554 Misc
555 ----
556
557 - `#410 <https://github.com/aio-libs/frozenlist/issues/410>`_, `#433 <https://github.com/aio-libs/frozenlist/issues/433>`_
558
559
560 ----
561
562
563 1.3.3 (2022-11-08)
564 ==================
565
566 - Fixed CI runs when creating a new release, where new towncrier versions
567 fail when the current version section is already present.
568
569
570 ----
571
572
573 1.3.2 (2022-11-08)
574 ==================
575
576 Misc
577 ----
578
579 - Updated the CI runs to better check for test results and to avoid deprecated syntax. `#327 <https://github.com/aio-libs/frozenlist/issues/327>`_
580
581
582 ----
583
584
585 1.3.1 (2022-08-02)
586 ==================
587
588 The published source distribution package became buildable
589 under Python 3.11.
590
591
592 ----
593
594
595 1.3.0 (2022-01-18)
596 ==================
597
598 Bugfixes
599 --------
600
601 - Do not install C sources with binary distributions.
602 `#250 <https://github.com/aio-libs/frozenlist/issues/250>`_
603
604
605 Deprecations and Removals
606 -------------------------
607
608 - Dropped Python 3.6 support
609 `#274 <https://github.com/aio-libs/frozenlist/issues/274>`_
610
611
612 ----
613
614
615 1.2.0 (2021-10-16)
616 ==================
617
618 Features
619 --------
620
621 - ``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).
622 `#172 <https://github.com/aio-libs/frozenlist/issues/172>`_
623 - Added support for Python 3.10.
624 `#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
625 - Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes.
626 `#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
627 - Started shipping platform-specific arm64 wheels for Apple Silicon.
628 `#227 <https://github.com/aio-libs/frozenlist/issues/227>`_
629
630
631 ----
632
633
634 1.1.1 (2020-11-14)
635 ==================
636
637 Bugfixes
638 --------
639
640 - Provide x86 Windows wheels.
641 `#169 <https://github.com/aio-libs/frozenlist/issues/169>`_
642
643
644 ----
645
646
647 1.1.0 (2020-10-13)
648 ==================
649
650 Features
651 --------
652
653 - Add support for hashing of a frozen list.
654 `#136 <https://github.com/aio-libs/frozenlist/issues/136>`_
655
656 - Support Python 3.8 and 3.9.
657
658 - Provide wheels for ``aarch64``, ``i686``, ``ppc64le``, ``s390x`` architectures on
659 Linux as well as ``x86_64``.
660
661
662 ----
663
664
665 1.0.0 (2019-11-09)
666 ==================
667
668 Deprecations and Removals
669 -------------------------
670
671 - Dropped support for Python 3.5; only 3.6, 3.7 and 3.8 are supported going forward.
672 `#24 <https://github.com/aio-libs/frozenlist/issues/24>`_