Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove newline inDoc/c-api/lifecycle.rst forgettext builder#135013

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
serhiy-storchaka merged 1 commit intopython:mainfromrffontenelle:patch-6
Jun 2, 2025

Conversation

rffontenelle
Copy link
Contributor

@rffontenellerffontenelle commentedJun 2, 2025
edited
Loading

This newline is causing Sphinx's gettext builder to extract the message including the\n character instead of keeping all in a single string.

For instance, see how that string looks in thetranslation file for Brazilian Portuguese:

#: ../../c-api/lifecycle.rst:55 ../../c-api/lifecycle.rst:63msgid """Diagram showing events in an object's life.  Explained in detail\n""below."msgstr ""

📚 Documentation preview 📚:https://cpython-previews--135013.org.readthedocs.build/

Copy link
Contributor

@Yzi-LiYzi-Li left a comment

Choose a reason for hiding this comment

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

I think 83 characters can be accepted, and it will look more concise.

@picnixz
Copy link
Member

This newline is causing Sphinx's gettext builder to extract the message including the \n character instead of keeping all in a single string.

Have you tried using a backslash continuation\ instead?

@picnixzpicnixz changed the titleRemove newline in c-api lifecycleDocs: remove newline inDoc/c-api/lifecycle.rst forgettext builderJun 2, 2025
@picnixzpicnixz changed the titleDocs: remove newline inDoc/c-api/lifecycle.rst forgettext builderRemove newline inDoc/c-api/lifecycle.rst forgettext builderJun 2, 2025
@StanFromIreland
Copy link
Contributor

@picnixz It does not work, as shown below, it will escape the\:

#:../../c-api/lifecycle.rst:55msgid"Diagram showing events in an object's life.  Explained in detail\\\n""below."msgstr""

@picnixz
Copy link
Member

Interesting. I may consider this to be a bug in docutils or in Sphinx.

I think I actually had a local patch for sphinx when options were incorrectly processed if they were not on the same line, even with a backslash, which is why I assumed it worked.

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM.

@serhiy-storchakaserhiy-storchaka merged commitc7051a3 intopython:mainJun 2, 2025
41 checks passed
@github-project-automationgithub-project-automationbot moved this fromTodo toDone inDocs PRsJun 2, 2025
@serhiy-storchakaserhiy-storchaka added needs backport to 3.13bugs and security fixes needs backport to 3.14bugs and security fixes labelsJun 2, 2025
@miss-islington-app
Copy link

Thanks@rffontenelle for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks@rffontenelle for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJun 2, 2025
…GH-135013)(cherry picked from commitc7051a3)Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
@miss-islington-app
Copy link

Sorry,@rffontenelle and@serhiy-storchaka, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker c7051a366996dd2213decb8677c52d1eda0fde6a 3.13
rffontenelle reacted with thumbs up emoji

@bedevere-app
Copy link

GH-135038 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJun 2, 2025
@rffontenellerffontenelle deleted the patch-6 branchJune 2, 2025 18:14
@serhiy-storchakaserhiy-storchaka removed the needs backport to 3.13bugs and security fixes labelJun 2, 2025
serhiy-storchaka pushed a commit that referenced this pull requestJun 2, 2025
…H-135013) (GH-135038)(cherry picked from commitc7051a3)Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@StanFromIrelandStanFromIrelandStanFromIreland left review comments

@johnzhou721johnzhou721johnzhou721 left review comments

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

@Yzi-LiYzi-LiYzi-Li approved these changes

Labels
docsDocumentation in the Doc dirskip issueskip news
Projects
Status: Done
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

6 participants
@rffontenelle@picnixz@StanFromIreland@serhiy-storchaka@Yzi-Li@johnzhou721

[8]ページ先頭

©2009-2025 Movatter.jp