8000 bpo-37504: Fix documentation build with texinfo builder by mitya57 · Pull Request #14606 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-37504: Fix documentation build with texinfo builder #14606

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

Merged
merged 2 commits into from
Sep 10, 2019

Conversation

mitya57
Copy link
Contributor
@mitya57 mitya57 commented Jul 5, 2019

In the table model used by docutils, the cols attribute of tgroup nodes is mandatory. It is used in texinfo builder here.

Here is a screenshot proving that this change works:
Screenshot of info showing the Python documentation

https://bugs.python.org/issue37504

Copy link
Contributor
@aeros aeros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mitya57 Thanks for the contribution! In order to fully verify that the change is working appropriately since this is addressing a specific bug (Documentation fails to build when using Sphinx' textinfo builder), I would advise advise updating the tests (which would be included in the PR). A screenshot does provide a solid visual example, but is usually not reliable enough to show that it fully functions as described in the initial issue. This also helps to ensure that if your addition works as intended, no other changes will unintentionally break it.

The above suggestions might not be necessary in order for your PR to be merged, but in general adding tests is always helpful, especially when it involves a change in functionality or fixing a bug that was under the radar of the existing tests.

@mitya57
Copy link
Contributor Author
mitya57 commented Jul 6, 2019

Now the texinfo file is built successfully during Travis test, see https://travis-ci.org/python/cpython/jobs/555099128#L283.

Copy link
Contributor
@aeros aeros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the tests.

Copy link
Contributor
@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for the nitpick / drive-by -- looks good!

@brettcannon brettcannon added the docs Documentation in the Doc dir label Jul 11, 2019
@mitya57
Copy link
Contributor Author
mitya57 commented Aug 13, 2019

@zooba @tirkarthi As you were the author and reviewer of #14406 which added this nodes.tgroup construct, please review this too.

The Travis build failed with a temporary error, I guess it can be retried.

As your original PR is not part of any stable release, I think the “skip news” label can be added.

@aeros
Copy link
Contributor
aeros commented Aug 13, 2019

The Travis build failed with a temporary error, I guess it can be retried.

@mitya57 You can retry the travis build by adding and removing an empty comment # to pyspecific.py, either at the end of an existing line or a new one.

As your original PR is not part of any stable release, I think the “skip news” label can be added.

Agreed, I think the skip news label would be appropriate here.

Copy link
Member
@tirkarthi tirkarthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I didn't know about texinfo and reading it on Emacs is nice. I am okay with the changes as per the reference and running locally also builds fine. I am not sure about running make texinfo on primary CI like Travis. I would defer to @JulienPalard on that.

@mitya57
Copy link
Contributor Author
mitya57 commented Aug 14, 2019

I am not sure about running make texinfo on primary CI like Travis.

It was not my idea, but requested by @aeros167.

@aeros
Copy link
Contributor
aeros commented Aug 15, 2019

I would defer to @JulienPalard on that.
It was not my idea, but requested by @aeros167.

From what I recall, that suggestion was just to add further testing, I'm not certain as to the best way to do it with regards to texinfo or if it should even be done through travis. Julien would definitely be far better to ask, also @willingc since she's a documentation expert.

@willingc
Copy link
Contributor

Thanks @mitya57 for the pull request. A few thoughts on the changes:

  • I don't think it is necessary to add the texinfo to Travis since we do not currently build LaTeX or EPUB on Travis. @JulienPalard, do you see any reason to add all of the formats?
  • On the Makefile, adding texinfo to the .PHONY line would be a good practice
  • Also, the Makefile has commands toward the end to archive the different format. Probably a good idea to add that for texinfo as well.

Copy link
Contributor
@willingc willingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update as suggested in my earlier message. Thanks!

@mitya57
Copy link
Contributor Author
mitya57 commented Aug 15, 2019

I have now rebased on latest master and updated as suggested by @willingc.

@zooba zooba merged commit c3d679f into python:master Sep 10, 2019
@miss-islington
Copy link
Contributor

Thanks @mitya57 for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 10, 2019
In the table model used by docutils, the `cols` attribute of `tgroup`
nodes is mandatory, see [1]. It is used in texinfo builder in [2].

[1]: https://www.oasis-open.org/specs/tm9901.htmGH-AEN348
[2]: https://github.com/sphinx-doc/sphinx/blob/v2.1.2/sphinx/writers/texinfo.pyGH-L1129

* Doc: Add texinfo support to the Makefile
(cherry picked from commit c3d679f)

Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
@bedevere-bot
Copy link

GH-15866 is a backport of this pull request to the 3.8 branch.

@mitya57 mitya57 deleted the bpo-37504 branch September 10, 2019 14:46
zooba pushed a commit that referenced this pull request Sep 10, 2019
In the table model used by docutils, the `cols` attribute of `tgroup`
nodes is mandatory, see [1]. It is used in texinfo builder in [2].

[1]: https://www.oasis-open.org/specs/tm9901.htmGH-AEN348
[2]: https://github.com/sphinx-doc/sphinx/blob/v2.1.2/sphinx/writers/texinfo.pyGH-L1129

* Doc: Add texinfo support to the Makefile
(cherry picked from commit c3d679f)

Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull request Jul 20, 2020
In the table model used by docutils, the `cols` attribute of `tgroup`
nodes is mandatory, see [1]. It is used in texinfo builder in [2].

[1]: https://www.oasis-open.org/specs/tm9901.htm#AEN348
[2]: https://github.com/sphinx-doc/sphinx/blob/v2.1.2/sphinx/writers/texinfo.py#L1129

* Doc: Add texinfo support to the Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants
0