-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HUGE list of dependencies - accident or intention? #154
Comments
There are no runtime dependencies for xdoctest. Poetry is being too aggressive extracting optional dependencies. All requirements are separated by type here: https://github.com/Erotemic/xdoctest/tree/main/requirements Notice that runtime.txt is empty. The reason I'm still on setuptools is because I parse these requirement.txt files and will optionally replace a ">=" with a "==" to pin to strict versions on user request. The extra_requires are defined here: https://github.com/Erotemic/xdoctest/blob/main/setup.py#L208 but the relevent code is: setupkw["extras_require"] = {
"all": parse_requirements("requirements.txt", versions="loose"),
"tests": parse_requirements("requirements/tests.txt", versions="loose"),
"optional": parse_requirements("requirements/optional.txt", versions="loose"),
"all-strict": parse_requirements("requirements.txt", versions="strict"),
"runtime-strict": parse_requirements(
"requirements/runtime.txt", versions="strict"
),
"tests-strict": parse_requirements("requirements/tests.txt", versions="strict"),
"optional-strict": parse_requirements(
"requirements/optional.txt", versions="strict"
),
'tests-binary': parse_requirements('requirements/tests-binary.txt'),
'tests-binary-strict': parse_requirements('requirements/tests-binary.txt', versions='strict'),
'colors': parse_requirements('requirements/colors.txt'),
'jupyter': parse_requirements('requirements/jupyter.txt'),
} |
Is this an issue in the use of xdoctest with poetry? Will including xdoctest as a dependency bring all of these optional dependencies into the poetry lock file? If so can someone provide a minimal pyproject.toml that demonstrates this? If this is a problem, I'd like to either fix it here (or better in poetry because I don't think xdoctest is doing anything that is incorrect, and poetry shouldn't be including these dependencies unless you depend on something like |
I can confirm this is a With
With
|
I'm wondering if there is anything that can be done in this repo. Its annoying that pypistats also lists a bunch of "required" dependencies when really there are none. Maybe this is because there is a top level My thought is that it would be nice for devs if |
I can add that using hatchling/poetry-core to build packages has circumvented this issue for me in the past. |
I am using xdoctest 1.1.3 installed with poetry. I just realized by chance that the list of xdoctest's dependencies is surprisingly large:
With transitive dependencies, this sums up to 41 packages that are required by xdoctest. While I really like xdoctest, this actually prevents me from using it anymore. Too much complexity for the provided functionality. Plus the dependency installation slows down the CI unnecessarily.
Is that huge list really required? Or did some dev dependency (e.g. pyflakes) accidentally sneak into the main deps?
EDIT:
It seems a lot of dependencies are related to doctests in Jupyter notebooks. Maybe Jupyter support can be made an opt-in feature on installation using extras (
pip install xdoctest[jupyter]
). That would drastically reduce the dependencies for everyone not working with Jupyter notebooks.The text was updated successfully, but these errors were encountered: