Skip to content

Conversation

@aureliobarbosa
Copy link
Contributor

@aureliobarbosa aureliobarbosa commented Oct 3, 2025

gh-139533: fix refs to code without proper markups on turtledemo doc

Many references to scripts and functions on turtledemo module documentation do not use the proper reStructuredText markups used on this repo. This PR fixes them.


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

+------------------------+------------------------------+--------------------------------------+
| Name | Description | Features |
+========================+==============================+======================================+
| ``bytedesign`` | complex classical | :func:`tracer`, :func:`delay`, |
Copy link
Contributor

Choose a reason for hiding this comment

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

:mod: role seems to be more suitable for this case.

Copy link
Member

Choose a reason for hiding this comment

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

For bytedesign? It is a file in a module, not a module. Since it has no documentation, the rendered result will be the same anyway. I guess :source:`bytedesign <Lib/turtledemo/bytedesign.py>` would make sense, but I think the current one is fine.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is a module in a package, isn't it?

However, I haven't thought about the effects of :mod: at a module without documentation. I like the idea of making it easier to access source code. As demonstration scripts, it is natural that people want to see the code, particularly in educational contexts where the turtle is widely used

Copy link
Contributor

@adorilson adorilson Oct 3, 2025

Choose a reason for hiding this comment

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

My suggestion about :mod: is also, although sticks (``) are used on variables/literals/code, :mod: is a bigger warning saying "don't translate it". This issue arose from a discussion on this point. Is there something to this case? A role that escapes the string from the translation process?

@aureliobarbosa aureliobarbosa force-pushed the doc_turtledemo_table_issues branch from febfc34 to a8985a9 Compare October 3, 2025 15:42
@StanFromIreland
Copy link
Member

Please don't force push, it makes reviewing more difficult.

@aureliobarbosa
Copy link
Contributor Author

Please don't force push, it makes reviewing more difficult.
Sorry for the force push. Is there anything else to be done on my side?

@StanFromIreland
Copy link
Member

Nope, you just have to wait now. There is a long queue of PRs before this one I’m afraid.

@gpshead gpshead merged commit c903d76 into python:main Nov 11, 2025
65 checks passed
@miss-islington-app
Copy link

Thanks @aureliobarbosa for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Nov 11, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 11, 2025
…o doc (pythonGH-139534)

(cherry picked from commit c903d76)

Co-authored-by: Marco Barbosa <[email protected]>
pythongh-139533: fix refs to code without proper markups on turtledemo documentation
@bedevere-app
Copy link

bedevere-app bot commented Nov 11, 2025

GH-141421 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Nov 11, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 11, 2025
…o doc (pythonGH-139534)

(cherry picked from commit c903d76)

Co-authored-by: Marco Barbosa <[email protected]>
pythongh-139533: fix refs to code without proper markups on turtledemo documentation
@bedevere-app
Copy link

bedevere-app bot commented Nov 11, 2025

GH-141422 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 11, 2025
@gpshead
Copy link
Member

gpshead commented Nov 11, 2025

I went ahead and merged this as it is an improvement. They aren't documented modules so :mod: could imply the wrong thing. Use of (``) feels like it should already be sufficient to indicate "this is a literal used in code somehow - do not translate it" to people or tooling doing translation to me, but if the docs folks and translators settle on something specific for that, followup issues/PRs can address it.

gpshead pushed a commit that referenced this pull request Nov 11, 2025
…mo doc (GH-139534) (#141422)

gh-139533: fix refs to code without proper markups on turtledemo doc (GH-139534)
(cherry picked from commit c903d76)


gh-139533: fix refs to code without proper markups on turtledemo documentation

Co-authored-by: Marco Barbosa <[email protected]>
gpshead pushed a commit that referenced this pull request Nov 11, 2025
…mo doc (GH-139534) (#141421)

gh-139533: fix refs to code without proper markups on turtledemo doc (GH-139534)
(cherry picked from commit c903d76)


gh-139533: fix refs to code without proper markups on turtledemo documentation

Co-authored-by: Marco Barbosa <[email protected]>
@StanFromIreland
Copy link
Member

Use of (``) feels like it should already be sufficient to indicate

With my translator hat on, I agree.

@aureliobarbosa aureliobarbosa deleted the doc_turtledemo_table_issues branch November 11, 2025 20:20
@aureliobarbosa
Copy link
Contributor Author

Thanks for the reviews @gpshead and @StanFromIreland.

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

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants