Prepare wikiq for release: fixes, dependency cleanup, and packaging #2
Reference in New Issue
Block a user
Delete Branch "release_review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is the cleanup and release-preparation work, with features kept out
so they can be reviewed separately (see #3 and #4). 33 commits, ordered
so they read forward: bugs first, then test repairs, removals, dependency
work, documentation, and packaging.
The suite passes at 65 passed, 2 skipped. The two skips are the diff
matcher tests that need an uncompressed
ikwiki.xml, which is not in therepository — that is unchanged from before.
changes to redirects (the only thing that will break existing code)
redirect_targetis gone, replaced byrevision_is_redirectandrevision_redirect_target.The old column carried a page's redirect status as of export time and
applied that one value to every revision in the page's history. For any
page that became a redirect, or stopped being one, most rows were wrong.
The new columns classify each revision from its own text. Revisions with
deleted text report null rather than false.
Anything reading
redirect_targetneeds updating. Wikis with a localizedredirect keyword can pass
--redirect-aliases;#REDIRECTis alwaysrecognized.
Also removed, as discussed: parquet output along with
--partition-namespacesand--max-revisions-per-file, and the pysparkdependency with the
wikiq-sparkentry point. The project anddistribution are both renamed to wikiq.
changes to installation
wikiq now installs with plain
pipand needs no C++ compiler. Previouslyevery install pulled pywikidiff2 from an ssh-only git URL, so nobody
outside the collective could install the tool at all.
pywikidiff2 is now imported inside the two code paths that use it —
--diffand-p wikidiff2— so everything else works without it. It wasa single module-level
importthat made the whole tool unusable,including
wikiq --help.mediawiki-utilitiesmoved to alegacyextra for the same reason: itbacked only
-p legacy, and being a 2015 package it draggedpymysqland six others into every install.
Remaining dependencies resolve from PyPI rather than pinned forks under
personal accounts.
uv.lockis now committed, so a run can be reproducedwith the versions that produced it.
Smaller things
Python 3.11 floor. GPL-3.0-or-later with
COPYING.--version, alsoprinted to stderr each run so it lands in job logs. A CHANGELOG. Project
metadata so a PyPI page is not blank. An sdist that no longer contains a
stray virtualenv (it was 8.9 MB; it is now 40 KB).
Two crashes fixed: regex matching died with a
TypeErroron revisionswith deleted text, and titles in non-main namespaces were prefixed twice
under mwxml ≥ 0.3.7, producing
Category:Category:Alaska.Wikiq_Unit_Test.pyis nowtest_wikiq.py. It matched neither ofpytest's discovery patterns, so
pytest test/had been silently runninghalf the suite.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.