Skip to content
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

Make the documentation build reproducibly #3408

Merged

Conversation

lamby
Copy link
Contributor

@lamby lamby commented Oct 28, 2019

Whilst working on the Reproducible Builds effort we noticed that flask could not be built reproducibly.

This is because it includes an absolute build directory in the documentation as the json_module attribute points to a Python class/module which has a string representation including its path.

This commit skips this (inherited) member from the documentation.

(This was originally filed in Debian as #943674.)

Whilst working on the Reproducible Builds effort [0] we noticed that
flask could not be built reproducibly.

This is because it includes an absolute build directory in the
documentation as the "json_module" attribute points to a Python class/
module which has a string representation including its path.

This commit skips this (inherited) member from the documentation.

(This was originally filed in Debian as #943674 [1].)

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/943674
@davidism
Copy link
Member

You can't exclude this, it's part of the documented api.

@davidism
Copy link
Member

If you're concerned with overall reproducibility, you should probably contribute a general fix to stabilize reprs in Sphinx.

@lamby
Copy link
Contributor Author

lamby commented Oct 28, 2019

You can't exclude this, it's part of the documented api.

Don't quite follow what you mean by "can't" here, but assuming you might clarify this with "should" or similar it is simply excluding this member from this internal wrapper class from the documentation - the current entry has no associated text whatsover, just the "<module /path/to/foo.pyc>' or whatever.

@davidism
Copy link
Member

davidism commented Oct 28, 2019

That attribute is documented in Werkzeug, so if it's not showing up in Flask that's another thing that needs to be addressed in Sphinx. May be related to sphinx-doc/sphinx#6415.

The fact that non-reproducible internals such as module paths are output by Sphinx is a more general problem with Sphinx and should be addressed there rather than in individual docs. In this case, it would make more sense for that to be a reference to the flask.json module rather than a repr.

@davidism
Copy link
Member

It seems like even adding custom documentation doesn't get through if the attribute is aliasing a module. So I guess the best answer is to exclude it for now, and hope that linked Sphinx issue can be addressed.

@davidism davidism merged commit 1234eb0 into pallets:master Oct 28, 2019
@davidism davidism added the docs label Oct 28, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants