GeezerVison is showing github.com — gh-66783: Automate update of Unicode data version in documentation by nmassman · Pull Request #17748 · python/cpython
Conversation
nmassman
commented
Dec 30, 2019
•
edited by bedevere-app
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Added a sphinx extension and modified makeunicodedata.py to automate updating documentation with the current Unicode version when it changes.
https://bugs.python.org/issue22593
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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 the PR @nmassman and welcome!
I agree with the general idea behind the PR, it doesn't seem practical to maintain the latest Unicode version in 6 different locations, or for additional ones that are added in the future.
However, a few points (I might think of more later):
- You could store the version as a global constant in
conf.py, I don't think we need a dedicated text file just to store the latest unicode version.
UNICODE_VERSION or UCS_VERSION would be a far more explicit name for the constant. As far as I'm aware, "UCD" is not a commonly known acronym for Unicode.
- IANAL, but I believe there are legal issues associated with copyrighting your own file additions. Our primary means of providing credit/acknowledgement to contributors these days is by adding a
Contributed by <name>. sentence at the end of the news entry for the PR. You can add this in yourself.
/cc @merwok
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
nmassman
commented
Dec 31, 2019
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks for the feedback @aeros
- You could store the version as a global constant in
conf.py, I don't think we need a dedicated text file just to store the latest unicode version.
I waffled on this a bit, but I went back and took another crack at it. Mostly I wanted to avoid having makeunicodedata.py accidentally mangle conf.py. I think I got it working reliably, though.
UNICODE_VERSION or UCS_VERSION would be a far more explicit name for the constant. As far as I'm aware, "UCD" is not a commonly known acronym for Unicode.
Kinda embarrassed that I didn't clean that up before submitting the PR. I should have slept first. :) I renamed everything to 'UNIDATA_VERSION' to match the original variable in makeunicodedata.py. This could just as easily be changed to 'UNICODE_VERSION', but I erred on the side of staying consistent to what was already in place.
- IANAL, but I believe there are legal issues associated with copyrighting your own file additions. Our primary means of providing credit/acknowledgement to contributors these days is by adding a
Contributed by <name>. sentence at the end of the news entry for the PR. You can add this in yourself.
I wasn't sure of the convention. I copied the heading format from what was in a few of the other sphinx extensions in the same directory. I inserted the bpo link instead (which was also in one of the other extensions), and updated the news entry.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I think the comments in the file constitute a change log, not a copyright notice. The copyright situation is already handled by the CLA check, which ensures that the contribution has a suitable license.
It seems OK to me to add a line there, even though there is external history in VCS metadata.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I feel this would be easier by using rst_prolog like:
rst_prolog = f"""
.. |UNIDATA_VERSION| replace:: {UNIDATA_VERSION}
"""
it would not need an extension.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
erlend-aasland
changed the title
bpo-22593: Automate update of Unicode data version in documentation
gh-66783: Automate update of Unicode data version in documentation
Jan 5, 2024
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
merwok
Awaiting requested review from merwok
aeros
Awaiting requested review from aeros
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|