-
Notifications
You must be signed in to change notification settings - Fork 23
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
Changed import to enable sphinx-needs 4.1 compatibility #83
Changed import to enable sphinx-needs 4.1 compatibility #83
Conversation
@@ -6,7 +6,8 @@ | |||
|
|||
from docutils.parsers.rst import Directive | |||
from sphinx.util import logging | |||
from sphinx_needs.api import make_hashed_id | |||
from sphinx_needs.api.need import _make_hashed_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we need here some dynamic import, depending on the installed Sphinx-Needs versions.
Otherwise the new release will not be compatible with SPhinx-Needs <4.
something like
try:
from sphinx_needs.api.need import _make_hashed_id
except ImportErro: < Sphinx-Needs 4
from sphinx_needs.api import make_hashed_id as _make_hashed_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added already a fix by commit.
Ok, I needed to add some stuff to get tests, linter and linkchecks running again. Hopefully, find some time to look at your other PRs as well. |
Let me know if I can be of any assitance. |
This is the third 'split' PR that was discussed for splitting the big one into smaller ones. This one here #80
This PR changes the import of
make_hashed_id
to the now only internal version_make_hashed_id
and adapts the arguments to fit as well.Unsure if this is the best way to do it, or if maybe upstream the function should be exported again.
fixes #78
Note: This PR has a similar issue as #82 issue being that the 8.1.3 Sphinx tests fail, with the same error message.
More exact:
also here let me know if this can be resolved somehow, as I did not find the 'html' it talks about.
I could remove
about.html
from the conf.py but unsure if that has further consequences.