|
5 | 5 | :depth: 1 |
6 | 6 | :local: |
7 | 7 |
|
| 8 | +.. _bitmath-2.1.0: |
| 9 | + |
| 10 | +bitmath-2.1.0 |
| 11 | +************* |
| 12 | + |
| 13 | +*Unreleased* |
| 14 | + |
| 15 | +bitmath 2.1.0 is a focused follow-up to the 2.0.0 modernization. It |
| 16 | +finishes the last of the Python 2 cleanup, tightens the project's |
| 17 | +quality tooling, and retires one piece of legacy API surface. |
| 18 | + |
| 19 | + |
| 20 | +Breaking Changes |
| 21 | +================ |
| 22 | + |
| 23 | +**Internal representation is uniformly floating-point** |
| 24 | + Every bitmath instance now stores its size as a 64-bit float, no |
| 25 | + matter which constructor created it. Previously the ``bytes=`` and |
| 26 | + ``bits=`` keyword constructors, along with the bit-family value |
| 27 | + constructors such as ``Kib(N)``, leaked Python ``int`` values |
| 28 | + through the ``.bytes`` and ``.bits`` properties. Those properties |
| 29 | + now always return ``float``, matching the long-documented |
| 30 | + floating-point measurement design described in the :ref:`Rules for |
| 31 | + Math <appendix_math>` appendix. Equality, ordering, ``repr()``, and |
| 32 | + arithmetic results are unchanged; only code that inspected |
| 33 | + ``type(instance.bytes)`` or ``type(instance.bits)`` directly will |
| 34 | + observe the difference. |
| 35 | + |
| 36 | +**listdir() is deprecated** |
| 37 | + :func:`bitmath.listdir` now emits a :exc:`DeprecationWarning` on |
| 38 | + every call and will be removed in a future release. Iterate with |
| 39 | + :py:func:`os.walk` and call :func:`bitmath.getsize` directly |
| 40 | + instead. Closes `issue #27 |
| 41 | + <https://github.com/timlnx/bitmath/issues/27>`_. |
| 42 | + |
| 43 | + |
| 44 | +Library Improvements |
| 45 | +==================== |
| 46 | + |
| 47 | +**pathlib support** |
| 48 | + :func:`bitmath.getsize` and :func:`bitmath.listdir` now accept |
| 49 | + :class:`pathlib.Path` objects, not just strings, for their path |
| 50 | + and ``search_base`` arguments. |
| 51 | + |
| 52 | + |
| 53 | +Project Infrastructure |
| 54 | +====================== |
| 55 | + |
| 56 | +**Linting moved to pylint** |
| 57 | + pylint replaces flake8/pyflakes across the CI workflow and the |
| 58 | + local toolchain, and the library is held at a 10.00/10 score. |
| 59 | + pycodestyle is retained for the PEP 8 whitespace checks pylint |
| 60 | + does not cover. |
| 61 | + |
| 62 | +**Security scanning with bandit** |
| 63 | + bandit runs as part of ``make ci`` and as a dedicated GitHub |
| 64 | + Actions workflow that fires on every push, every pull request, and |
| 65 | + on a weekly schedule, scanning both ``bitmath/`` and ``tests/``. |
| 66 | + |
| 67 | +**100% test coverage** |
| 68 | + The remaining coverage gaps were closed, including the |
| 69 | + platform-specific :func:`bitmath.query_device_capacity` branches, |
| 70 | + bringing the suite to 100% measured coverage on every supported |
| 71 | + platform. |
| 72 | + |
| 73 | +**SPDX license headers** |
| 74 | + Every source and test file now carries ``SPDX-License-Identifier`` |
| 75 | + and ``SPDX-FileCopyrightText`` headers. |
| 76 | + |
| 77 | +**Single-sourced version** |
| 78 | + The package version is read dynamically from the ``VERSION`` file |
| 79 | + by hatchling, so bumping that one file propagates everywhere. |
| 80 | + |
| 81 | + |
8 | 82 | .. _bitmath-2.0.0: |
9 | 83 |
|
10 | 84 | bitmath-2.0.0 |
|
0 commit comments