-
-
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
Sphinx does not yet support python packages with no __init__.py - PycodeError: no source found for module #7727
Labels
Milestone
Comments
I can't reproduce the error. Could you make a small example, please? |
I am using FreeBSD, same problem here, I am just updating my packages. This is my log:
|
I'm getting the same mistake: https://readthedocs.org/projects/dymoesco/builds/12276491/ |
@gutiersa It seems your error is not related to this issue. Please file a new one. |
tk0miya
added a commit
that referenced
this issue
Nov 9, 2020
Fix #7727: autosummary raises PycodeError for namespace python package
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
As of Python 3.3, init.py files are no longer required to make a directory be a valid package - http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html for ... and there are good reasons why it may not be be possible to have one. Sphinx doesn't yet support this aspect of Python's package mangement system, as it assumes that omission of init.py is an error:
Exception occurred: File "c:\dxxxx\sphinx\3.0.1\lib\python3.6\site-packages\sphinx\pycode\__init__.py", line 59, in get_module_source raise PycodeError('no source found for module %r' % modname) sphinx.errors.PycodeError: no source found for module 'mymodule'
To Reproduce
Steps to reproduce the behavior:
Just try to build sphinx documentation for a package that doesn't have a init.py file
Expected behavior
As omission of init.py is no longer a bug, Sphinx should not treat it as an error, and instead act as if an empty init.py file had been present.
Environment info
The text was updated successfully, but these errors were encountered: