make mediawiki-utilities an optional dependency
-p legacy is the only thing that uses mediawiki-utilities, and it exists solely to reproduce numbers from research predating the mwxml and mwtypes split. The package is a 2015 monolith that also contains mw.database and mw.api, so it declares requests and pymysql unconditionally: every wikiq install pulled a MySQL client and six other packages to support one flag, building them from an sdist that has no wheel. Move it to a `legacy` extra. mw.lib.persistence imports nothing from mw.database or mw.api, so nothing about -p legacy changes for people who install the extra, and everyone else stops paying for it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> (cherry picked from commit 66dcc6d8cea620a619fc19121b5c27a085b11991)
This commit is contained in:
@@ -6,7 +6,6 @@ readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
dependencies = [
|
||||
"deltas>=0.7.0",
|
||||
"mediawiki-utilities>=0.4.18",
|
||||
"more-itertools>=10.7.0",
|
||||
"mwparserfromhell>=0.6.0",
|
||||
"mwpersistence>=0.2.4",
|
||||
@@ -18,6 +17,17 @@ dependencies = [
|
||||
"yamlconf>=0.2.6",
|
||||
]
|
||||
|
||||
# Two features carry dependencies that are awkward enough to install that they
|
||||
# are kept out of the base install: -p legacy needs mediawiki-utilities, a 2015
|
||||
# package that also pulls in a MySQL client, and --diff and -p wikidiff2 need
|
||||
# pywikidiff2, which compiles a C++ extension. Everything else, including the
|
||||
# default -p sequence, works with neither.
|
||||
[project.optional-dependencies]
|
||||
legacy = ["mediawiki-utilities>=0.4.18"]
|
||||
# A wikidiff2 extra belongs here too, but pywikidiff2 is not yet published to
|
||||
# PyPI, so an extra naming it could not resolve. Until it is, wikiq reports the
|
||||
# git install command when --diff or -p wikidiff2 is used without it.
|
||||
|
||||
[project.scripts]
|
||||
wikiq = "wikiq:main"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user