-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Fixing links to make sphinx built pass with py3.5 #4556
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
Fixing links to make sphinx built pass with py3.5 #4556
Conversation
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.
This is a hidden function, so it does not really matter. But 👍 for consistency.
|
Needs astropy/ci-helpers#61 to be merged. |
359f08a to
235331b
Compare
|
@bsipocz - above, you noted this needed ci-helpers 61 to get merged, which has happened. I restarted the sphinx build in case, but maybe this needs to be rebased? |
|
@bsipocz - looking better at the failure, I see that you need to make a change in |
|
Looking at this again, I have no idea why I linked this to astropy/ci-helpers#61, it should have been astropy/astropy-helpers#216 instead (it's needed to be able to resolve the problematic intersphinx references). |
d9b66e1 to
a7fd21e
Compare
|
(Note that I've cancelled appveyor to ease up a bit of the congestion, none of the changes in this PR has an effect on appveyor). |
|
I milestoned this as 1.2 as I mentioned in astropy/astropy-helpers#216, although if there's a strong reason to get it in sooner we can try for something in 1.1.x |
|
One other complication for this: right now one of the reasons for testing the doc builds with 2.x is that readthedocs, which in some sense is the "canonical" copy of the docs, uses 2.x. We could change that, but it looks like you can only change the python version used to build RTD on a "whole project" basis. So we couldn't e.g. have v1.0.x be on Python 2.x, but 1.2.x be on 3.x. So what that makes me think is that we might have to wait until Astropy 2.0 (when we can retire the 1.0 build) to switch RTD to 3.x. In that case, we probably still want to test the 2.x build_sphinx with travis. Or we could do both? |
|
@eteq - is it a problem to build 1.0.x documentation on python3? |
|
@eteq - Either way seems fine I think (having it in v2.0, or try to port this pack to v1.0.x as supporting py3 is not a new feature). However I feel it is being wasted travis time to build both py2 and py3 docs on travis. |
|
Agreed that we should not build both! Indeed, in principle, I think it would be nice to reduce the tests run for PRs to a smaller subset, and only run a full suite before actual merging. But not sure that is possible (and easy). |
|
@mhvk - I think it shouldn't be too difficult to add an env variable to ci-helpers that makes sure that the tests are only run when the commit message contains a certain keyword (e.g. |
a7fd21e to
1dbf8de
Compare
|
Rebased, but cancelled the CI builds as this requires the helpers PR first. |
|
I've restarted this since the helpers PR got merged (although I'm not sure if we've made a new helpers release since, so this might not help) |
|
Could we rebase this and rerun the test suite? It is still running Numpy 1.6 tests, so obviously has not picked up the recent removal of 1.6 (#4784). |
|
@astrofrog - as far as I know there wasn't any new helpers release. Do you want me to add the current helpers master in this PR? I don't see any controversial in it as this PR milestoned as 1.2 and it's clear that there will be a helpers release before releasing 1.2. @pllim - There isn't any changes that should brake with 1.6 included, but I'll rebase once the helpers issue above is solved with either option. |
1dbf8de to
a83f156
Compare
|
Added the updated helpers master, and rebased. I expect it to pass (except some triviality that possibly got merged in the last 3 weeks since I last tested this locally). |
|
Looks like it all works now! I'd merge were it not for #4556 (comment): do we have to backport this so that older versions generate consistent documentation? @eteq? |
|
Good point @mhvk. I'm trying to cherry-pick this on top of v1.0.x. |
|
This looks good to me - however, to be clear about this, once we also update RTD (which we should do as soon as this is merged, otherwise some links will break) all API links for Python will now link to the Python 3 docs. This is fine by me, but I'd like to get a final OK from @eteq and @taldcroft before merging. |
|
|
a83f156 to
18e9e85
Compare
|
This is now rebased and should pass. |
|
👍 on linking to Python 3 docs. |
|
👍 |
|
I'm 👎 on backporting this to 1.0.x - an LTS should not suddenly change what version of python it's docs are built against. Even though there's not a real connection involved on the code side, users who follow those doc links will probably interpret it that way. So given you can't change RTD's python version for one build and not another, I think it's best to merge this, but without the |
|
Oh, but I'm 👍 to merging it and backporting to 1.2 (with the small tweak of not changing the sphinx build on travis) |
|
@eteq - I don't really see the problem for LTS; all that really changes is that the rare links for exceptions etc. now point to python3. That will mostly not matter, but to the extent it does, it is just as (ever so slightly) helpful to those working with python3 as it is (ever so slightly) unhelpful to those still on python2. And to give the latter a slight push to start moving to python3 is probably a good thing. |
|
I'm going to check whether this backports cleanly to 1.0.x and whether the 1.0.x docs then build in Python 3 without warnings. |
|
Here are some findings/thoughts:
|
… inv support required for this PR
18e9e85 to
a7fb921
Compare
|
I've removed the commit that changes the travis from 2.7 to 3.5, and will open a separate new PR for it once this one is merged. |
|
With the removal of |
|
@mhvk - thanks for merging this! However, I noticed the following issue with this pull request:
Would it be possible to fix this? Thanks! This is an experimental bot being written by @astrofrog - let me know if the message above is incorrect! |
|
🎉 @mhvk - Thanks for the merge, I'll open a PR. |
…_sphinx Fixing links to make sphinx built pass with py3.5
I made some changed to astropy-helpers that will allow to have sphinx builds with either python2 or python3 with all the links resolved.
This PR moves the build to use python 3.5, and also fix the remaining warnings and links.
This can be merged after astropy/ci-helpers#61 is merged and propagated back to here.
[Edit]: Closes #4968