Added try-catch for autodoc mock-import#89
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #89 +/- ##
==========================================
- Coverage 50.15% 50.11% -0.04%
==========================================
Files 18 18
Lines 1288 1291 +3
Branches 262 263 +1
==========================================
+ Hits 646 647 +1
- Misses 598 599 +1
- Partials 44 45 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| try: | ||
| from sphinx.ext.autodoc.mock import mock | ||
| except ImportError: | ||
| from sphinx.ext.autodoc import mock | ||
| # A persistent bug in sphinx / autodoc causes problems during importing (#82) | ||
|
|
There was a problem hiding this comment.
Hm, I'm a little in doubt now. I feel the intended method to import is the short version:
from sphinx.ext.autodoc import mock
So maybe we should prioritize that one. If for no other reason then to prevent us being the cause of an import error for the next package.
EDIT: I changed it but let's see what the bosses say over at sphinx-doc/sphinx#14333
|
FYI: We are still/again seeing this issue with khard 0.21.0, sphinx 9.1.0 when trying to build the package for Arch Linux: lucc/khard#356 |
Resolving #82 (again...)
This is the suggestion of @lucc , posted here: #82 (comment)