14
0

- update to 3.5.2:

* optimize util.random_p() by also using bitwise AND in final
    step
  * fix DeprecationWarning regarding u type code
  * add verification tests for internals of util.random_p()
  * optimize util.random_p() for n < 100
  * add Random Bitarrays documentation
  * add statistical tests for random functions

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bitarray?expand=0&rev=74
This commit is contained in:
2025-07-22 09:53:24 +00:00
committed by Git OBS Bridge
commit a1354970e2
15 changed files with 831 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
bitarray-2.9.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:33c5ff01fa0241d34dcea34efc7bbb86ebcb3ad28946e23fc4970642f4554ac5
size 182432

3
bitarray-3.0.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7d10d1bd057428f4442da4a0724332e83f2fcaf33d01941b5c1a6b852339979d
size 177808

3
bitarray-3.2.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b5c206dd7f8918f34d479800d4ad439b7859b021b19dfbc36382b0a0b56cb1a
size 190625

3
bitarray-3.3.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3997d05edb177485eee4be516b0f122e8eda508e4e1d85124daea8ae8b4ad1e9
size 194582

3
bitarray-3.3.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7700007acdd7fd7192897f1d46671cedb8fefb1c7e2a56d188ee430ecb84eea0
size 195557

3
bitarray-3.4.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:38c3bb389ad3cee4d6466fefe4cff8671b2f9918bd47ad684b259bd1f8c71f3c
size 197913

3
bitarray-3.4.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2d7ee49b657c7945428e802ca949eb934d5449faabf05046945e9be0544e769e
size 201268

3
bitarray-3.4.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a23013d4aacb27a73d66e08e9de84d2b051f6c7ff902b7afe2db2371c6885793
size 203403

3
bitarray-3.4.3.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2dbc33cdfddc9df3da346ed6fd2df03a8a723a7f7b06434b365062d8abebc245
size 204499

3
bitarray-3.5.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c4da4f8d0d3a7a78e6676ef29080530e87b21ac21725068c866f18e859303602
size 209963

3
bitarray-3.5.2.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3a8bdf36e009a31568aab9fb49d195b3dc9dceba30ac9233fa1622641db84ae6
size 215732

700
python-bitarray.changes Normal file
View File

@@ -0,0 +1,700 @@
-------------------------------------------------------------------
Tue Jul 22 09:53:19 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 3.5.2:
* optimize util.random_p() by also using bitwise AND in final
step
* fix DeprecationWarning regarding u type code
* add verification tests for internals of util.random_p()
* optimize util.random_p() for n < 100
* add Random Bitarrays documentation
* add statistical tests for random functions
-------------------------------------------------------------------
Sat Jul 12 11:38:34 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 3.5.0:
* add util.random_p()
* improve sparse compression testing
-------------------------------------------------------------------
Thu Jul 3 09:59:29 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 3.4.3
* minor updates to documentation
* C-level:
- simplify and speedup `extend_unicode01()`
- customize `resize_lite()` - avoid unused code
- use `PyTypeObject` for bitarray type object in `_util.c` to
be consistent with `_bitarray.c`
- add and improve comments to implementation of sparse bitarray
compression
- simplify `sc_count()`
-------------------------------------------------------------------
Fri Jun 6 05:30:55 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
-------------------------------------------------------------------
Fri May 30 06:40:23 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 3.4.2
* extend documentation of
[compression of sparse bitarrays](sparse_compression.rst)
* `util.sc_decode()` and `util.vl_decode()` now raise `StopIteration`
instead of `ValueError` when unexpected end of stream is encountered
* add debug mode tests for `read_n()`, `write_n()` and `count_from_word()`
-------------------------------------------------------------------
Sat May 17 18:02:05 UTC 2025 - Martin Hauke <mardnh@gmx.de>
- Update to version 3.4.1
* add `pyproject.toml`, see #233
* implement `bits2bytes()` in C.
* optimize `delslice()` when `step` is larger than about 5.
* consistently name `*_span()` and `*_range()` in C for
invert, set and count.
* organize and add tests.
-------------------------------------------------------------------
Wed May 14 09:31:52 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 3.4.0
* remove `.endian()` method in favor of data descriptor `.endian`
* allow bitarray initializer `bytes` or `bytearray` to set buffer directly
* allow calling `.extend()` with `bytes` object (although the only
valid bytes are 0x00 and 0x01)
* add `util.byteswap()`
* add `util.correspond_all()`
* fix `.reverse()` for imported buffer
* drop Python 3.5 support
* add tests
-------------------------------------------------------------------
Mon May 5 06:46:24 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 3.3.2
* fix off-by-one-error in check for length of count argument
in `util.canonical_decode()`
* simplify `util.int2ba()`
* add tests
* add [masked indexing example](../examples/masked.py)
* add [tricks example](../examples/tricks.py)
-------------------------------------------------------------------
Thu Apr 24 06:52:44 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 3.3.1:
* remove License classifier in favor of a SPDX license
expression, #231
* reorganize and cleanup many tests
* add optional group and sep arguments' to .to01(), #230 - as
well as util.ba2hex() and util.ba2base()
* ignore whitespace in util.base2ba() and util.hex2ba()
* check for embedded nul characters when extending (and
initializing) bitarray from string
* improve testing
* add double precision floating point number example
-------------------------------------------------------------------
Tue Mar 25 12:35:45 UTC 2025 - Nico Krapp <nico.krapp@suse.com>
- Update to 3.2.0
* add `util.xor_indices()`, #229
* add Hamming code example
- Update to 3.1.1
* updated `pythoncapi_compat.h` for pypy3.11 support, see #227
* use `__builtin_parityll()` when available in `util.parity()`
* add `parity_64()` to header
* simplify some tests
* add LFSR example
- Update to 3.1.0
* allow mask assignment to bitarrays, see #225
* add missing masked operations to pyi-file
* refactor `resize()` and avoid overallocation when downsizing buffer
* update `build_wheels.yml`
* fix some typos
* minor simplifications
* rename `growth/` example to `resize/` and add tests for `resize()`
* update gene example
* add comments
-------------------------------------------------------------------
Mon Oct 28 11:36:18 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 3.0.0:
* 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
* add official Python 3.13 support
* update cibuildwheel to 2.21.3
* minor simplifications
* fix some typos
-------------------------------------------------------------------
Mon Sep 30 19:41:46 UTC 2024 - Guang Yee <gyee@suse.com>
- Enable sle15_python_module_pythons.
-------------------------------------------------------------------
Mon Jan 8 20:42:40 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 2.9.2:
* optimize initialization from strings by not constantly
resizing buffer
* optimize util.hex2ba() and util.base2ba() by avoiding
unnecessary copies
* optimize util.base2ba() and util.ba2base() for n=16
(hexadecimal)
-------------------------------------------------------------------
Wed Dec 27 09:29:57 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.9.1:
* avoid buffer being unnecessarily initialized with 0s in
several functions of the ``bitarray.util`` module
* fix ``.count()`` type hint in pyi-file
* improve testing
* deprecate support for Python 2 - Python 2.7 support will be
removed in bitarray version 3.0
* ``bitarray(n)`` for integer initializer ``n`` will always
return a bitarray of length ``n`` with all items initialized
to ``0``
* allow sub-bitarray in ``.count()``, `#212
* add ``util.ones()`` ``.find()`` and ``.index()``:
add keyword argument ``right`` for rightmost index
* ``.itersearch()``: add start and stop argument, and keyword
* argument ``right``
* deprecate ``util.rindex()`` (will be removed in 3.0 release),
* use ``.index(..., right=True)`` instead
* deprecate ``util.make_endian()`` (will be removed in 3.0
release),
* use ``bitarray(..., endian=...)`` instead
-------------------------------------------------------------------
Mon Dec 11 22:13:34 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.8.5:
* speedup unaligned copies by always using word shifts (in
combination with builtin byte swap 64 when available) when
bit-endianness and machine byte-order are opposite
* add ``HAVE_BUILTIN_BSWAP64`` to header
* avoid misaligned pointers when casting to ``(uint64_t *)``
* add tests
-------------------------------------------------------------------
Tue Dec 5 17:42:19 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.8.4:
* simplify ``copy_n()`` (remove special cases)
* add `word shift example C program
* and simplify ``shift_r8()``
* improve documentation and testing
-------------------------------------------------------------------
Tue Nov 14 12:07:00 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.8.3:
* ensure readonly attribute is set correctly when creating new
objects
* optimize sparse bitarray compression for raw block type
* improve hash functions in Bloom filter example
-------------------------------------------------------------------
Thu Oct 5 09:32:42 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.8.2:
* improve error messages for masked assignment
* simplify test collection
* added ``pytest.ini`` to allow running pytest with no
additional arguments
* ``util.sc_encode()``: avoid writing empty blocks at end of
compressed stream, ie. skip encoding when total population
count is reached
-------------------------------------------------------------------
Wed Aug 9 07:48:36 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.8.1:
* use reconstructor function for pickling
* simplify implementation of ``.reverse()``
* allow `integer sequence indexing <indexing.rst>`__ by list of
indices,
* add `masked indexing <indexing.rst>`__ by bitarray masks,
* improve ``.bytereverse()`` docstring, see issue
-------------------------------------------------------------------
Sun Jun 25 19:01:34 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.7.6:
* remove caching hash value
-------------------------------------------------------------------
Sun Jun 11 11:51:40 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.7.5:
* fix for pypy3.9-v7.3.11
* register ``bitarray`` as ``abc.MutableSequence``
* improve documentation regarding type when indexing single
* bitarray items
-------------------------------------------------------------------
Mon Mar 6 21:24:14 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.7.3:
* allow running ``python setup.py test``
* add official Python 3.12 support
* simplify count functionality in util module
* retire ``bitcount_lookup[256]`` table
* improve ``util.count_n()`` error messages
* avoid ``util`` module tests from being run more than once in
each call to ``bitarray.test()`` when called multiple times in
the same Python process
* improve testing
-------------------------------------------------------------------
Wed Feb 15 13:59:36 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.7.2:
* speedup all count functionality by using
``__builtin_popcountll`` when available
* add ``popcount64()`` to ``bitarray.h`` - we assume now that
``uint64_t`` is always available
* improve testing
-------------------------------------------------------------------
Fri Feb 10 17:42:13 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.7.1:
* optimize ``util.sc_encode()``
-------------------------------------------------------------------
Fri Feb 10 10:27:32 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.7.0:
* add util.sc_encode() and util.sc_decode() for
compression of sparse bitarrays
* add util.any_and()
* add util.intervals()
* move functionality of the following utility functions
entirely to C:
hex2ba(), base2ba(), deserialize(), vl_decode(), zeros()
* improve error checking for unpickling
* add distance metrics
-------------------------------------------------------------------
Mon Jan 2 18:35:34 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 2.6.2:
* optimize `richcompare()` for opposite endianness
* improve some docstrings add tests
* add documentation on shift operators, #181
* fix typo in iterable initializer description, #179
* optimize `richcompare()`
-------------------------------------------------------------------
Fri Sep 23 02:36:48 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to 2.6.0:
* add data descriptions: `.nbytes`, `.padbits`, `.readonly`
* allow optional `endian` argument to be `None` when creating bitarrays
* fix type annotation for `canonical_decode()`, #178
* frozenbitarray's padbits are now guaranteed to be zero
* add tests
- Update to 2.5.1:
* optimize `.reverse()`, see #177
* allow negative (byte) indices in `.bytereverse()`
- Update to 2.5.0:
* add calculating of canonical Huffman codes `util.canonical_huffman()`
and decoding thereof `util.canonical_decode()`, see #173
* allow creating "Huffman codes" from frequency maps with a single symbol
in `util.huffman_code()` and `util.canonical_huffman()`, see #172
* allow bytes-like argument in `.frombytes()` and `.pack()` - previously,
the arguments were limited to the `bytes` object, see #174
* allow bytes-like arguments in `util.deserialize()`
* add official [pyodide](https://pyodide.org/) support
* add [DEFLATE decompression](../examples/puff/) example
* optimize `.bytereverse()`
* optimize `delslice()` for cases like `del a[1:17:2]` when `a` is large
* fix `examples/huffman/compress.py` to handle files with 0 or 1 characters,
see also #172
* add `skipIF` decorator for skipping tests
* add tests
- Update to 2.4.1:
* improve `resize()`, see #167
* optimize `copy_n()` by avoiding loops, #171
* `.bytereverse()` no longer sets unused pad bits to zero
-------------------------------------------------------------------
Sun Mar 27 14:18:57 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 2.4.0:
* enable building wheels for multiple platforms and Python versions using
pypa/cibuildwheel, see #165 and #170 (thanks Brian Thorne, @hardbyte)
* use setuptools instead of distutils in `setup.py`, #168
* add missing type hinting for `.count()` step argument
-------------------------------------------------------------------
Thu Aug 19 12:55:23 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 2.3.0
* add optional `buffer` argument to `bitarray()` to import the buffer of
another object, #141, #146, see also: [buffer protocol](buffer.rst)
* update `.buffer_info()` to include: a read-only flag, an imported buffer
flag, and the number of buffer exports
* add optional start and stop arguments to `util.rindex()`
* add [memory-mapped file](../examples/mmapped-file.py) example
* ignore underscore (`_`) in string input, e.g. `bitarray('1100_0111')`
* add missing type hinting for new `.bytereverse()` arguments
* fix `.extend()` type annotations, #145
* avoid `.reverse()` using temporary memory
* make `.unpack()`, `util.serialize()`, `util.vl_encode()`
and `.__reduce__()` more memory efficient
* add and improve tests
- from version 2.2.5
* speedup `find_bit()` and `find_last()` using uint64 checking, this means
a speedup for `.find()`, `.index()`, `.search()` and `util.rindex()`
* add optional start and stop arguments to `.bytereverse()`
* add example to illustrate how
[unaligned copying](../examples/copy_n.py) works internally
* add documentation
* add tests
- from version 2.2.4
* use shift operations to speedup all unaligned copy operations, #142
* expose functionality to Python level only in debug mode for testing
* add and improve tests
- from version 2.2.3
* speedup `repeat()`, #136
* speedup shift operations, #139
* optimize slice assignment with negative step, e.g.: `a[::-1] = 1`
* add tests
- from version 2.2.2
* speedup slice assignment, see #132 and #135
* speedup bitwise operations, #133
* optimize `getbit()` and `setbit()` in `bitarray.h`
* fix TypeError messages when bitarray or int (0, 1) are expected (bool
is a subclass of int)
* add and improve tests
- from version 2.2.1
* improve documentation
* speedup `vl_encode()`
* `bitarray.h`: make `getbit()` always an (inline) function
* add assertions in C code
- from version 2.2.0
* add `bitarray.util.vl_encode()` and `bitarray.util.vl_decode()` which
uses a [variable length bitarray format](variable_length.rst), #131
- from version 2.1.3
* Fix building with MSVC / Bullseye, #129
-------------------------------------------------------------------
Sat Jul 17 08:25:28 UTC 2021 - Martin Hauke <mardnh@gmx.de>
- Update to 2.2.2
* support type hinting for all Python 3 versions (that bitarray
supports, 3.5 and higher currently).
* add explicit endianness to two tests.
-------------------------------------------------------------------
Sat Jun 12 08:07:51 UTC 2021 - Martin Hauke <mardnh@gmx.de>
- Update to 2.1.1
* add type hinting (see PEP 484, 561) using stub (`.pyi`) files
- Update to 2.1.0
* add `.find()` method, see #122
* `.find()`, `.index()`, `.search()` and `.itersearch()` now all
except both (sub-) bitarray as well as bool items to be
searched for
* improve encode/decode error messages
* add [lexicographical permutations example](../examples/lexico.py)
- Update to 2.0.1
* update documentation
* improve some error messages
- Update to 2.0.0
* require more specific objects, int (0 or 1) or bool
* items are always returned as int 0 or 1
* remove `.length()` method (deprecated since 1.5.1 - use `len()`)
* in `.unpack()` the `one` argument now defaults to 0x01 (was 0xff)
* `.tolist()` now always returns a list of integers (0 or 1)
* fix frozenbitarray hash function, see #121
* fix frozenbitarray being mutable by `<<=` and `>>=`
* support sequence protocol in `.extend()` (and bitarray creation)
* improve OverflowError messages from `util.int2ba()`
* add [hexadecimal example](../examples/hexadecimal.py)
-------------------------------------------------------------------
Sat Apr 10 07:45:02 UTC 2021 - Martin Hauke <mardnh@gmx.de>
- Update to 1.9.2
* update pythoncapi_compat: Fix support with PyPy 3.7
- Update to 1.9.0
* add shift operations (``<<``, ``>>``, ``<<=``, ``>>=``)
* add ``bitarray.util.ba2base()`` and ``bitarray.util.base2ba()``,
- Update to 1.8.2
* fix crash caused by unsupported types in binary operations,
* speedup initializing or extending a bitarray from another
with different bit endianness.
* add formatting options to ``bitarray.util.pprint()``
* add and improve tests (all 291 tests run in less than half
a second on a modern machine)
- Update to 1.8.1
* moved implementation of and ``hex2ba()`` and ``ba2hex()``
to C-level
* add ``bitarray.util.parity()``
- Update to 1.8.0
* add ``bitarray.util.serialize()`` and
``bitarray.util.deserialize()``
* allow whitespace (ignore space and ``\n\r\t\v``) in input
strings; e.g. ``bitarray('01 11')`` or ``a += '10 00'``
* add ``bitarray.util.pprint()``
* When initializing a bitarray from another with different
bit endianness, e.g. ``a = bitarray('110', 'little')``
and ``b = bitarray(a, 'big')``, the buffer used to be
simply copied, with consequence that ``a == b`` would
result in ``False``. This is fixed now, that is
``a == b`` will always evaluate to ``True``.
* add test for loading existing pickle file (created using
bitarray 1.5.0)
- Update to 1.7.1
* Raise TypeError when incorrect index is used during
assignment, e.g. ``a[1.5] = 1``
* raise TypeError (not IndexError) when assigning slice to
incorrect type, e.g. ``a[1:4] = 1.2``
* improve some docstrings and tests
- Update to 1.7.0
* add ``bitarray.util.urandom()``
* raise TypeError when trying to extend bitarrays from bytes
on Python 3, ie. ``bitarray(b'011')`` and ``.extend(b'110')``.
(Deprecated since 1.4.1)
- Update to 1.6.2
* use ``Py_SET_TYPE()`` and ``Py_SET_SIZE()`` for Python 3.10
* add official Python 3.10 support
* fix slice assignment to same object,
e.g. ``a[2::] = a`` or ``a[::-1] = a``,
* add bitarray.h,
-------------------------------------------------------------------
Fri Nov 6 10:48:49 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Update to 1.6.1
* use PyType_Ready for all types: bitarray, bitarrayiterator,
decodeiterator, decodetree, searchiterator.
- Update to 1.6.0
* add `decodetree` object, for speeding up consecutive calls
to `.decode()` and `.iterdecode()`, in particular when dealing
with large prefix codes.
* add optional parameter to `.tolist()` which changes the items
in the returned list to integers (0 or 1), as opposed to
Booleans.
* remove deprecated `bitdiff()`, which has been deprecated since
version 1.2.0, use `bitarray.util.count_xor()` instead
* drop Python 2.6 support.
* update license file.
-------------------------------------------------------------------
Wed Sep 30 04:35:36 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.5.3:
* add optional index parameter to `.index()` to invert single bit
* fix `sys.getsizeof(bitarray)` by adding `.__sizeof__()`, see issue #100
-------------------------------------------------------------------
Mon Aug 31 04:58:58 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.5.2:
* add PyType_Ready usage, issue #66
* speedup search() for bitarrays with length 1 in sparse bitarrays,
see issue #67
* add tests
* support signed integers in `util.ba2int()` and `util.int2ba()`,
see issue #85
* deprecate `.length()` in favor of `len()`
* Use `Py_ssize_t` for bitarray index. This means that on 32bit
systems, the maximun number of elements in a bitarray is 2 GBits.
We used to have a special 64bit index type for all architectures, but
this prevented us from using Python's sequence, mapping and number
methods, and made those method lookups slow.
* speedup slice operations when step size = 1 (if alignment allows
copying whole bytes)
* Require equal endianness for operations: `&`, `|`, `^`, `&=`, `|=`, `^=`.
This should have always been the case but was overlooked in the past.
* raise TypeError when tring to create bitarray from boolean
* This will be last release to still support Python 2.6 (which was retired
in 2013). We do NOT plan to stop support for Python 2.7 anytime soon.
-------------------------------------------------------------------
Wed Aug 5 00:59:24 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.4.2:
* C-level:
- simplify pack/unpack code
- fix memory leak in `~` operation (bitarray_cpinvert)
* add official Python 3.9 support
* improve many docstrings
* add DeprecationWarning for `bitdiff()`
* add DeprecationWarning when trying to extend bitarrays
from bytes on Python 3 (`bitarrays(b'011')` and `.extend(b'110')`)
* C-level:
- rewrote `.fromfile()` and `.tofile()` implementation,
such that now the same code is used for Python 2 and 3.
The new implementation is more memoery efficient on
Python 3.
- use memcmp() in richcompare to shortcut EQ/NE, when
comparing two very large bitarrays for equality the
speedup can easily be 100x
- simplify how unpacking is handled
* add more tests
* add `.clear()` method (Python 3.3 added this method to lists)
* avoid overallocation when bitarray objects are initially created
* raise BufferError when resizing bitarrays which is exporting buffers
* add example to study the resize() function
* improve some error messages
* raise `NotImplementedError` with (useful message) when trying to call
the `.fromstring()` or `.tostring()` methods, which have been removed
in the last release
-------------------------------------------------------------------
Mon Jul 6 18:40:25 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.3.0
* add `bitarray.util.make_endian()`
* `util.ba2hex()` and `util.hex2ba()` now also support
little-endian
* add `bitarray.get_default_endian()`
* made first argument of initializer a positional-only parameter
* remove `.fromstring()` and `.tostring()` methods, these have
been deprecated 8 years ago, since version 0.4.0
* add `__all__` in `bitarray/__init__.py`
* drop Python 3.3 and 3.4 support
- Update to version 1.2.2
* `util.ba2hex` now always return a string object (instead of
bytes object for Python 3), see issue #94
* `util.hex2ba` allows a unicode object as input on Python 2
* Determine 64-bitness of interpreter in a cross-platform
fashion #91, in order to better support PyPy
-------------------------------------------------------------------
Tue Mar 24 18:38:34 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Run testsuite
-------------------------------------------------------------------
Sun Mar 22 16:28:34 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.2.1
* simplify markdown of readme so PyPI renders better
* make tests for bitarray.util required (instead of warning when
they cannot be imported)
- Update to version 1.2.0
* add bitarray.util module which provides useful utility functions
* deprecate `bitarray.bitdiff` in favor of `bitarray.util.count_xor`
* use markdown for documentation
* fix bug in .count() on 32bit systems in special cases when array size
is 2^29 bits or larger
* simplified tests by using bytes syntax
* update smallints and sieve example to use new utility module
* simplified mandel example to use numba
* use file context managers in tests
- Update to version 1.1.0
* add frozenbitarray object
* add optional start and stop parameters to .count() method
* add official Python 3.8 support
* optimize setrange() C-function by using memset
* fix issue #74, bitarray is hashable on Python 2
* fix issue #68, `unittest.TestCase.assert_` deprecated
* improved test suite - tests should run in about 1 second
* update documentation to use positional-only syntax in docstrings
* update readme to pass Python 3 doctest
* add utils module to examples
- Specfile cleanup
-------------------------------------------------------------------
Fri Jul 19 00:00:00 UTC 2019 - Andres Ayala <killerrex@gmail.com>
Version 1.0.1:
- fix readme to pass ``twine check``
-------------------------------------------------------------------
Mon Jul 15 00:00:00 UTC 2019 - killerrex@gmail.com
Version 1.0.0:
- fix bitarrays beings created from unicode in Python 2
- use ``PyBytes_*`` in C code, treating the Py3k function names as default,
which also removes all redefinitions of ``PyString_*``
- handle negative arguments of .index() method consistently with how
they are treated for lists
- add a few more comments to the C code
- move imports outside tests: pickle, io, etc.
- drop Python 2.5 support
-------------------------------------------------------------------
Mon May 20 00:00:00 UTC 2019 - killerrex@gmail.com
Version 0.9.3:
- refactor resize() - only shrink allocated memory if new size falls
lower than half the allocated size
- improve error message when trying to initialize from float or complex
-------------------------------------------------------------------
Mon Apr 29 00:00:00 UTC 2019 - killerrex@gmail.com
Version 0.9.2:
- fix fail to compile on Windows with VS 2015, issue #72
-------------------------------------------------------------------
Sun Apr 28 00:00:00 UTC 2019 - killerrex@gmail.com
Version 0.9.1:
- fix types to actually be types, #29
- check for ambiguous prefix codes when building binary tree for decoding
- remove Python level methods: encode, decode, iterdecode (in favor of
having these implemented on the C-level along with check_codedict)
- fix self tests for Python 2.5 and 2.6
- move all Huffman code related example code into examples/huffman
- add code to generate graphviz .dot file of Huffman tree to examples
-------------------------------------------------------------------
Mon Apr 22 00:00:00 UTC 2019 - killerrex@gmail.com
Version 0.9:
- more efficient decode and iterdecode by using C-level binary tree
instead of a python one, #54
- added buffer protocol support for Python 3, #55
- fixed invalid pointer exceptions in pypy, #47
- made all examples Py3k compatible
- add gene sequence example
- add official Python 3.7 support
- drop Python 2.4, 3.1 and 3.2 support
-------------------------------------------------------------------
Wed May 2 10:04:07 UTC 2018 - killerrex@gmail.com
- Migrate to singlespec
-------------------------------------------------------------------
Thu Oct 24 10:59:15 UTC 2013 - speilicke@suse.com
- Require python-setuptools instead of distribute (upstreams merged)
-------------------------------------------------------------------
Thu May 16 17:58:51 UTC 2013 - jfunk@funktronics.ca
- Rename test skip patch
-------------------------------------------------------------------
Sat May 11 00:41:15 UTC 2013 - jfunk@funktronics.ca
- Initial release

74
python-bitarray.spec Normal file
View File

@@ -0,0 +1,74 @@
#
# spec file for package python-bitarray
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-bitarray
Version: 3.5.2
Release: 0
Summary: Efficient Arrays of Booleans
License: Python-2.0
URL: https://github.com/ilanschnell/bitarray
Source: https://github.com/ilanschnell/bitarray/archive/%{version}.tar.gz#/bitarray-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
# SECTION test requirements
BuildRequires: %{python_module dbm}
BuildRequires: %{python_module pytest}
# /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%python_subpackages
%description
This module provides an object type which efficiently represents an
array of booleans. Bitarrays are sequence types and behave very
much like usual lists. Eight bits are represented by one byte in a
contiguous block of memory. The user can select between two
representations; little-endian and big-endian.
All of the functionality is implemented in C. Methods for accessing
the machine representation are provided. This can be useful when
bit level access to binary files is required, such as portable
bitmap image files (.pbm).
Also, when dealing with compressed data which uses variable bit
length encoding, you may find this module useful.
%prep
%setup -q -n bitarray-%{version}
%build
export CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
rm examples/resize/.gitignore examples/puff/.gitignore
%check
# tests don't run from within the source directory
%python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}; cd /tmp/; $python -c 'import bitarray; bitarray.test()'
%files %{python_files}
%license LICENSE
%doc examples CHANGE_LOG README.rst
%{python_sitearch}/bitarray
%{python_sitearch}/bitarray-%{version}.dist-info
%changelog