Changelogs » Bitarray



* `util.ba2hex` now always return a string object (instead of bytes object
for Python 3)
* `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


* simplify markdown of readme so PyPI renders better
* make tests for bitarray.util required (instead of warning when
they cannot be imported)


* 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


* 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


* fix readme to pass `twine check`


* 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


* 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


* fix to compile on Windows with VS 2015, issue 72


* 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


* 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


* add exception to when README.rst cannot be opened


* add official Python 3.6 support (although it was already working)
* fix description of fill(), 52
* handle extending self correctly, 28
* copy_n: fast copy with memmove fixed, 43
* minor clarity/wording changes to README, 23


* fix issue 10, i.e. int(bitarray()) segfault
* added tests for using a bitarray object as an argument to functions
like int, long (on Python 2), float, list, tuple, dict


* add Python 2.4 support
* add (module level) function bitdiff for calculating the difference
between two bitarrays


* add iterdecode method (C level), which returns an iterator but is
otherwise like the decode method
* improve memory efficiency and speed of pickling large bitarray objects


* add buffer protocol to bitarray objects (Python 2.7 only)
* allow slice assignment to 0 or 1, e.g. a[::3] = 0  (in addition to
* moved implementation of itersearch method to C level (Lluis Pamies)
* search, itersearch now only except bitarray objects,
whereas __contains__ excepts either booleans or bitarrays
* use a priority queue for Huffman tree example (thanks to Ushma Bhatt)
* improve documentation


* fixed MSVC compile error on Python 3 (thanks to Chris Gohlke)
* add missing start and stop optional parameters to index() method
* add examples/


* update documentation to use tobytes and frombytes, rather than tostring
and fromstring (which are now deprecated)
* simplified how tests are run


* added itersearch method
* added Bloom filter example
* minor fixes in docstrings, added more tests


* porting to Python 3.x (Roland Puntaier)
* introduced tobytes, frombytes (tostring, fromstring are now deprecated)
* updated development status
* added sieve prime number example
* moved project to github:


* fixed reference counts bugs
* added possibility to slice assign to True or False, e.g. a[::3] = True
will set every third element to True


* Made C code less ambiguous, such that the package compiles on
Visual Studio, with all tests passing.


* Made changes to the C code to allow compilation with more compilers.
Compiles on Visual Studio, although there are still a few tests failing.


* Added sequential search method.
* The special method __contains__ now also takes advantage of the
sequential search.


* Simplified state information for pickling.  Argument for count is now
optional, defaults to True.  Fixed typos.


* Fixed a severe bug for 64-bit machines.  Implemented all methods in C,
improved tests.
* Removed deprecated methods from01 and fromlist.


* Added section in README about prefix codes.  Implemented _multiply method
for faster __mul__ and __imul__.  Fixed some typos.


* Implemented encode and decode method (in C) for variable-length prefix
* Added more examples, wrote README for the examples.
* Added more tests, fixed some typos.


* Fixed a memory leak, implemented a number of methods in C.
These include __getitem__, __setitem__, __delitem__, pop, remove,
insert.  The methods implemented on the Python level is very limit now.
* Implemented bitwise operations.


* Rewrote parts of the README
* Implemented memory efficient algorithm for the reverse method
* Fixed typos, added a few tests, more C refactoring.


* Improved tests, in particular added checking for memory leaks.
* Refactored many things on the C level.
* Implemented a few more methods.


* Added bit endianness property to the bitarray object
* Added the examples to the release package.


* First official release; put project to

May 2008:
Wrote the initial code, and put it on my personal web-site: