Skip to content
This repository was archived by the owner on Nov 22, 2026. It is now read-only.

Releases

mojo-pyformat v0.2.2

Choose a tag to compare

@amarbarosys amarbarosys released this 08 Nov 23:03

mojo-pyformat-public v0.2.2

Released: 2026-11-08 · Commit: 60482a6 · Previous: v0.2.1

What it does

Python's format() for numbers in Mojo, with the same digits: {:.Nf}, thousands separators, g, e, and %, rounded on the double's exact binary value as CPython does.

Highlights

  • Packaging only: the conda recipe pins mojo-compiler to the minor the package was built with (<1.3.0a0), so it cannot be installed on a Mojo it does not load on.

Changes

Changed

  • recipe.yaml: mojo-compiler run dependency pinned to the build's minor (<1.3.0a0).

Verified

Check Result
pkg-conda dry run on the version commit (H1-H3,H6) PASS: mojo-pyformat-0.2.2-hb0f4dca_0.conda

Known limits

  • Packages are built on one Mojo minor only; see the package protocol.

Upgrade / run

None: no API change.

Commits

  • 60482a6 build: bump version to 0.2.2
  • 87f5686 build: recipe pins mojo-compiler to the build's minor

mojo-pyformat v0.2.1

Choose a tag to compare

@amarbarosys amarbarosys released this 07 Nov 14:41

mojo-pyformat-public v0.2.1

Released: 2026-11-07 · Tag: v0.2.1 · Previous: v0.2.0

What it does

Python's format() for numbers in Mojo, with the same digits: {:.Nf}, thousands separators, g, e, and %, rounded on the double's exact binary value as CPython does.

Highlights

  • Docs only: CHANGELOG names no home path.

Changes

Changed

  • CHANGELOG.md and the release notes name no home path.

Verified

Check Result
mojo-lib-audit on this tree PASS
gh-publish --check (ci-local) OK

Known limits

Upgrade / run

None: no code or API change.

Commits

git log v0.2.0..v0.2.1

mojo-pyformat v0.2.0

Choose a tag to compare

@amarbarosys amarbarosys released this 05 Nov 11:03

mojo-pyformat v0.2.0

Released: 2026-11-04 · Tag: v0.2.0 · Previous: v0.1.2

What it does

Python's format() for numbers in Mojo, with the same digits: {:.Nf}, thousands separators, g, e, and %, rounded on the double's exact binary value as CPython does.

Highlights

  • py_repr(x): Python repr(float) digit for digit. Mojo 1.2's own float printing is not round-trip safe (it prints two different doubles as 3.000000005061751e+16 and writes e+015); this is the fix when text must equal Python.

Changes

Added

  • py_repr, with 653 repr rows in the oracle grid; whole numbers below 1e16 take an exact fast path.

Verified

Check Result
scripts/ci.sh (15,511 lines vs Python 3.14 format and repr, every power of two included, plus 43,660 wide lines with 804 repr on random bits and subnormals) on Mojo 1.2.0; scripts/check.sh on 1.3.0.dev2026110305 PASS

Known limits

  • py_repr tries up to 17 precisions with atof for non-integral values, about 1 µs each; fine for output text, not for hot loops.

Upgrade / run

from pyformat import py_repr

Commits

  • All commits from v0.1.2 to tag v0.2.0: git log v0.1.2..v0.2.0.

mojo-pyformat v0.1.2

Choose a tag to compare

@amarbarosys amarbarosys released this 04 Nov 14:36

mojo-pyformat-public v0.1.2

Released: 2026-11-04 · Commit: d3e641f · Previous: v0.1.1

What it does

Python's format() for numbers in Mojo, with the same digits: {:.Nf}, thousands separators, g, e, and %, rounded on the double's exact binary value as CPython does.

Highlights

  • py_sum keeps infinities like CPython; a width or precision that overflows raises instead of misformatting.
  • README has one install block and one example; a conda recipe ships the package.

Changes

Added

  • recipe.yaml: a conda package recipe.
  • CI, latest-release and license badges in the README.

Changed

  • README: one install and quickstart block, one example.

Fixed

  • py_sum keeps inf like CPython.
  • A width or precision that overflows raises an error.

Verified

Check Result
ci-local at d3e641f: the GitHub workflow in a clean Ubuntu 24.04 container, Mojo 1.2.0 PASS

Known limits

Upgrade / run

uv sync   # installs Mojo 1.2.0

Commits

  • d3e641f fix(release): pyproject.toml, recipe.yaml, uv.lock say 0.1.2
  • 71c7742 build: conda recipe
  • ab83ec8 docs: one example, one install block
  • a6cf040 docs: install and quickstart block
  • 0c9b45d fix(format): py_sum keeps inf like CPython; width/precision overflow raises
  • cce527c fix(release): pyproject and uv.lock say 0.1.1, the version of the latest tag
  • 0e22c27 docs: CI, latest-release and license badges

mojo-pyformat v0.1.1

Choose a tag to compare

@amarbarosys amarbarosys released this 29 Oct 21:10

mojo-pyformat v0.1.1

Released: 2026-10-29 · Commit: dc266f0 · Previous: v0.1.0

What it does

Python's format() for numbers in Mojo, with the same digits: {:.Nf}, thousands separators, g, e, and %, rounded on the double's exact binary value as CPython does.

Highlights

  • Builds and runs on the stable Mojo 1.2.0 release.

Changes

Changed

  • The pin moves to Mojo 1.2.0 (pyproject.toml, uv.lock); README and skill say Mojo 1.2.

Verified

Check Result
ci-local: the GitHub workflow in a clean Ubuntu 24.04 container, Mojo 1.2.0 PASS

Known limits

Upgrade / run

uv sync   # installs Mojo 1.2.0

Commits

  • dc266f0 build: Mojo 1.2.0
  • 1fdcf1a docs: NOTICE names the owner and contact

mojo-pyformat v0.1.0

Choose a tag to compare

@amarbarosys amarbarosys released this 21 Oct 07:18

mojo-pyformat v0.1.0

Released: 2026-10-21 · Commit: a66c107 · Previous: first release

What it does

Python's format() for numbers in Mojo, with the same digits: {:.Nf}, thousands separators, g, e, and %, rounded on the double's exact binary value as CPython does.

Highlights

  • Identical to Python on 10,846 cases and on a wider 42,856-case set (random bit patterns, subnormals, precision up to 100, numbers to 1.8e308).
  • .2f is 5.9x faster than Python (1M values: 40 ms vs 234 to 242 ms); g and e about 2x.
  • format(2.675, '.2f') gives 2.67, as Python does, because the stored double is just under 2.675.

Changes

First public release, no earlier version.

Verified

Check Result
scripts/check.sh: 10,846 cases vs Python format() PASS all
tools/oracle_wide.py in scripts/ci.sh: 42,856 cases identical
scripts/ci.sh on a pristine Ubuntu 24.04.5 VM (Python 3.12.3) PASS all

Known limits

  • Specs outside the supported grammar raise: +/space sign, 0 padding, #, _, upper-case types, , on a float.
  • Peak memory is the Mojo runtime's floor, about 2 MB above Python.

Upgrade / run

git clone https://github.com/amarbaro/mojo-pyformat && cd mojo-pyformat && uv sync
mojo run -I src examples/quickstart.mojo

Commits

  • a66c107 docs(pyformat): README, api, design, agent skill, CI script and workflow
  • 14eeee6 bench(pyformat): 1M values as .2f, g, .3e against Python format()
  • 968f2aa feat(pyformat): f, e, g, % and int commas, exact on the binary value
  • 9c415f2 test(pyformat): Python format() oracle, 10,846 value x spec cases
  • 5dd7dfa chore: repo layout, Apache-2.0, mojo>=1.1