Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-bitarray for openSUSE:Factory
checked in at 2026-11-17 17:21:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-bitarray (Old)
and /work/SRC/openSUSE:Factory/.python-bitarray.new.1251 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-bitarray"
Tue Nov 17 17:21:53 2026 rev:48 rq:1398200 version:3.12.4
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-bitarray/python-bitarray.changes
2026-10-26 10:01:09.961641422 +0100
+++
/work/SRC/openSUSE:Factory/.python-bitarray.new.1251/python-bitarray.changes
2026-11-17 17:24:29.647003799 +0100
@@ -1,0 +2,8 @@
+Tue Nov 17 13:56:59 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 3.12.4:
+ * free-threaded CPython support now considered stable
+ * require PyPy 7.3.23 or higher, see #261
+ * build Linux wheels in parallel and add RISC-V wheels
+
+-------------------------------------------------------------------
Old:
----
bitarray-3.12.3.tar.gz
New:
----
bitarray-3.12.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-bitarray.spec ++++++
--- /var/tmp/diff_new_pack.Gq6Ez0/_old 2026-11-17 17:24:30.361033948 +0100
+++ /var/tmp/diff_new_pack.Gq6Ez0/_new 2026-11-17 17:24:30.362033990 +0100
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-bitarray
-Version: 3.12.3
+Version: 3.12.4
Release: 0
Summary: Efficient Arrays of Booleans
License: Python-2.0
++++++ bitarray-3.12.3.tar.gz -> bitarray-3.12.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/.github/workflows/build_wheels.yml
new/bitarray-3.12.4/.github/workflows/build_wheels.yml
--- old/bitarray-3.12.3/.github/workflows/build_wheels.yml 2026-10-19
07:55:11.000000000 +0200
+++ new/bitarray-3.12.4/.github/workflows/build_wheels.yml 2026-11-15
22:46:45.000000000 +0100
@@ -4,18 +4,36 @@
jobs:
build_wheels:
- name: Build wheels on ${{ matrix.os }}
+ name: Build wheels on ${{ matrix.os }} (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
- # macos-15-intel is an Intel runner, macos-14 is Apple silicon
- os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm,
macos-15-intel, macos-14]
+ include:
+ - os: ubuntu-latest
+ arch: auto
+ - os: ubuntu-latest
+ arch: ppc64le
+ - os: ubuntu-latest
+ arch: riscv64
+ - os: ubuntu-latest
+ arch: s390x
+ - os: ubuntu-24.04-arm
+ arch: auto
+ - os: windows-latest
+ arch: auto
+ - os: windows-11-arm
+ arch: auto
+ - os: macos-15-intel
+ arch: auto
+ # macos-15 is Apple silicon (ARM64)
+ - os: macos-15
+ arch: auto
steps:
- uses: actions/checkout@v5
- name: Set up QEMU
- if: runner.os == 'Linux' && runner.arch == 'X64'
+ if: runner.os == 'Linux' && matrix.arch != 'auto'
uses: docker/setup-qemu-action@v3
with:
platforms: all
@@ -25,9 +43,7 @@
# to supply options, put them in 'env', like:
env:
CIBW_ENABLE: pypy
- # configure cibuildwheel to build native archs ('auto'), and some
- # emulated ones
- CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto ppc64le s390x'
|| 'auto' }}
+ CIBW_ARCHS_LINUX: ${{ matrix.arch }}
CIBW_TEST_COMMAND: python -c "import bitarray; assert
bitarray.test().wasSuccessful()"
- uses: actions/upload-artifact@v4
@@ -56,7 +72,7 @@
name: Build source distribution
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
- name: Build sdist
run: pipx run build --sdist
@@ -82,6 +98,3 @@
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
- with:
- user: __token__
- password: ${{ secrets.PYPI_API_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/.github/workflows/platforms.yml
new/bitarray-3.12.4/.github/workflows/platforms.yml
--- old/bitarray-3.12.3/.github/workflows/platforms.yml 2026-10-19
07:55:11.000000000 +0200
+++ new/bitarray-3.12.4/.github/workflows/platforms.yml 2026-11-15
22:46:45.000000000 +0100
@@ -2,23 +2,30 @@
on:
workflow_dispatch:
- inputs:
- platform:
- description: Platform to test
- type: choice
- options:
- - all
- - netbsd
- - riscv64
- - sparc64
- default: all
permissions:
contents: read
jobs:
+ test-python37:
+ name: Self-tests on Python 3.7 with C assertions
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v5
+
+ - uses: actions/setup-python@v7
+ with:
+ python-version: "3.7"
+
+ - name: Build and test with C assertions enabled
+ env:
+ CFLAGS: -UNDEBUG
+ run: |
+ python setup.py build_ext --inplace
+ python -c "import bitarray; assert bitarray.test().wasSuccessful()"
+ python -m devel.test_debug
+
netbsd:
- if: inputs.platform == 'all' || inputs.platform == 'netbsd'
runs-on: ubuntu-24.04
timeout-minutes: 45
@@ -38,30 +45,7 @@
python3.14 -c \
'import bitarray; assert bitarray.test().wasSuccessful()'
- riscv64:
- if: inputs.platform == 'all' || inputs.platform == 'riscv64'
- runs-on: ubuntu-24.04
- timeout-minutes: 90
-
- steps:
- - uses: actions/checkout@v5
-
- - name: Build and test on RISC-V
- uses: uraimo/run-on-arch-action@v3
- with:
- arch: riscv64
- distro: ubuntu24.04
- install: |
- apt-get update
- apt-get install -y \
- build-essential python3-dev python3-setuptools
- run: |
- python3 setup.py build_ext --inplace
- python3 -c \
- 'import bitarray; assert bitarray.test().wasSuccessful()'
-
sparc64:
- if: inputs.platform == 'all' || inputs.platform == 'sparc64'
runs-on: ubuntu-24.04
timeout-minutes: 90
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/CHANGE_LOG
new/bitarray-3.12.4/CHANGE_LOG
--- old/bitarray-3.12.3/CHANGE_LOG 2026-10-19 07:55:11.000000000 +0200
+++ new/bitarray-3.12.4/CHANGE_LOG 2026-11-15 22:46:45.000000000 +0100
@@ -1,3 +1,10 @@
+2026-11-15 3.12.4:
+-------------------
+ * free-threaded CPython support now considered stable
+ * require PyPy 7.3.23 or higher, see #261
+ * build Linux wheels in parallel and add `RISC-V` wheels
+
+
2026-10-19 3.12.3:
-------------------
* fix unaligned buffer handling on sparc64, see #259
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/README.rst
new/bitarray-3.12.4/README.rst
--- old/bitarray-3.12.3/README.rst 2026-10-19 07:55:11.000000000 +0200
+++ new/bitarray-3.12.4/README.rst 2026-11-15 22:46:45.000000000 +0100
@@ -21,7 +21,7 @@
their in-place versions ``&=``, ``|=``, ``^=``, ``<<=``, ``>>=``).
* `Free-threading support
<https://github.com/ilanschnell/bitarray/blob/master/doc/free_threading.rst>`__
(for GIL-disabled CPython 3.14 and later)
-* Written to `support all platforms supported by CPython and PyPy
<https://github.com/ilanschnell/bitarray/blob/master/doc/platforms.rst>`__.
+* Written to support all `platforms supported
<https://github.com/ilanschnell/bitarray/blob/master/doc/platforms.rst>`__ by
CPython and PyPy.
* Fast methods for encoding and decoding variable-length
`prefix codes
<https://github.com/ilanschnell/bitarray/blob/master/doc/prefix_codes.rst>`__.
* Bitarray objects support the `buffer protocol
<https://github.com/ilanschnell/bitarray/blob/master/doc/buffer.rst>`__
@@ -66,7 +66,7 @@
$ python -c 'import bitarray; bitarray.test()'
bitarray is installed in: /Users/ilan/bitarray/bitarray
sys.prefix: /Users/ilan/miniforge
- bitarray version: 3.12.3
+ bitarray version: 3.12.4
platform.machine(): arm64
platform.platform(): macOS-14.3-arm64-arm-64bit-Mach-O
sys.platform: darwin
@@ -278,7 +278,7 @@
Reference
=========
-bitarray version: 3.12.3 -- `change log
<https://github.com/ilanschnell/bitarray/blob/master/doc/changelog.rst>`__
+bitarray version: 3.12.4 -- `change log
<https://github.com/ilanschnell/bitarray/blob/master/doc/changelog.rst>`__
In the following, ``item`` and ``value`` are usually a single bit -
an integer 0 or 1.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/bitarray/_bitarray.c
new/bitarray-3.12.4/bitarray/_bitarray.c
--- old/bitarray-3.12.3/bitarray/_bitarray.c 2026-10-19 07:55:11.000000000
+0200
+++ new/bitarray-3.12.4/bitarray/_bitarray.c 2026-11-15 22:46:45.000000000
+0100
@@ -5394,48 +5394,63 @@
reverse_trans = {0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, ..., 0xff} */
setup_table(reverse_trans, 'r');
- if ((m = PyModule_Create(&moduledef)) == NULL)
+ m = PyModule_Create(&moduledef);
+ if (m == NULL)
return NULL;
#ifdef Py_GIL_DISABLED
if (PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED) < 0)
- return NULL;
+ goto error;
#endif
if (PyType_Ready(&Bitarray_Type) < 0)
- return NULL;
+ goto error;
Py_SET_TYPE(&Bitarray_Type, &PyType_Type);
Py_INCREF((PyObject *) &Bitarray_Type);
- PyModule_AddObject(m, "bitarray", (PyObject *) &Bitarray_Type);
+ if (PyModule_AddObject(m, "bitarray", (PyObject *) &Bitarray_Type) < 0) {
+ Py_DECREF((PyObject *) &Bitarray_Type);
+ goto error;
+ }
if (add_capsule(m) < 0)
- return NULL;
+ goto error;
if (register_abc() < 0)
- return NULL;
+ goto error;
if (PyType_Ready(&DecodeTree_Type) < 0)
- return NULL;
+ goto error;
Py_SET_TYPE(&DecodeTree_Type, &PyType_Type);
Py_INCREF((PyObject *) &DecodeTree_Type);
- PyModule_AddObject(m, "decodetree", (PyObject *) &DecodeTree_Type);
+ if (PyModule_AddObject(m, "decodetree",
+ (PyObject *) &DecodeTree_Type) < 0) {
+ Py_DECREF((PyObject *) &DecodeTree_Type);
+ goto error;
+ }
if (PyType_Ready(&DecodeIter_Type) < 0)
- return NULL;
+ goto error;
Py_SET_TYPE(&DecodeIter_Type, &PyType_Type);
Py_INCREF((PyObject *) &DecodeIter_Type);
- PyModule_AddObject(m, "decodeiterator", (PyObject *) &DecodeIter_Type);
+ if (PyModule_AddObject(m, "decodeiterator",
+ (PyObject *) &DecodeIter_Type) < 0) {
+ Py_DECREF((PyObject *) &DecodeIter_Type);
+ goto error;
+ }
if (PyType_Ready(&BitarrayIter_Type) < 0)
- return NULL;
+ goto error;
Py_SET_TYPE(&BitarrayIter_Type, &PyType_Type);
if (PyType_Ready(&SearchIter_Type) < 0)
- return NULL;
+ goto error;
Py_SET_TYPE(&SearchIter_Type, &PyType_Type);
if (PyModule_AddStringMacro(m, BITARRAY_VERSION) < 0)
- return NULL;
+ goto error;
return m;
+ error:
+ Py_DECREF(m);
+ return NULL;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/bitarray/_util.c
new/bitarray-3.12.4/bitarray/_util.c
--- old/bitarray-3.12.3/bitarray/_util.c 2026-10-19 07:55:11.000000000
+0200
+++ new/bitarray-3.12.4/bitarray/_util.c 2026-11-15 22:46:45.000000000
+0100
@@ -2883,17 +2883,20 @@
#ifdef Py_GIL_DISABLED
if (PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED) < 0)
- return NULL;
+ goto error;
#endif
if (PyType_Ready(&CHDI_Type) < 0)
- return NULL;
+ goto error;
Py_SET_TYPE(&CHDI_Type, &PyType_Type);
#ifndef NDEBUG /* expose segment size in debug mode for testing */
if (PyModule_AddIntConstant(m, "_SEGSIZE", SEGSIZE) < 0)
- return NULL;
+ goto error;
#endif
return m;
+ error:
+ Py_DECREF(m);
+ return NULL;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/bitarray/bitarray.h
new/bitarray-3.12.4/bitarray/bitarray.h
--- old/bitarray-3.12.3/bitarray/bitarray.h 2026-10-19 07:55:11.000000000
+0200
+++ new/bitarray-3.12.4/bitarray/bitarray.h 2026-11-15 22:46:45.000000000
+0100
@@ -4,7 +4,7 @@
Author: Ilan Schnell
*/
-#define BITARRAY_VERSION "3.12.3"
+#define BITARRAY_VERSION "3.12.4"
#ifdef STDC_HEADERS
# include <stddef.h>
@@ -68,7 +68,8 @@
#define WBUFF(self) ((uint64_t *) (self)->ob_item)
/* assert that .nbits is in agreement with .ob_size */
-#define assert_nbits(self) assert(BYTES((self)->nbits) == Py_SIZE(self))
+#define assert_nbits(self) assert((Py_ssize_t) BYTES((self)->nbits) == \
+ Py_SIZE(self))
/* ------------ low level access to bits in bitarrayobject ------------- */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/bitarray/test_bitarray.py
new/bitarray-3.12.4/bitarray/test_bitarray.py
--- old/bitarray-3.12.3/bitarray/test_bitarray.py 2026-10-19
07:55:11.000000000 +0200
+++ new/bitarray-3.12.4/bitarray/test_bitarray.py 2026-11-15
22:46:45.000000000 +0100
@@ -3701,7 +3701,8 @@
t = bitarray(bytearray(range(256)), choice(ENDIANS))
t.bytereverse()
table = t.tobytes() # translation table
- self.assertEqual(table[:9], b'\x00\x80\x40\xc0\x20\xa0\x60\xe0\x10')
+ self.assertEqual(table[:9],
+ bytes.fromhex("00 80 40 c0 20 a0 60 e0 10"))
for n in range(100):
a = urandom_2(8 * n)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/bitarray/test_util.py
new/bitarray-3.12.4/bitarray/test_util.py
--- old/bitarray-3.12.3/bitarray/test_util.py 2026-10-19 07:55:11.000000000
+0200
+++ new/bitarray-3.12.4/bitarray/test_util.py 2026-11-15 22:46:45.000000000
+0100
@@ -1849,16 +1849,17 @@
class SC_Tests(unittest.TestCase, Util, SC_Util):
def test_explicit(self):
- for b, bits, endian in [
- (b'\x00\0', '', 'little'),
- (b'\x01\x03\x01\x03\0', '110', 'little'),
- (b'\x01\x07\x01\x40\0', '0000001', 'little'),
- (b'\x11\x07\x01\x02\0', '0000001', 'big'),
- (b'\x01\x10\x02\xf0\x0f\0', '00001111 11110000', 'little'),
- (b'\x11\x10\xa1\x0c\0', '00000000 00001000', 'big'),
- (b'\x11\x09\xa1\x08\0', '00000000 1', 'big'),
- (b'\x01g\xa4abde\0', 97 * '0' + '110110', 'little'),
+ for hexstr, bits, endian in [
+ ('00 00', '', 'little'),
+ ('01 03 01 03 00', '110', 'little'),
+ ('01 07 01 40 00', '0000001', 'little'),
+ ('11 07 01 02 00', '0000001', 'big'),
+ ('01 10 02 f0 0f 00', '00001111 11110000', 'little'),
+ ('11 10 a1 0c 00', '00000000 00001000', 'big'),
+ ('11 09 a1 08 00', '00000000 1', 'big'),
+ ('01 67 a4 61 62 64 65 00', 97 * '0' + '110110', 'little'),
]:
+ b = bytes.fromhex(hexstr)
a = bitarray(bits, endian)
self.assertEqual(sc_encode(a), b)
self.assertEQUAL(sc_decode(b), a)
@@ -1880,13 +1881,13 @@
for a in bitarray('1', 'big'), frozenbitarray('1', 'big'):
b = sc_encode(a)
self.assertIs(type(b), bytes)
- self.assertEqual(b, b'\x11\x01\x01\x80\0')
+ self.assertEqual(b, bytes.fromhex("11 01 01 80 00"))
for a in None, [], 0, 123, b'', b'\x00', 3.14:
self.assertRaises(TypeError, sc_encode, a)
def test_decode_stat_types(self):
- blob = b'\x11\x03\x01\x20\0'
+ blob = bytes.fromhex("11 03 01 20 00")
for b in blob, bytearray(blob), list(blob), array.array('B', blob):
a = sc_decode(b)
self.assertIs(type(a), bitarray)
@@ -1905,17 +1906,18 @@
self.assertTrue(all(type(n) is int for n in blocks))
def test_zero_explicit(self):
- for blob, blocks, nbits in [
+ for hexstr, blocks, nbits in [
# empty bitarray
- (b"\x00\0", [0, 0, 0, 0, 0], 0),
- (b"\x02\x00\x00\xa0\xc2\x00\xc3\x00\xc4\x00\xa0\0",
- [0, 2, 1, 1, 1], 0),
+ ("00 00", [0, 0, 0, 0, 0], 0),
+ ("02 00 00 a0 c2 00 c3 00 c4 00 a0 00",
+ [0, 2, 1, 1, 1], 0),
# zero bitarray with length 8
- (b"\x01\x08\0", [0, 0, 0, 0, 0], 8),
- (b"\x03\x08\x00\x00\0", [0, 0, 0, 0, 0], 8),
- (b"\x01\x08\x01\x00\xa0\xc2\x00\xc3\x00\xc4\x00\xa0\xa0\0",
- [1, 3, 1, 1, 1], 8),
+ ("01 08 00", [0, 0, 0, 0, 0], 8),
+ ("03 08 00 00 00", [0, 0, 0, 0, 0], 8),
+ ("01 08 01 00 a0 c2 00 c3 00 c4 00 a0 a0 00",
+ [1, 3, 1, 1, 1], 8),
]:
+ blob = bytes.fromhex(hexstr)
it = iter(blob)
a = sc_decode(it)
self.assertRaises(StopIteration, next, it)
@@ -2003,58 +2005,59 @@
self.assertRaisesMessage(
ValueError,
"read 4 bytes got negative value: -2147483648",
- sc_decode, b'\x04\x00\x00\x00\x80')
+ sc_decode, bytes.fromhex('04 00 00 00 80'))
def test_decode_errors(self):
# too many raw bytes
self.assertRaisesMessage(
ValueError, "decode error (raw): 0 + 2 > 1",
- sc_decode, b"\x01\x05\x02\xff\xff\0")
+ sc_decode, bytes.fromhex("01 05 02 ff ff 00"))
self.assertRaisesMessage(
ValueError, "decode error (raw): 32 + 3 > 34",
- sc_decode, b"\x02\x0f\x01\xa0\x03\xff\xff\xff\0")
+ sc_decode, bytes.fromhex("02 0f 01 a0 03 ff ff ff 00"))
# sparse index too high
self.assertRaisesMessage(
ValueError, "decode error (n=1): 128 >= 128",
- sc_decode, b"\x01\x80\xa1\x80\0")
+ sc_decode, bytes.fromhex("01 80 a1 80 00"))
self.assertRaisesMessage(
ValueError, "decode error (n=2): 512 >= 512",
- sc_decode, b"\x02\x00\x02\xc2\x01\x00\x02\0")
+ sc_decode, bytes.fromhex("02 00 02 c2 01 00 02 00"))
self.assertRaisesMessage(
ValueError, "decode error (n=3): 32768 >= 32768",
- sc_decode, b"\x02\x00\x80\xc3\x01\x00\x80\x00\0")
+ sc_decode, bytes.fromhex("02 00 80 c3 01 00 80 00 00"))
msg = {4: "read 4 bytes got negative value: -2147483648",
8: "decode error (n=4): 2147483648 >= 16"}
self.assertRaisesMessage(
ValueError, msg[PTRSIZE],
- sc_decode, b"\x01\x10\xc4\x01\x00\x00\x00\x80\0")
+ sc_decode, bytes.fromhex("01 10 c4 01 00 00 00 80 00"))
msg = {4: "read 4 bytes got negative value: -1",
8: "decode error (n=4): 4294967295 >= 16"}
self.assertRaisesMessage(
ValueError, msg[PTRSIZE],
- sc_decode, b"\x01\x10\xc4\x01\xff\xff\xff\xff\0")
+ sc_decode, bytes.fromhex("01 10 c4 01 ff ff ff ff 00"))
def test_stop_iteration(self):
- for stream in [b'', b'\x00', b'\x01', b'\x02\x77',
- b'\x01\x04\x01', b'\x01\x04\xa1', b'\x01\x04\xa0']:
+ for hexstr in ['', '00', '01', '02 77',
+ '01 04 01', '01 04 a1', '01 04 a0']:
for f in sc_decode, sc_stat:
- self.assertRaises(StopIteration, f, stream)
+ self.assertRaises(StopIteration, f, bytes.fromhex(hexstr))
def test_decode_ambiguity(self):
- for n, blob in [
+ for n, hexstr in [
# raw:
- (0, b'\x11\x03\x01\x20\0'), # this is what sc_encode gives us
- (0, b'\x11\x03\x01\x3f\0'), # set the pad bits to 1
- (0, b'\x12\x03\x00\x01\x20\0'), # header has redundant zeros
+ (0, '11 03 01 20 00'), # this is what sc_encode gives us
+ (0, '11 03 01 3f 00'), # set the pad bits to 1
+ (0, '12 03 00 01 20 00'), # header has redundant zeros
# sparse:
- (1, b'\x11\x03\xa1\x02\0'),
- (2, b'\x11\x03\xc2\x01\x02\x00\0'),
- (3, b'\x11\x03\xc3\x01\x02\x00\x00\0'),
- (4, b'\x11\x03\xc4\x01\x02\x00\x00\x00\0'),
+ (1, '11 03 a1 02 00'),
+ (2, '11 03 c2 01 02 00 00'),
+ (3, '11 03 c3 01 02 00 00 00'),
+ (4, '11 03 c4 01 02 00 00 00 00'),
]:
+ blob = bytes.fromhex(hexstr)
a = sc_decode(blob)
self.assertEqual(a.to01(), '001')
stat = sc_stat(blob)
@@ -2212,18 +2215,19 @@
class VL_Tests(unittest.TestCase, Util):
def test_explicit(self):
- for blob, s in [
- (b'\x40', ''),
- (b'\x30', '0'),
- (b'\x38', '1'),
- (b'\x00', '0000'),
- (b'\x01', '0001'),
- (b'\xd3\x20', '001101'),
- (b'\xe0\x40', '0000 1'),
- (b'\x90\x02', '0000 000001'),
- (b'\xb5\xa7\x18', '0101 0100111 0011'),
- (b'\x95\xb7\x1c', '0101 0110111 001110'),
+ for hexstr, s in [
+ ('40', ''),
+ ('30', '0'),
+ ('38', '1'),
+ ('00', '0000'),
+ ('01', '0001'),
+ ('d3 20', '001101'),
+ ('e0 40', '0000 1'),
+ ('90 02', '0000 000001'),
+ ('b5 a7 18', '0101 0100111 0011'),
+ ('95 b7 1c', '0101 0110111 001110'),
]:
+ blob = bytes.fromhex(hexstr)
a = bitarray(s)
self.assertEqual(vl_encode(a), blob)
c = vl_decode(blob)
@@ -2286,7 +2290,7 @@
self.assertEqual(vl_decode(s), bitarray('111'))
def test_decode_stream(self):
- stream = iter(b'\x40\x30\x38\x40\x2c\xe0\x40\xd3\x20')
+ stream = iter(bytes.fromhex('40 30 38 40 2c e0 40 d3 20'))
for bits in '', '0', '1', '', '11', '0000 1', '0011 01':
self.assertEqual(vl_decode(stream), bitarray(bits))
@@ -2690,15 +2694,16 @@
class SerializationTests(unittest.TestCase, Util):
def test_explicit(self):
- for blob, endian, bits in [
- (b'\x00', 'little', ''),
- (b'\x07\x01', 'little', '1'),
- (b'\x17\x80', 'big', '1'),
- (b'\x13\xf8', 'big', '11111'),
- (b'\x00\x0f', 'little', '11110000'),
- (b'\x10\xf0', 'big', '11110000'),
- (b'\x12\x87\xd8', 'big', '10000111 110110')
+ for hexstr, endian, bits in [
+ ('00', 'little', ''),
+ ('07 01', 'little', '1'),
+ ('17 80', 'big', '1'),
+ ('13 f8', 'big', '11111'),
+ ('00 0f', 'little', '11110000'),
+ ('10 f0', 'big', '11110000'),
+ ('12 87 d8', 'big', '10000111 110110')
]:
+ blob = bytes.fromhex(hexstr)
a = bitarray(bits, endian)
s = serialize(a)
self.assertEqual(blob, s)
@@ -2758,14 +2763,15 @@
check_msg(b)
def test_padbits_ignored(self):
- for blob, endian in [
- (b'\x07\x01', 'little'),
- (b'\x07\x03', 'little'),
- (b'\x07\xff', 'little'),
- (b'\x17\x80', 'big'),
- (b'\x17\xc0', 'big'),
- (b'\x17\xff', 'big'),
+ for hexstr, endian in [
+ ('07 01', 'little'),
+ ('07 03', 'little'),
+ ('07 ff', 'little'),
+ ('17 80', 'big'),
+ ('17 c0', 'big'),
+ ('17 ff', 'big'),
]:
+ blob = bytes.fromhex(hexstr)
a = deserialize(blob)
self.assertEqual(a.to01(), '1')
self.assertEqual(a.endian, endian)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/doc/changelog.rst
new/bitarray-3.12.4/doc/changelog.rst
--- old/bitarray-3.12.3/doc/changelog.rst 2026-10-19 07:55:11.000000000
+0200
+++ new/bitarray-3.12.4/doc/changelog.rst 2026-11-15 22:46:45.000000000
+0100
@@ -1,6 +1,13 @@
Change log
==========
+**3.12.4** (2026-11-15):
+
+* free-threaded CPython support now considered stable
+* require PyPy 7.3.23 or higher, see `#261
<https://github.com/ilanschnell/bitarray/issues/261>`__
+* build Linux wheels in parallel and add ``RISC-V`` wheels
+
+
**3.12.3** (2026-10-19):
* fix unaligned buffer handling on sparc64, see `#259
<https://github.com/ilanschnell/bitarray/issues/259>`__
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/doc/platforms.rst
new/bitarray-3.12.4/doc/platforms.rst
--- old/bitarray-3.12.3/doc/platforms.rst 2026-10-19 07:55:11.000000000
+0200
+++ new/bitarray-3.12.4/doc/platforms.rst 2026-11-15 22:46:45.000000000
+0100
@@ -7,12 +7,11 @@
32-bit and 64-bit systems, little-endian and big-endian machines, and systems
with strict memory-alignment requirements are intended to work.
-The test suite is run on Linux, macOS and Windows, using ``x86``, ``x86_64``,
-``aarch64``, ``ppc64le``, ``s390x`` and Pyodide ``wasm32`` architectures and
-both CPython and PyPy.
-Additional workflows test NetBSD on ``amd64``, and Linux on ``riscv64``
-and ``sparc64``. Platforms not exercised by these workflows are not
-necessarily unsupported.
+Wheel builds run the test suite on Linux, macOS and Windows, using ``x86``,
+``x86_64``, ``aarch64``, ``ppc64le``, ``riscv64`` and ``s390x``, and on
+Pyodide ``wasm32``. Both CPython and PyPy wheels are built where available.
+Additional workflows test NetBSD on ``amd64`` and Linux on ``sparc64``.
+Platforms not exercised by these workflows are not necessarily unsupported.
Wheels and source builds
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/doc/reference.rst
new/bitarray-3.12.4/doc/reference.rst
--- old/bitarray-3.12.3/doc/reference.rst 2026-10-19 07:55:11.000000000
+0200
+++ new/bitarray-3.12.4/doc/reference.rst 2026-11-15 22:46:45.000000000
+0100
@@ -1,7 +1,7 @@
Reference
=========
-bitarray version: 3.12.3 -- `change log
<https://github.com/ilanschnell/bitarray/blob/master/doc/changelog.rst>`__
+bitarray version: 3.12.4 -- `change log
<https://github.com/ilanschnell/bitarray/blob/master/doc/changelog.rst>`__
In the following, ``item`` and ``value`` are usually a single bit -
an integer 0 or 1.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/bitarray-3.12.3/setup.py new/bitarray-3.12.4/setup.py
--- old/bitarray-3.12.3/setup.py 2026-10-19 07:55:11.000000000 +0200
+++ new/bitarray-3.12.4/setup.py 2026-11-15 22:46:45.000000000 +0100
@@ -1,6 +1,7 @@
import re
import sys
import platform
+from sysconfig import get_config_var
if "test" in sys.argv:
@@ -23,7 +24,15 @@
kwds['version'] = pat.search(data).group(1)
macros = []
+if get_config_var("Py_GIL_DISABLED") in (1, "1"):
+ macros.append(("Py_GIL_DISABLED", "1"))
+
if platform.python_implementation() == 'PyPy':
+ min_ver = (7, 3, 23)
+ pypy_ver = sys.pypy_version_info[:3]
+ if pypy_ver < min_ver:
+ sys.exit("Not supported: PyPy %s or higher required, current PyPy "
+ "version %s" % ("%d.%d.%d" % min_ver, "%d.%d.%d" % pypy_ver))
macros.append(("PY_LITTLE_ENDIAN", str(int(sys.byteorder == 'little'))))
macros.append(("PY_BIG_ENDIAN", str(int(sys.byteorder == 'big'))))
@@ -49,7 +58,7 @@
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
- "Programming Language :: Python :: Free Threading :: 2 - Beta",
+ "Programming Language :: Python :: Free Threading :: 3 - Stable",
"Topic :: Utilities",
],
description = "efficient arrays of booleans -- C extension",
@@ -61,6 +70,7 @@
define_macros = macros,
sources = ["bitarray/_bitarray.c"]),
Extension(name = "bitarray._util",
+ define_macros = macros,
sources = ["bitarray/_util.c"])],
zip_safe = False,
**kwds