bitarray 3.12.0__tar.gz → 3.12.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bitarray-3.12.0 → bitarray-3.12.1}/PKG-INFO +6 -6
- {bitarray-3.12.0 → bitarray-3.12.1}/README.rst +5 -5
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/_util.c +8 -2
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/bitarray.h +1 -1
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/test_bitfields.py +7 -7
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray.egg-info/PKG-INFO +6 -6
- {bitarray-3.12.0 → bitarray-3.12.1}/LICENSE +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/__init__.py +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/__init__.pyi +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/_bitarray.c +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/bitfields.py +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/py.typed +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/pythoncapi_compat.h +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/test_281.pickle +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/test_bitarray.py +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/test_free_threading.py +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/test_util.py +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/util.py +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray/util.pyi +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray.egg-info/SOURCES.txt +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray.egg-info/dependency_links.txt +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray.egg-info/not-zip-safe +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/bitarray.egg-info/top_level.txt +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/pyproject.toml +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/setup.cfg +0 -0
- {bitarray-3.12.0 → bitarray-3.12.1}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bitarray
|
|
3
|
-
Version: 3.12.
|
|
3
|
+
Version: 3.12.1
|
|
4
4
|
Summary: efficient arrays of booleans -- C extension
|
|
5
5
|
Home-page: https://github.com/ilanschnell/bitarray
|
|
6
6
|
Author: Ilan Schnell
|
|
@@ -61,7 +61,7 @@ Key features
|
|
|
61
61
|
* Bitarray objects support the `buffer protocol <https://github.com/ilanschnell/bitarray/blob/master/doc/buffer.rst>`__
|
|
62
62
|
(both importing and exporting buffers).
|
|
63
63
|
* Efficient packing and unpacking for interoperability with byte-oriented
|
|
64
|
-
objects such as NumPy arrays.
|
|
64
|
+
objects such as `NumPy arrays <https://github.com/ilanschnell/bitarray/blob/master/doc/ndarray.rst>`__.
|
|
65
65
|
* Pickling and unpickling of bitarray objects.
|
|
66
66
|
* Immutable ``frozenbitarray`` objects which are hashable
|
|
67
67
|
* Fast searching for bits and bit patterns
|
|
@@ -100,8 +100,8 @@ Once you have installed the package, you may want to test it:
|
|
|
100
100
|
$ python -c 'import bitarray; bitarray.test()'
|
|
101
101
|
bitarray is installed in: /Users/ilan/bitarray/bitarray
|
|
102
102
|
sys.prefix: /Users/ilan/miniforge
|
|
103
|
-
bitarray version: 3.12.
|
|
104
|
-
sys.version: 3.
|
|
103
|
+
bitarray version: 3.12.1
|
|
104
|
+
sys.version: 3.15.0 (main, Oct 9 2026) [Clang 21.1.8]
|
|
105
105
|
sys.abiflags: ''
|
|
106
106
|
sys._is_gil_enabled(): True
|
|
107
107
|
pointer size: 64 bit
|
|
@@ -117,7 +117,7 @@ Once you have installed the package, you may want to test it:
|
|
|
117
117
|
..........s.....................................s........................
|
|
118
118
|
......s.........................................................
|
|
119
119
|
----------------------------------------------------------------------
|
|
120
|
-
Ran 711 tests in 0.
|
|
120
|
+
Ran 711 tests in 0.161s
|
|
121
121
|
|
|
122
122
|
OK (skipped=4)
|
|
123
123
|
|
|
@@ -364,7 +364,7 @@ and can therefore be used as a dictionary key:
|
|
|
364
364
|
Reference
|
|
365
365
|
=========
|
|
366
366
|
|
|
367
|
-
bitarray version: 3.12.
|
|
367
|
+
bitarray version: 3.12.1 -- `change log <https://github.com/ilanschnell/bitarray/blob/master/doc/changelog.rst>`__
|
|
368
368
|
|
|
369
369
|
In the following, ``item`` and ``value`` are usually a single bit -
|
|
370
370
|
an integer 0 or 1.
|
|
@@ -25,7 +25,7 @@ Key features
|
|
|
25
25
|
* Bitarray objects support the `buffer protocol <https://github.com/ilanschnell/bitarray/blob/master/doc/buffer.rst>`__
|
|
26
26
|
(both importing and exporting buffers).
|
|
27
27
|
* Efficient packing and unpacking for interoperability with byte-oriented
|
|
28
|
-
objects such as NumPy arrays.
|
|
28
|
+
objects such as `NumPy arrays <https://github.com/ilanschnell/bitarray/blob/master/doc/ndarray.rst>`__.
|
|
29
29
|
* Pickling and unpickling of bitarray objects.
|
|
30
30
|
* Immutable ``frozenbitarray`` objects which are hashable
|
|
31
31
|
* Fast searching for bits and bit patterns
|
|
@@ -64,8 +64,8 @@ Once you have installed the package, you may want to test it:
|
|
|
64
64
|
$ python -c 'import bitarray; bitarray.test()'
|
|
65
65
|
bitarray is installed in: /Users/ilan/bitarray/bitarray
|
|
66
66
|
sys.prefix: /Users/ilan/miniforge
|
|
67
|
-
bitarray version: 3.12.
|
|
68
|
-
sys.version: 3.
|
|
67
|
+
bitarray version: 3.12.1
|
|
68
|
+
sys.version: 3.15.0 (main, Oct 9 2026) [Clang 21.1.8]
|
|
69
69
|
sys.abiflags: ''
|
|
70
70
|
sys._is_gil_enabled(): True
|
|
71
71
|
pointer size: 64 bit
|
|
@@ -81,7 +81,7 @@ Once you have installed the package, you may want to test it:
|
|
|
81
81
|
..........s.....................................s........................
|
|
82
82
|
......s.........................................................
|
|
83
83
|
----------------------------------------------------------------------
|
|
84
|
-
Ran 711 tests in 0.
|
|
84
|
+
Ran 711 tests in 0.161s
|
|
85
85
|
|
|
86
86
|
OK (skipped=4)
|
|
87
87
|
|
|
@@ -328,7 +328,7 @@ and can therefore be used as a dictionary key:
|
|
|
328
328
|
Reference
|
|
329
329
|
=========
|
|
330
330
|
|
|
331
|
-
bitarray version: 3.12.
|
|
331
|
+
bitarray version: 3.12.1 -- `change log <https://github.com/ilanschnell/bitarray/blob/master/doc/changelog.rst>`__
|
|
332
332
|
|
|
333
333
|
In the following, ``item`` and ``value`` are usually a single bit -
|
|
334
334
|
an integer 0 or 1.
|
|
@@ -12,6 +12,12 @@
|
|
|
12
12
|
#include "pythoncapi_compat.h"
|
|
13
13
|
#include "bitarray.h"
|
|
14
14
|
|
|
15
|
+
static int
|
|
16
|
+
ascii_isspace(unsigned char c) /* Py_ISSPACE is not defined on PyPy */
|
|
17
|
+
{
|
|
18
|
+
return c == ' ' || ('\t' <= c && c <= '\r');
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
/* set during module initialization */
|
|
16
22
|
static PyTypeObject *bitarray_type;
|
|
17
23
|
|
|
@@ -872,7 +878,7 @@ hex2ba_lock_held(bitarrayobject *a, Py_buffer hexstr)
|
|
|
872
878
|
int x = hex_to_int(c);
|
|
873
879
|
|
|
874
880
|
if (x < 0) {
|
|
875
|
-
if (
|
|
881
|
+
if (ascii_isspace(c))
|
|
876
882
|
continue;
|
|
877
883
|
PyErr_Format(PyExc_ValueError, "invalid digit found for "
|
|
878
884
|
"base16, got '%c' (0x%02x)", c, c);
|
|
@@ -1105,7 +1111,7 @@ base2ba_lock_held(bitarrayobject *a, Py_buffer asciistr, int m)
|
|
|
1105
1111
|
int k, x = digit_to_int(m, c);
|
|
1106
1112
|
|
|
1107
1113
|
if (x < 0) {
|
|
1108
|
-
if (
|
|
1114
|
+
if (ascii_isspace(c))
|
|
1109
1115
|
continue;
|
|
1110
1116
|
PyErr_Format(PyExc_ValueError, "invalid digit found for "
|
|
1111
1117
|
"base%d, got '%c' (0x%02x)", 1 << m, c, c);
|
|
@@ -42,8 +42,8 @@ class PackUnpackTests(unittest.TestCase, Util):
|
|
|
42
42
|
self.assertEqual(a.endian, "big")
|
|
43
43
|
self.assertEqual(a, Example.bits)
|
|
44
44
|
a[9:15] = 1 # the 'x' pad-bits are not validated
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
for b in a, frozenbitarray(a):
|
|
46
|
+
self.assertEqual(cf.unpack(b), Example.values)
|
|
47
47
|
|
|
48
48
|
def test_offset(self):
|
|
49
49
|
cf = compile(Example.format)
|
|
@@ -96,10 +96,10 @@ class PackUnpackTests(unittest.TestCase, Util):
|
|
|
96
96
|
lst = 8 * [0]
|
|
97
97
|
self.assertRaisesMessage(TypeError, "bitarray expected, got 'list'",
|
|
98
98
|
cf.pack_into, lst, 0, 123)
|
|
99
|
-
a
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
for a in frozenbitarray(12), bitarray(buffer=b"AA"):
|
|
100
|
+
self.assertRaisesMessage(TypeError,
|
|
101
|
+
"cannot pack into read-only bitarray",
|
|
102
|
+
cf.pack_into, a, 0, 123)
|
|
103
103
|
a = bitarray(12)
|
|
104
104
|
self.assertRaises(TypeError, cf.pack_into, a, 0.0, 123)
|
|
105
105
|
for offset in 5, -7, -13, 13:
|
|
@@ -148,7 +148,7 @@ class PackUnpackTests(unittest.TestCase, Util):
|
|
|
148
148
|
cf = compile("u8")
|
|
149
149
|
self.assertRaisesMessage(TypeError, "bitarray expected, got 'list'",
|
|
150
150
|
cf.unpack_from, 8 * [0])
|
|
151
|
-
a =
|
|
151
|
+
a = cf.pack(123)
|
|
152
152
|
self.assertEqual(len(a), 8)
|
|
153
153
|
self.assertRaises(TypeError, cf.unpack_from, a, 0.0)
|
|
154
154
|
for offset in 1, -7, -9, 9:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bitarray
|
|
3
|
-
Version: 3.12.
|
|
3
|
+
Version: 3.12.1
|
|
4
4
|
Summary: efficient arrays of booleans -- C extension
|
|
5
5
|
Home-page: https://github.com/ilanschnell/bitarray
|
|
6
6
|
Author: Ilan Schnell
|
|
@@ -61,7 +61,7 @@ Key features
|
|
|
61
61
|
* Bitarray objects support the `buffer protocol <https://github.com/ilanschnell/bitarray/blob/master/doc/buffer.rst>`__
|
|
62
62
|
(both importing and exporting buffers).
|
|
63
63
|
* Efficient packing and unpacking for interoperability with byte-oriented
|
|
64
|
-
objects such as NumPy arrays.
|
|
64
|
+
objects such as `NumPy arrays <https://github.com/ilanschnell/bitarray/blob/master/doc/ndarray.rst>`__.
|
|
65
65
|
* Pickling and unpickling of bitarray objects.
|
|
66
66
|
* Immutable ``frozenbitarray`` objects which are hashable
|
|
67
67
|
* Fast searching for bits and bit patterns
|
|
@@ -100,8 +100,8 @@ Once you have installed the package, you may want to test it:
|
|
|
100
100
|
$ python -c 'import bitarray; bitarray.test()'
|
|
101
101
|
bitarray is installed in: /Users/ilan/bitarray/bitarray
|
|
102
102
|
sys.prefix: /Users/ilan/miniforge
|
|
103
|
-
bitarray version: 3.12.
|
|
104
|
-
sys.version: 3.
|
|
103
|
+
bitarray version: 3.12.1
|
|
104
|
+
sys.version: 3.15.0 (main, Oct 9 2026) [Clang 21.1.8]
|
|
105
105
|
sys.abiflags: ''
|
|
106
106
|
sys._is_gil_enabled(): True
|
|
107
107
|
pointer size: 64 bit
|
|
@@ -117,7 +117,7 @@ Once you have installed the package, you may want to test it:
|
|
|
117
117
|
..........s.....................................s........................
|
|
118
118
|
......s.........................................................
|
|
119
119
|
----------------------------------------------------------------------
|
|
120
|
-
Ran 711 tests in 0.
|
|
120
|
+
Ran 711 tests in 0.161s
|
|
121
121
|
|
|
122
122
|
OK (skipped=4)
|
|
123
123
|
|
|
@@ -364,7 +364,7 @@ and can therefore be used as a dictionary key:
|
|
|
364
364
|
Reference
|
|
365
365
|
=========
|
|
366
366
|
|
|
367
|
-
bitarray version: 3.12.
|
|
367
|
+
bitarray version: 3.12.1 -- `change log <https://github.com/ilanschnell/bitarray/blob/master/doc/changelog.rst>`__
|
|
368
368
|
|
|
369
369
|
In the following, ``item`` and ``value`` are usually a single bit -
|
|
370
370
|
an integer 0 or 1.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|