From 20a322f796d8bccecf9399b454888ccd4aa25a0a Mon Sep 17 00:00:00 2001 From: Ilan Schnell Date: Tue, 15 Oct 2024 15:25:00 -0500 Subject: [PATCH] add release date - update docs --- CHANGE_LOG | 2 +- README.rst | 28 +++++++------------ doc/changelog.rst | 23 ++++++++++++++++ doc/reference.rst | 69 +++++++++++++++-------------------------------- 4 files changed, 55 insertions(+), 67 deletions(-) diff --git a/CHANGE_LOG b/CHANGE_LOG index 6442fb56..69410192 100644 --- a/CHANGE_LOG +++ b/CHANGE_LOG @@ -1,4 +1,4 @@ -2024-10-XX 3.0.0: +2024-10-15 3.0.0: ------------------- * see [Bitarray 3 transition](bitarray3.rst) * remove Python 2.7 support diff --git a/README.rst b/README.rst index 1deaaf19..0b1f448b 100644 --- a/README.rst +++ b/README.rst @@ -513,9 +513,11 @@ bitarray methods: ``decode(code, /)`` -> iterator Given a prefix code (a dict mapping symbols to bitarrays, or ``decodetree`` object), decode content of bitarray and return an iterator over - the symbols. + corresponding symbols. - New in version 3.0: returns iterator - equivalent to ``.iterdecode()``. + See also: `Bitarray 3 transition `__ + + New in version 3.0: returns iterator (equivalent to past ``.iterdecode()``). ``encode(code, iterable, /)`` @@ -584,20 +586,6 @@ bitarray methods: New in version 1.5.3: optional index argument. -``iterdecode(code, /)`` -> iterator - alias for ``.decode()`` - deprecated since bitarray 3.0.0 - - New in version 3.0: deprecated, use ``.decode()``. - - -``itersearch(sub_bitarray, start=0, stop=, /, right=False)`` -> iterator - alias for ``.search()`` - deprecated since bitarray 3.0.0 - - New in version 2.9: optional start and stop arguments - add optional keyword argument ``right``. - - New in version 3.0: deprecated, use ``.search()``. - - ``pack(bytes, /)`` Extend bitarray from a bytes-like object, where each byte corresponds to a single bit. The byte ``b'\x00'`` maps to bit 0 and all other bytes @@ -631,7 +619,11 @@ bitarray methods: unless ``right=True``, which will iterate in descending oder (starting with rightmost match). - New in version 3.0: returns iterator - equivalent to ``.itersearch()``. + See also: `Bitarray 3 transition `__ + + New in version 2.9: optional start and stop arguments - add optional keyword argument ``right``. + + New in version 3.0: returns iterator (equivalent to past ``.itersearch()``). ``setall(value, /)`` @@ -700,7 +692,7 @@ Other objects: ``decodetree(code, /)`` -> decodetree Given a prefix code (a dict mapping symbols to bitarrays), - create a binary tree object to be passed to ``.decode()`` or ``.iterdecode()``. + create a binary tree object to be passed to ``.decode()``. New in version 1.6. diff --git a/doc/changelog.rst b/doc/changelog.rst index 603f74ae..560a2d2b 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -1,6 +1,29 @@ Change log ========== +**3.0.0** (2024-10-15): + +* see `Bitarray 3 transition `__ +* remove Python 2.7 support +* ``.decode()`` now returns iterator (equivalent to past ``.iterdecode()``) +* ``.search()`` now returns iterator (equivalent to past ``.itersearch()``) +* remove ``.iterdecode()`` and ``.itersearch()`` +* remove ``util.rindex()``, use ``.index(..., right=1)`` instead, + deprecated since 2.9 +* remove ``util.make_endian()``, use ``bitarray(..., endian=...)`` instead, + deprecated since 2.9 +* remove hackish support for ``bitarray()`` handling unpickling, + see detailed explaination in `#207 `__ - closes `#206 `__ + + +**2.9.3** (2024-10-10): + +* add official Python 3.13 support +* update cibuildwheel to 2.21.3 +* minor simplifications +* fix some typos + + **2.9.2** (2024-01-01): * optimize initialization from strings by not constantly resizing buffer diff --git a/doc/reference.rst b/doc/reference.rst index 6e43f39e..f88ccfa6 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -1,7 +1,7 @@ Reference ========= -bitarray version: 2.9.2 -- `change log `__ +bitarray version: 3.0.0 -- `change log `__ In the following, ``item`` and ``value`` are usually a single bit - an integer 0 or 1. @@ -102,9 +102,14 @@ bitarray methods: New in version 2.9: add non-overlapping sub-bitarray count. -``decode(code, /)`` -> list +``decode(code, /)`` -> iterator Given a prefix code (a dict mapping symbols to bitarrays, or ``decodetree`` - object), decode content of bitarray and return it as a list of symbols. + object), decode content of bitarray and return an iterator over + corresponding symbols. + + See also: `Bitarray 3 transition `__ + + New in version 3.0: returns iterator (equivalent to past ``.iterdecode()``). ``encode(code, iterable, /)`` @@ -173,22 +178,6 @@ bitarray methods: New in version 1.5.3: optional index argument. -``iterdecode(code, /)`` -> iterator - Given a prefix code (a dict mapping symbols to bitarrays, or ``decodetree`` - object), decode content of bitarray and return an iterator over - the symbols. - - -``itersearch(sub_bitarray, start=0, stop=, /, right=False)`` -> iterator - Return iterator over indices where sub_bitarray is found, such that - sub_bitarray is contained within ``[start:stop]``. - The indices are iterated in ascending order (from lowest to highest), - unless ``right=True``, which will iterate in descending oder (starting with - rightmost match). - - New in version 2.9: optional start and stop arguments - add optional keyword argument ``right``. - - ``pack(bytes, /)`` Extend bitarray from a bytes-like object, where each byte corresponds to a single bit. The byte ``b'\x00'`` maps to bit 0 and all other bytes @@ -215,11 +204,18 @@ bitarray methods: Reverse all bits in bitarray (in-place). -``search(sub_bitarray, limit=, /)`` -> list - Searches for given sub_bitarray in self, and return list of start - positions. - The optional argument limits the number of search results to the integer - specified. By default, all search results are returned. +``search(sub_bitarray, start=0, stop=, /, right=False)`` -> iterator + Return iterator over indices where sub_bitarray is found, such that + sub_bitarray is contained within ``[start:stop]``. + The indices are iterated in ascending order (from lowest to highest), + unless ``right=True``, which will iterate in descending oder (starting with + rightmost match). + + See also: `Bitarray 3 transition `__ + + New in version 2.9: optional start and stop arguments - add optional keyword argument ``right``. + + New in version 3.0: returns iterator (equivalent to past ``.itersearch()``). ``setall(value, /)`` @@ -288,7 +284,7 @@ Other objects: ``decodetree(code, /)`` -> decodetree Given a prefix code (a dict mapping symbols to bitarrays), - create a binary tree object to be passed to ``.decode()`` or ``.iterdecode()``. + create a binary tree object to be passed to ``.decode()``. New in version 1.6. @@ -345,29 +341,6 @@ This sub-module was added in version 1.2. New in version 1.8. -``make_endian(bitarray, /, endian)`` -> bitarray - When the endianness of the given bitarray is different from ``endian``, - return a new bitarray, with endianness ``endian`` and the same elements - as the original bitarray. - Otherwise (endianness is already ``endian``) the original bitarray is returned - unchanged. - - New in version 1.3. - - New in version 2.9: deprecated - use ``bitarray()``. - - -``rindex(bitarray, sub_bitarray=1, start=0, stop=, /)`` -> int - Return rightmost (highest) index where sub_bitarray (or item - defaults - to 1) is found in bitarray (``a``), such that sub_bitarray is contained - within ``a[start:stop]``. - Raises ``ValueError`` when the sub_bitarray is not present. - - New in version 2.3.0: optional start and stop arguments. - - New in version 2.9: deprecated - use ``.index(..., right=1)``. - - ``strip(bitarray, /, mode='right')`` -> bitarray Return a new bitarray with zeros stripped from left, right or both ends. Allowed values for mode are the strings: ``left``, ``right``, ``both``