Skip to content

Commit

Permalink
ipasphinx: Correct import of progress_message for Sphinx 6.1.0+
Browse files Browse the repository at this point in the history
Pylint reports false-negative result for Sphinx 6.1.0+:

```
************* Module ipasphinx.ipabase
ipasphinx/ipabase.py:10: [E0611(no-name-in-module), ] No name 'progress_message' in module 'sphinx.util')
```

Actually `sphinx.util.progress_message` is still available in Sphinx 6.1
but it's deprecated and will be removed in 8.0:
https://www.sphinx-doc.org/en/master/extdev/deprecated.html#deprecated-apis

Related change:
sphinx-doc/sphinx@8c5e701

Fixes: https://pagure.io/freeipa/issue/9361
Signed-off-by: Stanislav Levin <[email protected]>
Reviewed-By: Rob Crittenden <[email protected]>
  • Loading branch information
stanislavlevin authored and rcritten committed Apr 28, 2023
1 parent 1f30cc6 commit cfc0233
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ipasphinx/ipabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
import re
import sys

from sphinx.util import progress_message
try:
from sphinx.util.display import progress_message
except ImportError:
# sphinx < 6.1.0
from sphinx.util import progress_message
from sphinx.ext.autodoc import mock as autodoc_mock

HERE = os.path.dirname(os.path.abspath(__file__))
Expand Down

0 comments on commit cfc0233

Please sign in to comment.