-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Move sphinx build to python3 #5135
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
|
@mhvk - Can you add the switch over python3.5 to this issue? It makes little sense to me to open a separate PR and repeating everything from this issue. (and I can't turn this issue to a PR since you opened it). I think none of the action items above applies to this PR except the change in the travis file. |
|
So I guess the next thing we can do is first make sure that we can get RTD to work correctly with a Python 3 build? |
|
Yes I think so. Then backport the relevant PRs to a 1.0.x helpers release. |
|
@bsipocz - OK, I made this into a PR that changes the travis sphinx build to default python, i.e., 3.5. (Just so the flow remains clear, I also added a "done" item to the above checklist.) |
|
Sphinx build passing here, so maybe time for the next step? It would seem that all one has to do is to switch to |
|
@mhvk - changed, and the docs are now being built. Standing by... |
|
@astrofrog - did the RTD python3 build work? If so, I guess this one should be merged so travis and RTD do the same thing, and we should open a new issue with the remaining items from the checklist... |
|
@mhvk - I think it did. Check the latest docs and try and find a link to the Python docs (e.g. instances of |
|
And I've started to test 1.0.x locally to see what's needed to make it work. |
|
@astrofrog - indeed, I tried to find some |
|
@mhvk - Those were never turned into links or at least not consistently (I have a long abandoned PR to change them over, but it was manual and wasn't sure we want that anyway, maybe I should revive it at some point during a cleanup). |
|
Something is not right yet, e.g. the hooverover |
|
Unfortunately, the CPython 3.x switch has no effect when the builds use Anaconda (I discovered this recently but didn't make the link with this PR before, sorry). |
|
I mean, if you look at the detail of installed packages, the |
|
Could you link the line please? |
|
@bsipocz - I think https://readthedocs.org/projects/astropy/builds/4168563/ should use Python 3, but click on the 'conda install ...' block to see the installed packages. |
|
Maybe adding something like |
|
@astrofrog @mhvk - So to make it work on the v1.0.x branch, we need to following backports:
And the helpers v1.0.8 release needs at least this:
Cherry-picking these pass both sphinx tests: https://travis-ci.org/bsipocz/astropy/builds/142852685 (ignore the first one as there was an error in the cleared out travis file) In addition, as the latest v1.0.7 helpers is failing due to various reasons, to have a passing version the following backports are needed (to be able to deal with the newer sphinx and setuptools versions):
Cherry picking the relevant commits passes on the tests: https://travis-ci.org/bsipocz/astropy-helpers/builds/142843894 Using all the helpers backports it still works: https://travis-ci.org/bsipocz/astropy/builds/142861025 |
|
Adding: to the environment file works. |
|
@astrofrog - I slightly lost track here: should we go ahead and add the |
|
@mhvk - Can you try and add that to |
|
@bsipocz - you mean in this PR? Do we then have to merge it to check that it works? |
|
Oh my bad, you're right of course. |
caadfb2 to
d4bb956
Compare
|
OK, I changed |
|
I think it should be a |
|
I copied my change from #5135 (comment) - but am of course happy to change. A line in |
|
I assumed the other file based on this readthedocs/readthedocs.org#1901, but I guess both should work. |
|
I think it will work as it is at the moment and it won't change anything to specify it in |
|
Here's a test build: http://astropy-test.readthedocs.io/en/latest/ - I haven't had a chance to check whether it worked, but could someone else take a look? |
|
@astrofrog - general links (e.g. object, False, IndexError) still point to the python2 docs in your link. |
|
Weird, the build was using Python 3: For instance you can see it loaded the Python 3 object inventory: and |
|
I think that's a simple caching problem. If I check the Build-Messages it says In my experience it seems non-deterministic which version is displayed but sometimes clearing the version and then building it again works (although this may be an iterative process). |
|
I think it worked after wiping and restarting: for instance if I click on 'None' in this page: I get redirected to the Python 3 docs. @bsipocz - can you confirm this worked? |
|
Yes, the things I checked randomly all look good. |
|
I think we can go ahead and merge this now. The only impact on users will be that they will get redirected to the Python 3 docs instead of Python 2 for intersphinx links, and I think that's fine (since in 95% of cases the content is the same, just more nicely formatted). @eteq @taldcroft @kelle - as coordinators, any objections? |
d4bb956 to
bded2cb
Compare
|
I rebased, so this should be mergeable again. |
|
Shall we merge this? |
|
@astrofrog - 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! |
|
@astrofrog - do you want to move the remaining items on the checklist on top to a new issue? |
|
I don't have time this evening - would you have time to do it now? If not, i'll do it tomorrow. |
|
@astrofrog - OK, new issue is #5246 |
|
Milestoning this as 1.3.0 since as discussed in #5246, we don't need to backport this type of change. The Python version is set by the RTD YAML environment file, which means it's possible to build different versions of Astropy on different Python versions. |
@bsipocz's #4556 made it possible to build the documentation well with python3. This is a reminder to consider moving the read-the-docs and travis sphinx builds to it. From @astrofrog's #4556 (comment)
latestbuilds will start building with Python 3, and future 1.2.x builds will also be fine since the 1.2.x branch includes the changes here.