-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
Perform 'blurb split' for master. #2719
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
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.
A quick perusal of the output LGTM.
It looks like Sphinx snuck in a new deprecation warning in Sphinx 1.6.3 which this is triggering. If you can easily fix it by replacing any use of |
And I think the culprit might be
|
LIke Brett, I didn't thoroughly review the changes but, in general, LGTM. One concern: as is, making this change will immediately break all doc builds of |
I tried to restart the Travis doc build but it is now getting a |
So... make suspicious is itself suspicious? GREAT SUCCESS I experimented with having This does make the Doc build process dependent on blurb, which I hadn't anticipated. But that's a natural enough outcome of the process. And we can easily update the |
@brettcannon: It looks to me like Travis built against an old version. Did I hit some sort of workflow bug? I changed The build didn't work because I had to fix What's strange is that on Travis's "requests" dashboard: https://travis-ci.org/python/cpython/requests What's going on? I may try to fool Travis into running another build by uploading a no-op revision. |
The docs job fails on Travis CI because this job only clones the last 50 commits:
whereas blurb looks for a specific commit:
I don't think that we can change how Travis CI clones a Git repository, so we should change how blurb checks if if's running in a Git repository. Maybe it should catch subprocess.SubprocessError on:
To check if it's running in Git or not? |
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.
LGTM.
Looks like @Haypo spotted why the revision check is failing. A bit annoying but understandable since Travis doesn't want to pay the CPU/network costs of downloading the entire CPython repo. As for having the build process depend on blurb, that's just life and I have no issue with it since we already depend on sphinx. If it becomes a really serious problem we can talk about just putting blurb into the cpython repo to essentially vendor blurb in Python itself. |
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.
Not surprisingly, trying to add blurb
into the doc build has twisty little passages. I ran into two major problems reviewing and testing this:
- At the moment, the most recent version of blurb that is published on PyPI and the first one that works as expected was published as
1.0.2.dev1
. Because it's adev
version, by default pip won't try to install it and falls back to the last "production" release1.0.1.post1
which has bugs. I think the best solution is to specify a version >=1.0.2dev1 with Travis (not tested) and pip. - Installing blurb into the venv produced by
make venv
is good except that the rest of the Doc Makefile does not use thevenv
by default. The (undocumented, other than in the original checkin message d5ea39d) intended use was to then explicitly pass the venv Python into Doc makefile targets by setting the PYTHON variable, in part, because trying to use venvactivate
in Makefile recipes can be problematic. But even then, theblurb
command isn't found because using PYTHON= doesn't put the venv bin directory (where theblurb
script is installed) on the processPATH
. I've suggested one way around it which is to invokeblurb
via$(PYTHON) -m blurb
; that way, the lack ofblurb
sort of fails the same way the lack ofsphinx-build
will. It might be nice to fail with a more informative message. I think it mandatory to document thevenv
target inDoc/README.rst
and something about the need to usePYTHON=venv/bin/python
when usingvenv
. BTW, it appears that the 2.7 Doc/Makefile doesn't have avenv
target so that will have to be backported for the 2.7 PR.
.travis.yml
Outdated
@@ -42,6 +42,7 @@ matrix: | |||
# Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures. | |||
# (Updating the version is fine as long as no warnings are raised by doing so.) | |||
- python -m pip install sphinx~=1.6.1 | |||
- python -m pip install blurb |
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.
Suggest something like:
- python -m pip install 'blurb>=1.0.2dev1'
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.
@larryhastings did you push this version? If so, was keeping the dev version on purpose or an accident? If the latter we can just fix the version number and do another release as 1.0.2 so the dependency can be >=1.0.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.
I pushed this version. I don't remember what I changed. I didn't keep the "dev" version on purpose, but then again it is still a little bit under development.
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.
Blurb is under development but is the 1.0.2 release specifically under development? My assumption is you mean the former and not the latter, which means I can push a 1.0.2 release so that the changes in that bugfix release go public because right now no one is getting access since pip considers a dev release unusable without opting in.
Doc/Makefile
Outdated
@@ -38,6 +38,8 @@ help: | |||
@echo " serve to serve the documentation on the localhost (8000)" | |||
|
|||
build: | |||
-mkdir build |
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.
A more common idiom for this is mkdir -p build
. That has the advantage of not producing any messages if the directory already exists.
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.
Doc/Makefile
Outdated
@@ -38,6 +38,8 @@ help: | |||
@echo " serve to serve the documentation on the localhost (8000)" | |||
|
|||
build: | |||
-mkdir build | |||
blurb merge -f build/NEWS |
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.
To get around the PATH problem, suggest:
- Adding
BLURB = $(PYTHON) -m blurb
after line 8 (SPHINXBUILD = sphinx-build
) in the definitions at the top of the file and then - changing the line above to:
$(BLURB) merge -f build/NEWS
That way, if users do amake venv ; make html PYTHON=venv/bin/python
,blurb
will be found there but, if they need to use a different version ofblurb
, they can override it:make html BLURB=/usr/local/bin/blurb
.
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.
Doc/Makefile
Outdated
@@ -107,7 +109,7 @@ clean: | |||
|
|||
venv: | |||
$(PYTHON) -m venv venv | |||
./venv/bin/python3 -m pip install -U Sphinx | |||
./venv/bin/python3 -m pip install -U Sphinx blurb |
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.
As above, suggest setting a version requirement here:
./venv/bin/python3 -m pip install -U Sphinx 'blurb>=1.0.2dev1'
That should be future-proof.
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.
I suspect @larryhastings did a release on Sunday of blurb and simply forgot to bump the version number to 1.0.2 (i.e. drop the |
Booyah! We now pass CI testing in a post-blurb world. @ned-deily, care to review again? |
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.
Thanks for making the changes. Other than the spurious change noted, I still think we need to document how to use make venv
and the need to add PYTHON=venv/bin/python
to the doc make steps. And I need to update the mac installer build accordingly.
@@ -959,3 +959,4 @@ PyObject_ClearWeakRefs(PyObject *object) | |||
PyErr_Restore(err_type, err_value, err_tb); | |||
} | |||
} | |||
|
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 seems spurious.
@ned-deily where are you suggesting to document the use of |
@brettcannon The primary documentation for Doc builds is |
I created GH-2953 to document |
No description provided.