-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
docs do not build on py3.7 due to small change in python handling of -m #11838
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
Comments
I do not quite understand how that |
Sorry my notes from last night were not super clear.
ex
I think the fix is to in our sphinx conf add |
There is already a similar hack present in Line 22 in f4ae5d1
so that might be the best option for now. |
From a quick look at it, I'd suggest consolidating all unit examples that import basic_units into a single one together with basic_units itself; having each "this specific plotting method supports units" example in a separate file doesn't seem to be that helpful(?) |
This restores the formerly implicit 'cwd' in the path. closes matplotlib#11838
The issue is that the units examples (https://github.com/matplotlib/matplotlib/tree/master/examples/units) import from a local module that provides the unit classes and handlers. However, it turns out that this was working coincidentally due to a sorta-nasty bug where if you start python via
python -m some_module
(which is how sphinx gets launched internally)''
is put in the path, which ends up not getting expanded so the cwd is always in the path (see https://bugs.python.org/issue33053 and https://docs.python.org/3/whatsnew/3.7.html#other-language-changes).This means the docs do not build cleanly any more 😞 .
If you run the examples from the cli they work correctly. If you explicitly add the cwd back into the path they also build fine.
Not sure what the best solution here is.
The text was updated successfully, but these errors were encountered: