Skip to content

Bump bitmath from 1.3.3.1 to 2.0.1#834

Open
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/bitmath-2.0.1
Open

Bump bitmath from 1.3.3.1 to 2.0.1#834
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/bitmath-2.0.1

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 1, 2026

Bumps bitmath from 1.3.3.1 to 2.0.1.

Release notes

Sourced from bitmath's releases.

2.0.0 Fixed PyPI Publishing

Hopefully this adds automatic pypi publishing on release publication

2.0.0 Is finally out!

bitmath 2.0.0

First major release in eight years. Python 3 only, one breaking pivot, and the decade-long backwards-compatibility guarantee still intact for any 1.x code already running on Py3.

Highlights

  • Python 3.9+ only. Python 2 support is gone, as promised in [issue #99](timlnx/bitmath#99).
  • New query_capacity() API — returns a Capacity(total, used, free) NamedTuple for any path or mount point. Cross-platform, no root required. This is the API you want for almost every "how big is this disk/volume?" question.
  • Windows disk capacity via query_device_capacity(), built on DeviceIoControl. Linux and Windows are both supported; macOS raises NotImplementedError because SIP blocks raw block-device access even for root.
  • Capacity math. bitmath objects now support floor division (//), modulo (%), and divmod — for chunk-and-remainder planning: how many 500 GB volumes fit into 14 TiB, and how much is left over?
  • f-string and format() support. bitmath objects implement __format__ per PEP 3101; f"{size:.2f} {size.unit}"'1.69 GiB'.
  • Four new NIST units: ZiB, YiB, Zib, Yib. The NIST_PREFIXES, NIST_STEPS, and ALL_UNIT_TYPES constants reflect reality again.
  • Thread-safe context manager. bitmath.format() now uses threading.local with proper save/restore semantics. Fixes #83.
  • best_prefix() bit-family fix. Bit-family inputs no longer silently convert into byte-family outputs. Fixes #95.

Breaking changes

Python 2 is gone — that's the headline. Six smaller changes came along with it:

  • parse_string(..., strict=False) defaults to NIST, not SI. Inputs like "1g" may resolve differently than in 1.x.
  • parse_string_unsafe() is deprecated. Use parse_string(..., strict=False). The old name still works but emits a DeprecationWarning.
  • bitmath.integrations has been removed. The argparse, click, and progressbar integrations are gone from the package; copy-paste equivalents are in the new Integration Examples chapter of the docs.
  • Byte and Bit display as B and b, consistent with every other unit in the library. Class names are unchanged. Code that compared formatted strings against the literal words "Byte" or "Bit" will need updating.
  • query_device_capacity() raises NotImplementedError on macOS. Use query_capacity() instead.
  • setup.py is gone. Install via pip install bitmath; build via python -m build.

If you're already on Python 3.9+ and using the documented 1.x API, the upgrade is probably a pip install --upgrade bitmath and a test run.

Under the hood

pyproject.toml + hatchling replace setup.py. pytest replaces nosetests. CI runs against Python 3.9–3.13 on Linux, macOS, and Windows. CodeQL runs on every push. Releases are GPG-signed.

Credits

Thanks to everyone who filed reports or contributed code during the gap between 1.3.3 and 2.0.

  • Maximilian Blochberger (@​blochberger) did substantial integration work in the 1.4 era — the click integration (closing #74) and the argparse/progressbar dependency separation (closing #86, his own report). The bitmath.integrations module itself has been retired in 2.0, but the copy-paste replacements in the Integration Examples chapter are based on his code.
  • Matthieu Coudron contributed numpy.int64 support for bitmath comparisons.
  • Jonathan Eunice (@​jonathaneunice) contributed the original concept for __format__ support in [PR #76](timlnx/bitmath#76), years before it finally landed.
  • @​a-detiste opened [PR #105](timlnx/bitmath#105), which is why the test suite now prefers stdlib unittest.mock.
  • @​postmaxin opened [PR #107](timlnx/bitmath#107), which surfaced the pack aging bug that 1.4 shipped to fix.

Issue reports that drove real fixes: @​walrusVision for #83 (thread-safe context manager), @​beav for #93 (Byte/Bit display), @​rohit04saluja for #95 (best_prefix bit-family).

2.0.0 Release Candidate 4

... (truncated)

Commits
  • b5531bb Merge pull request #132 from timlnx/pypi-packaging-fix-issue-131
  • 7a2fd8c Stop being a dumb human trying to publish this manually
  • 3102727 Merge pull request #130 from timlnx/2.0.0-final-release-notes
  • 259d358 Update news with actual 2.0.0 release date
  • bd2873f Merge pull request #129 from timlnx/context-note
  • de20588 Comment/test cleanup
  • 178932f Stop skipping E722, remove dead logic guards. Update contributing docs about ...
  • bd723d8 Fix some doc errors
  • 185d48f Merge pull request #128 from timlnx/datamodel-customization
  • e4da90d Bump actions to clean up deprecation notice
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [bitmath](https://github.com/timlnx/bitmath) from 1.3.3.1 to 2.0.1.
- [Release notes](https://github.com/timlnx/bitmath/releases)
- [Changelog](https://github.com/timlnx/bitmath/blob/master/NEWS.rst)
- [Commits](timlnx/bitmath@1.3.3.1...v2.0.1)

---
updated-dependencies:
- dependency-name: bitmath
  dependency-version: 2.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python Pull requests that update Python code labels May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants