-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Should defusedxml
be moved to the runtime dependencies?
#12339
Comments
I asked a similar question here: https://github.com/orgs/sphinx-doc/discussions/12333 Happy to close the discussion if this is a better place. |
This comment was marked as outdated.
This comment was marked as outdated.
Ok, I see what happened actually. It's because the dependencies of sphinxcontrib- were not updated accordingly, namely we are installing Is there a way to tell tox to install the sphinx test dependencies in PS: The argument against adding Now, I am willing to actually split the test dependencies into |
yes I feel this is what should happen; I was about to say, your first responses seemed to be conflating sphinx internal development with the actual opened issue of users interacting with (in general, it is a bit of an open question in python packaging, where/how you define internal development dependencies vs defining extra user dependencies) |
I think it would also be useful to avoid importing For example, |
Import `defusedxml` inside the `etree_parse()` function rather than in global scope of `sphinx.testing.util`. This makes it possible for reverse dependencies (such as `breathe`) to use this module without adding an unnecessary transitive dependency on `defusedxml` when it's not actually used. See also issue sphinx-doc#12339.
Otherwise tests fail with: `ImportError: Error importing plugin "sphinx.testing.fixtures": No module named 'defusedxml'`. See: sphinx-doc/sphinx#12339
Describe the bug
In pyproject.toml, defusedxml is defined as one of the test dependencies: https://github.com/sphinx-doc/sphinx/blob/master/pyproject.toml#L97
However, in Sphinx 7.3.x its import was added to
sphinx/testing/util.py
(885818b). Many sphinx plugins use that code in their test suites and break.Should it be moved to the list of runtime dependencies?
How to Reproduce
Environment Information
Sphinx extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: