refactor(python)!: rename distribution to markdown-script (import markdown_script) - #306
Merged
Merged
Conversation
…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 ✓.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Renames the Python binding's PyPI distribution
mdscript->markdown-script, theimportable module
mdscript->markdown_script, and the private native extension_mdscript->_markdown_script.Why
mdscripton PyPI is held by a genuine dormant project (5 releases, April 2021, realworking 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.txtis exactlymdscript, so publishing under adifferent distribution name while keeping
import mdscriptwould make both packagesinstall a top-level
mdscript/into site-packages -- whoever installs second silentlyoverwrites the first, with no pip error. Both names had to change.
Not a breaking change for anyone
Pre-publication.
release.ymlhas no PyPI publish step andcrates/mds-python/Cargo.tomlis
publish = false. Zero PyPI consumers, so no compat shim, noProvides-Dist, nodeprecation 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-nameallhad to move to
_markdown_scripttogether 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), everydean0x/mdscriptGitHub URL,and the Rust crate name
mds-pythonare all untouched -- independently audited across the29-file diff.
Verification
cargo fmt-- cleancargo clippy --workspace --all-targets -- -D warnings-- zero warningscargo nextest run --workspace-- 2087 passedcargo test --doc-- 52 passedmaturin develop-- builtmarkdown_script-0.3.0-cp311-abi3pytest crates/mds-python/tests -q-- 242 passed (incl.test_typing.pystubtest andtest_pickle.py, the rename's real gates)__version__ == "0.3.0"(not the silent"0.0.0"fallback) and<class 'markdown_script.Span'>verify-versions.mjsandverify-no-control-bytes.mjs-- both cleanRelated
Refs #292 -- deliberately not
Closes. #292 stays open for the actual PyPI registrationand now lives on the v0.5.0 milestone.
Decision recorded as ADR-012.