Skip to content

Commit

Permalink
deprecate support for Python 2 - add stdout message in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ilanschnell committed Dec 17, 2023
1 parent b88ce4e commit 583f379
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGE_LOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
* `.find()` and `.index()`: add keyword argument `right` for rightmost index
* `.itersearch()`: add start and stop argument, and keyword
argument `right` (for descending order - starting with rightmost match)
* deprecate support for Python 2 - Python 2 support will be removed in
bitarray version 3.0
* 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),
Expand Down
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
import sys
import platform


if sys.version_info[0] == 2:
print("""\
**************************************************************************
* Python 2 support of bitarray is deprecated (as of bitarray version 2.9)
* and will be removed in bitarray version 3.0.
**************************************************************************
""")

if "test" in sys.argv:
import bitarray
# when test was successful, return 0 (hence not)
Expand Down

0 comments on commit 583f379

Please sign in to comment.