Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:
env:
# Keep in step with test.yml's pin -- docs runs `mojo doc`, which compiles the
# sources and so breaks on the same stdlib changes the tests do.
MOJO_VERSION: "1.0.0b3.dev2026073014"
MOJO_VERSION: "1.0.0"

jobs:
build-deploy:
Expand All @@ -35,9 +35,7 @@ jobs:
- name: Install Mojo
run: |
uv venv
uv pip install "mojo==$MOJO_VERSION" \
--index https://whl.modular.com/nightly/simple/ \
--prerelease allow
uv pip install "mojo==$MOJO_VERSION"

- name: Generate API reference
run: |
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ on:
workflow_dispatch:

env:
# The nightly this repo is known to build and pass on. CI installs exactly
# this for pushes and PRs, so upstream churn cannot turn a green repo red
# without a commit. Bump it when the weekly drift check goes green on a newer
# one, or after fixing whatever it caught.
MOJO_VERSION: "1.0.0b3.dev2026073014"
# The released Mojo this repo is known to build and pass on. CI installs
# exactly this for pushes and PRs, so upstream churn cannot turn a green repo
# red without a commit. Bump it when the weekly drift check goes green on a
# newer one, or after fixing whatever it caught.
MOJO_VERSION: "1.0.0"

jobs:
test:
Expand All @@ -40,9 +40,7 @@ jobs:
--index https://whl.modular.com/nightly/simple/ \
--prerelease allow
else
uv pip install "mojo==$MOJO_VERSION" \
--index https://whl.modular.com/nightly/simple/ \
--prerelease allow
uv pip install "mojo==$MOJO_VERSION"
fi
.venv/bin/mojo --version

Expand Down Expand Up @@ -86,7 +84,7 @@ jobs:
Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID

Fix the breakage, then bump MOJO_VERSION in .github/workflows/test.yml
and .github/workflows/docs.yaml to the nightly that passes.
and .github/workflows/docs.yaml to the release that passes.
EOF
)
existing=$(gh issue list --repo "$GITHUB_REPOSITORY" --state open \
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
# Changelog

## Unreleased
## 0.2.0 — 2026-08-11

- **Builds on released Mojo 1.0.** The pixi channel moved from
`max-nightly` to `max` and the dependency pin from `>=1.0.0b3.dev…` to
`>=1.0,<2`; CI installs `mojo==1.0.0` from PyPI instead of the nightly
index with `--prerelease allow`. The weekly drift check still runs
against the latest nightly, so the repo still reports when the language
moves under it. No source changes were needed.
- README test counts corrected: 104 → 159 (74 DOM, 62 pull-parser, 23
error-position). The 14-document byte-match anchor against CPython
`xml.etree` and the 6,000-iteration fuzz both re-run clean.

- New `xml.errors` module (exported from the package): `line_col(source,
offset)` maps a byte offset to a 1-based (line, column) pair — the column
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
**General-purpose XML parsing in pure Mojo — an `xml.etree.ElementTree`-shaped API. No Python dependencies, no FFI.**

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
[![Mojo](https://img.shields.io/badge/Mojo-1.0.0b3%2B_nightly-orange?style=flat-square)](https://mojolang.org)
[![Mojo](https://img.shields.io/badge/Mojo-1.0-orange?style=flat-square)](https://mojolang.org)
[![Podcast](https://img.shields.io/badge/Podcast-Chain_of_Thought-purple?style=flat-square)](https://chainofthought.show/?utm_source=github&utm_medium=referral&utm_campaign=repo-readme&utm_content=mojo-xml)
[![X](https://img.shields.io/badge/X-@ConorBronsdon-black?style=flat-square&logo=x)](https://x.com/ConorBronsdon)

Expand Down Expand Up @@ -83,11 +83,11 @@ Or with uv:

```bash
uv venv
uv pip install mojo --index https://whl.modular.com/nightly/simple/ --prerelease allow
uv pip install mojo
.venv/bin/mojo run -I src test/test_etree.mojo
```

Requires a Mojo nightly (`>=1.0.0b3`).
Requires Mojo 1.0 or newer.

## Usage

Expand Down Expand Up @@ -142,14 +142,15 @@ line-ending and attribute-value normalization, and entity decoding are identical
to CPython.

```bash
pixi run test # 65 DOM tests + 39 pull-parser tests
pixi run test # 74 DOM + 62 pull-parser + 23 error tests
python3 test/anchor_run.py --strip # optional: env MOJO=<mojo binary>
```

**Tests.** 104 total: `test/test_etree.mojo` (65 — parsing, text/tail, entities,
**Tests.** 159 total: `test/test_etree.mojo` (74 — parsing, text/tail, entities,
CDATA, namespaces, find/findall/findtext/iter, mutation, serialization and
escaping, malformed-input error cases) and `test/test_pull.mojo` (39 — the
underlying tokenizer).
escaping, malformed-input error cases), `test/test_pull.mojo` (62 — the
underlying tokenizer), and `test/test_errors.mojo` (23 — parse-error
positions).

**Fuzzing.** `test/fuzz_drive.py` mutates the corpus plus 18 adversarial
synthetics (deep nesting, wide fan-out, namespace bombs, entity/char-ref
Expand Down
6 changes: 3 additions & 3 deletions pixi.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[workspace]
authors = ["Conor Bronsdon <cmbronsdon@gmail.com>"]
channels = ["https://conda.modular.com/max-nightly", "conda-forge"]
channels = ["https://conda.modular.com/max", "conda-forge"]
name = "mojo-xml"
description = "General-purpose XML parsing in pure Mojo — an ElementTree-shaped API"
platforms = ["linux-64", "osx-arm64"]
version = "0.1.0"
version = "0.2.0"

[tasks]
test = "mojo run -I src test/test_etree.mojo && mojo run -I src test/test_pull.mojo && mojo run -I src test/test_errors.mojo"
Expand All @@ -14,4 +14,4 @@ fmt = "mojo format src/ test/ examples/ bench/"
docs = "mojo doc -o docs/api.json -I src src/xml && python3 docs/render_api.py docs/api.json docs/api.html"

[dependencies]
mojo = ">=1.0.0b3.dev2026070506,<2"
mojo = ">=1.0,<2"
4 changes: 2 additions & 2 deletions recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Build locally with: rattler-build build --recipe recipe.yaml

context:
version: "0.1.0"
version: "0.2.0"

package:
name: mojo-xml
Expand All @@ -29,7 +29,7 @@ build:

requirements:
run:
- mojo >=1.0.0b3.dev2026070506,<2
- mojo >=1.0,<2

about:
homepage: https://github.com/conorbronsdon/mojo-xml
Expand Down
Loading