-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Fixes #29942 -- Link docs to github source #16918
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
Conversation
cbc86d7
to
ffe6eb2
Compare
Added a temporary commit with partial fixes. I'll do a proper push later |
This will not work for complex cases
0792a75
to
862069e
Compare
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.
Thank you @ewjoachim! I think this is a much nicer solution ⭐
I have a couple of minor stylistic comments and there is a pesky windows test that needs a tweak but I like this a lot 👍
Co-authored-by: Sarah Boyce <[email protected]>
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.
Looks good to me! Thank you so much!
Note this will probably get another review before being accepted 👍
Thank you for suggesting working on this and for the help and the review :) Team work ! |
Unfortunately this crashes on Windows.
This looks to me like an encoding issue. I don't currently have Windows set to If instead I run Python in UTF-8 mode the build works. Maybe add |
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.
@ewjoachim Thanks 👍 I left initial comments.
docs/_ext/github_links.py
Outdated
import importlib.util | ||
import pathlib | ||
|
||
BASE_PATH = pathlib.Path(__file__).parents[2] |
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.
Can we deffer accessing __file__
or don't use it here? (check out ticket-32316 and 9ee693b)
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.
Wow I had no idea. This seems like it should be part of the automated testing/linting steps rather than being manually checked, so that we avoid back and forth. Should we create a ticket for doing that?
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.
Should we create a ticket for doing that?
This could be a part of ticket-30950. For now, we're trying to make life less painful for folks with frozen environments.
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.
Yeah, I got it. I'll try to do it soon.
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.
Done.
Also, this module will not be imported unless we're calling sphinx
and while it could make sense to interact with the packaged doc (doc is present in the packaged tar.gz but not in the wheel), I'm not sure it's reasonable to expect this to work in a frozen env. So I'm pretty sure we were safe, but the change has been done nonetheless.
Co-authored-by: Sarah Boyce <[email protected]>
Co-authored-by: Mariusz Felisiak <[email protected]>
I can't see I wonder if that's due to the In the It seems to me that the issue is that we're getting What do you think? |
Ha I had not foreseen that Django would have I'm guessing we'll need to be smarter, then. I'll rework the code. |
(Just for the record: as discussed on the Django Discord, I'm sorry that I wasn't able to take the time and take this contribution to the end, but I'd be happy to help anyone interested to start from there, including and especially Djangonauts from the Djangonaut Space program. Let me know here or even preferably on Discord (@ewjoachim).) |
@ewjoachim Thanks for all your efforts 👍 Closing per Joachim's comment. |
This was implemented during the DjangoCon Europe sprint, thanks to @sarahboyce and partly based on #16203 by @zachborboa
This fixes 2 issues at once: