Skip to content

refactor(python)!: rename distribution to markdown-script (import markdown_script) - #306

Merged
dean0x merged 1 commit into
wave/v0.4.0-wave1from
ticket/python-dist-rename
Aug 18, 2026
Merged

refactor(python)!: rename distribution to markdown-script (import markdown_script)#306
dean0x merged 1 commit into
wave/v0.4.0-wave1from
ticket/python-dist-rename

Conversation

@dean0x

@dean0x dean0x commented Aug 18, 2026

Copy link
Copy Markdown
Owner

What

Renames the Python binding's PyPI distribution mdscript -> markdown-script, the
importable module mdscript -> markdown_script, and the private native extension
_mdscript -> _markdown_script.

Why

mdscript on PyPI is held by a genuine dormant project (5 releases, April 2021, real
working code, ~16 downloads/month) whose summary is "Brings powerful scripting to
markdown files with hot reload" -- a direct topical collision. PEP 541 offers no route
("under no circumstances will a name be reassigned against the wishes of a reachable
owner"; the owner was active on GitHub 12 days ago).

Critically, the incumbent's top_level.txt is exactly mdscript, so publishing under a
different distribution name while keeping import mdscript would make both packages
install a top-level mdscript/ into site-packages -- whoever installs second silently
overwrites the first, with no pip error. Both names had to change.

Not a breaking change for anyone

Pre-publication. release.yml has no PyPI publish step and crates/mds-python/Cargo.toml
is publish = false. Zero PyPI consumers, so no compat shim, no Provides-Dist, no
deprecation alias. The ! in the title reflects the source-level rename only.

Atomicity note

PyO3 derives the init symbol from the #[pymodule] fn name, so [lib] name,
#[pymodule] fn, create_exception!'s first arg, and [tool.maturin] module-name all
had to move to _markdown_script together or the module fails to import.

Scope discipline

Three unrelated things in this repo are spelled mdscript. Only the Python one changed.
The npm scope @mdscript/* (8 published packages), every dean0x/mdscript GitHub URL,
and the Rust crate name mds-python are all untouched -- independently audited across the
29-file diff.

Verification

  • cargo fmt -- clean
  • cargo clippy --workspace --all-targets -- -D warnings -- zero warnings
  • cargo nextest run --workspace -- 2087 passed
  • cargo test --doc -- 52 passed
  • maturin develop -- built markdown_script-0.3.0-cp311-abi3
  • pytest crates/mds-python/tests -q -- 242 passed (incl. test_typing.py stubtest and
    test_pickle.py, the rename's real gates)
  • Smoke test -- confirms __version__ == "0.3.0" (not the silent "0.0.0" fallback) and
    <class 'markdown_script.Span'>
  • verify-versions.mjs and verify-no-control-bytes.mjs -- both clean

Related

Refs #292 -- deliberately not Closes. #292 stays open for the actual PyPI registration
and now lives on the v0.5.0 milestone.

Decision recorded as ADR-012.

…kdown_script) [#292]

The PyPI name `mdscript` is held by a genuine dormant 2021 project with a direct
topical collision: their `top_level.txt` is exactly `mdscript`, so both the
distribution name AND the importable module name had to change simultaneously.
There is no PEP 541 route for reclaiming the name in a reasonable timeframe.

Changes:
- PyPI distribution: mdscript → markdown-script (hyphen)
- Python import: mdscript → markdown_script (underscore)
- Native extension: _mdscript → _markdown_script (underscore)

The ATOMICITY constraint is satisfied: Cargo.toml [lib] name, the #[pymodule]
fn name, the create_exception! first arg, and pyproject.toml module-name all
agree on _markdown_script / markdown_script._markdown_script.

All seven #[pyclass] module = "..." attributes updated to "markdown_script" so
that repr(), pickle round-trips, and stubtest resolve correctly.

This is pre-publication: publish = false in crates/mds-python/Cargo.toml and
release.yml has no PyPI publish step, so there are zero existing PyPI consumers.
No deprecation shim or compat alias is provided (ADR-012).

Verification: cargo nextest run --workspace (2087 passed), cargo test --doc
(52 passed), pytest crates/mds-python/tests -q (242 passed), maturin develop
smoke test (markdown_script.Span repr is markdown_script.Span, __version__ =
0.3.0, not 0.0.0), node scripts/verify-no-control-bytes.mjs ✓,
node scripts/verify-versions.mjs ✓.
@dean0x
dean0x merged commit 7072df0 into wave/v0.4.0-wave1 Aug 18, 2026
16 checks passed
@dean0x
dean0x deleted the ticket/python-dist-rename branch August 18, 2026 15:38
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