cpython icon indicating copy to clipboard operation
cpython copied to clipboard

DOC: Improvements in library/stdtypes

Open adorilson opened this issue 4 years ago โ€ข 2 comments

DOC: Improvements in library/stdtypes

This PR do:

  1. Replace :meth: by :func: around repr function
  2. Add links to Unicode Standard site
  3. Make explicit "when" can call the iskeyword function The previous text can make a confusion in reader. The reader could understand the isidentifier method call the iskeyword. Now, is explicit that the dev can do it.
  4. Replace a URL by a link

adorilson avatar Feb 07 '21 00:02 adorilson

This PR is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Mar 10 '21 00:03 github-actions[bot]

Trying to compile I get: make html mkdir -p build Building NEWS from Misc/NEWS.d with blurb PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -W . build/html Running Sphinx v4.5.0 loading pickled environment... done building [mo]: targets for 0 po files that are out of date building [html]: targets for 496 source files that are out of date updating environment: [config changed ('version')] 485 added, 0 changed, 14 removed reading sources... [100%] whatsnew/index

Warning, treated as error: /home/me/Documents/cpython/Doc/c-api/complex.rst:49:Error in declarator or parameters Error in declarator or parameters Invalid C declaration: Expected identifier, got user-defined keyword: complex. Remove it from c_extra_keywords to allow it as identifier. Currently c_extra_keywords is ['alignas', 'alignof', 'bool', 'complex', 'imaginary', 'noreturn', 'static_assert', 'thread_local']. [error at 39] Py_complex _Py_c_neg(Py_complex complex) ---------------------------------------^ make: *** [Makefile:51: build] Error 2

cpython/Doc on ๎‚  pr/24466 [$] via ๐Ÿ v3.11.0a6+ took 1m16s


My environment should be ok. I did have an issue but this was made good yesterday and I am using the recommended Sphinx version, also has been compiling the Docs ok up to now. I know this shows the error is with complex.rst but cant confirm all good. Plus noted you have conflicts with your branch.

MaxwellDupre avatar Apr 02 '22 10:04 MaxwellDupre

The checks were run long enough ago that I can't see what failed, but merging with main should hopefully fix it. Otherwise, I can give it a closer look.

CAM-Gerlach avatar Nov 13 '22 09:11 CAM-Gerlach

Ah, its just failing because of some trailing whitespace, but that's already fixed in my suggestions, so just apply those and you should be good to go.

FYI, in case you aren't aware, you can do so by going to the Files changed tab, click Add to batch on the suggestions you want to apply, then once you've selected them all, click Commit on any suggestion or up top to commit them all in one go directly to the PR and auto-resolve the linked review comments.

CAM-Gerlach avatar Nov 13 '22 12:11 CAM-Gerlach

Ah, its just failing because of some trailing whitespace, but that's already fixed in my suggestions, so just apply those and you should be good to go.

FYI, in case you aren't aware, you can do so by going to the Files changed tab, click Add to batch on the suggestions you want to apply, then once you've selected them all, click Commit on any suggestion or up top to commit them all in one go directly to the PR and auto-resolve the linked review comments.

In fact, I was not aware about this. However, I read this comment too late. I will use this resource in a next time.

Thanks for suggestions and good discussion.

adorilson avatar Nov 16 '22 13:11 adorilson

Status check is done, and it's a success โœ….

miss-islington avatar Nov 17 '22 16:11 miss-islington

Thanks @adorilson for the PR ๐ŸŒฎ๐ŸŽ‰.. I'm working now to backport this PR to: 3.10, 3.11. ๐Ÿ๐Ÿ’โ›๐Ÿค–

miss-islington avatar Nov 17 '22 16:11 miss-islington

Sorry, @adorilson, I could not cleanly backport this to 3.11 due to a conflict. Please backport using cherry_picker on command line. cherry_picker a0d940d6acbb5c6614cf892192d8cb0d7002e5a6 3.11

miss-islington avatar Nov 17 '22 16:11 miss-islington

Sorry @adorilson, I had trouble checking out the 3.10 backport branch. Please retry by removing and re-adding the "needs backport to 3.10" label. Alternatively, you can backport using cherry_picker on the command line. cherry_picker a0d940d6acbb5c6614cf892192d8cb0d7002e5a6 3.10

miss-islington avatar Nov 17 '22 16:11 miss-islington

Backporting this is actually slightly complicated, since the 3.11 branch is still using v14 of the Unicode standard, and the links added in this PR all point to v15 of the Unicode standard. I'm not going to undertake backporting this myself, but if you want to do a manual backport to the 3.11 branch @adorilson (without the Unicode-standard-related changes), feel free to ping me, and I can get it merged.

AlexWaygood avatar Nov 17 '22 16:11 AlexWaygood

@AlexWaygood When whomever is manually backporting, the links could simply be adjusted to point to Unicode 14.0, or Unicode 13.0 for 3.10.

CAM-Gerlach avatar Nov 17 '22 17:11 CAM-Gerlach

@AlexWaygood When whomever is manually backporting, the links could simply be adjusted to point to Unicode 14.0, or Unicode 13.0 for 3.10.

Indeed they could, but on balance, I'd prefer they weren't. I think backports should generally be as minimal as possible, and should generally differ from the original PR as little as possible. This reduces the risk of discrepancies emerging between the branches, which might complicate future backports.

But, I don't have a particularly strong opinion about it.

AlexWaygood avatar Nov 17 '22 18:11 AlexWaygood

It seems I'm a little confused, sorryโ€”I thought you were suggesting above to not backport the change at all, or to completely omit a substantial part of the changes. However, it now sounds like you're suggesting backporting it as-is without changing the links, which would be the minimal delta to the original PR, and equally the lowest chance of creating merge conflicts with future backports (which is certainly a concern that I share). The next-most-minimal diff to both the original PR and between the branches would be just tweaking only the versions in the URLs, which it seems you're not in favor of, if I understand you right?

CAM-Gerlach avatar Nov 17 '22 19:11 CAM-Gerlach