Skip to content

chore: prepare Rust 0.4.3 and Python 6.5.1 releases - #374

Merged
vinitkumar merged 2 commits into
masterfrom
release/6.5.1
Aug 4, 2026
Merged

chore: prepare Rust 0.4.3 and Python 6.5.1 releases#374
vinitkumar merged 2 commits into
masterfrom
release/6.5.1

Conversation

@vinitkumar

@vinitkumar vinitkumar commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • fix the ty release blocker by narrowing Json2xml.to_xml() return types in tests
  • prepare json2xml-rs 0.4.3 with synchronized Cargo, Python, and lockfile metadata
  • add Rust release notes and document the Rust-first release sequence

Release order

  1. Merge this preparation PR.
  2. Tag and publish rust-v0.4.3; verify the wheel matrix and PyPI artifacts.
  3. Update this release branch for json2xml 6.5.1, require json2xml-rs>=0.4.3, regenerate uv.lock, and publish the Python release through a second PR.

Verification

  • cargo fmt
  • cargo clippy with warnings denied
  • 48 Rust tests passed
  • full Python suite: 394 passed, 102 Rust-wheel-only tests skipped
  • Ruff and ty passed
  • local maturin wheel build for 0.4.3 passed
  • lat check passed

Summary by Sourcery

Prepare the json2xml-rs 0.4.3 accelerator release and align Python behavior and documentation around Json2xml.to_xml() return types and the Rust-first release flow.

Bug Fixes:

  • Enforce Json2xml.to_xml() return type contracts in tests, differentiating Unicode for pretty output and UTF-8 bytes for compact output.

Enhancements:

  • Document the Json2xml return-type behavior in the latency tests spec and behavior docs.
  • Add json2xml_rs 0.4.3 release notes describing XML-safety improvements, compatibility, and verification gates.
  • Clarify architecture guidance to publish and verify the Rust package before updating Python fast extra requirements and lockfiles.

Build:

  • Bump the Rust json2xml_rs package version to 0.4.3 and synchronize the Rust pyproject and lockfile metadata for the new release.

Documentation:

  • Add json2xml_rs 0.4.3 section to RELEASE_NOTES.md with highlights, migration guidance, and verification requirements.

Tests:

  • Strengthen Json2xml tests to assert concrete to_xml() return types and content across pretty and compact modes, including XPath format cases.

Chores:

  • Update release prerequisite guidance to reference json2xml-rs 0.4.3 as the required accelerator version.

Keep the precise bytes-or-text API annotation while making the test suite prove and narrow the return type for compact and pretty output.
Release the XML 1.0 validation fix before the Python wrapper so fast installs can require a compatible published accelerator.
@sourcery-ai

sourcery-ai Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Prepares the json2xml-rs 0.4.3 Rust accelerator release and documents the Python/Rust release sequencing while tightening Json2xml.to_xml() test expectations to match the documented pretty vs compact return-type contract.

Sequence diagram for Json2xml.to_xml pretty vs compact return types

sequenceDiagram
    actor User
    participant Json2xml
    participant dicttoxml_fast

    User->>Json2xml: to_xml(pretty)
    Json2xml->>dicttoxml_fast: dicttoxml(wrapper, root, attr_type, item_wrap, cdata, list_headers)

    alt [pretty=True]
        dicttoxml_fast-->>Json2xml: unicode_text
        Json2xml-->>User: unicode_text
    else [pretty=False]
        dicttoxml_fast-->>Json2xml: utf8_bytes
        Json2xml-->>User: utf8_bytes
    end
Loading

File-Level Changes

Change Details Files
Align Json2xml.to_xml() tests with the documented return-type contract for pretty vs compact output and XPath mode.
  • Remove conditional assertions that allowed falsey xmldata and instead assert that to_xml() always returns a value of the expected type.
  • Require bytes output for non-pretty and xpath_format conversions and str output for pretty conversions in all Json2xml tests.
  • Add a LAT test annotation describing the Json2xml return-type contract.
tests/test_json2xml.py
lat.md/tests.md
lat.md/behavior.md
Prepare the json2xml-rs 0.4.3 release metadata and Rust-first release process documentation.
  • Add a json2xml_rs 0.4.3 section to RELEASE_NOTES.md with highlights, migration guidance, package version, and verification gates.
  • Update the unreleased prerequisite to reference json2xml-rs==0.4.3 as the required accelerator version.
  • Clarify architecture docs to describe publishing/verifying the Rust package before raising the Python fast extra and lockfile requirements.
  • Bump the Rust package version from 0.4.2 to 0.4.3 in Cargo.toml and rust/pyproject.toml.
  • Regenerate rust/uv.lock to align with the new Rust release metadata.
RELEASE_NOTES.md
lat.md/architecture.md
rust/Cargo.toml
rust/pyproject.toml
rust/uv.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The new isinstance(xmldata, bytes/str) assertions are repeated across many tests; consider extracting a small helper or using parametrized tests to assert type and content together to keep the suite DRY and easier to adjust if the contract changes again.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `isinstance(xmldata, bytes/str)` assertions are repeated across many tests; consider extracting a small helper or using parametrized tests to assert type and content together to keep the suite DRY and easier to adjust if the contract changes again.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (019030d) to head (5241d6e).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #374   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          920       920           
=========================================
  Hits           920       920           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@vinitkumar
vinitkumar merged commit 0754f9d into master Aug 4, 2026
67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant