Skip to content

gh-128349: use .. data:: instead of .. class:: for pre-defined decimal Context objects #128379

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

Merged
merged 9 commits into from
Jan 2, 2025

Conversation

abkmystery
Copy link
Contributor

@abkmystery abkmystery commented Dec 31, 2024

Closes gh-128349.

Updated .. class:: BasicContext to .. data:: BasicContext to correctly represent it as a predefined context object, not a class.

This ensures accurate documentation of the decimal module.


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

@ghost
Copy link

ghost commented Dec 31, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@picnixz picnixz changed the title gh-128349: Fix documentation for decimal.BasicContext. Change BasicContext to data directive in decimal module document… gh-128349: use .. data:: instead of .. class:: for pre-defined decimal Context objects Dec 31, 2024
Copy link
Member

@picnixz picnixz left a comment

Choose a reason for hiding this comment

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

Before we merge it, can you check that we never refer to those objects using the :class: role across the docs? thanks in advance.

picnixz
picnixz previously approved these changes Dec 31, 2024
@picnixz picnixz added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Dec 31, 2024
@skirpichev
Copy link
Member

Before we merge it, can you check that we never refer to those objects using the :class: role across the docs?

$ git grep -E '(BasicContext|ExtendedContext|DefaultContext)`' Doc/
Doc/library/decimal.rst:use standard contexts, :const:`BasicContext` and :const:`ExtendedContext`. The
Doc/library/decimal.rst:   default values are copied from the :const:`DefaultContext`.  If the *flags*
Doc/whatsnew/3.3.rst:* In the context templates (:class:`~decimal.DefaultContext`,
Doc/whatsnew/3.3.rst:  :class:`~decimal.BasicContext` and :class:`~decimal.ExtendedContext`)

@picnixz
Copy link
Member

picnixz commented Jan 1, 2025

Doc/whatsnew/3.3.rst:* In the context templates (:class:~decimal.DefaultContext,
Doc/whatsnew/3.3.rst: :class:~decimal.BasicContext and :class:~decimal.ExtendedContext)

Those two need to be changed then.

@picnixz picnixz dismissed their stale review January 1, 2025 01:59

Some :class: occurrences remain.

@abkmystery
Copy link
Contributor Author

@picnixz @skirpichev Can you please review the changes now? I had checked within the doc library folder but now checked across complete doc folder. Let me know if any further changes/corrections are needed.

image

@skirpichev
Copy link
Member

@abkmystery, please avoid "update branch" button, unless you want to fix a merge conflict or to trigger CI run if your pr is old.

@abkmystery
Copy link
Contributor Author

@skirpichev Got it. Please review the changes now.

@abkmystery
Copy link
Contributor Author

abkmystery commented Jan 1, 2025

@skirpichev Are there any further steps pending from me or will someone with authorization go through awaiting merge tagged PR and merge this? Asking as I am new to this and don't want to miss anything. Thanks

@skirpichev
Copy link
Member

Yes, you should wait a merge.

@Eclips4 Eclips4 merged commit 60c6518 into python:main Jan 2, 2025
25 checks passed
@miss-islington-app
Copy link

Thanks @abkmystery for the PR, and @Eclips4 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 2, 2025
…ned decimal `Context` objects (pythonGH-128379)

(cherry picked from commit 60c6518)

Co-authored-by: abkmystery <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jan 2, 2025

GH-128401 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 Jan 2, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 2, 2025
…ned decimal `Context` objects (pythonGH-128379)

(cherry picked from commit 60c6518)

Co-authored-by: abkmystery <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jan 2, 2025

GH-128402 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Jan 2, 2025
@Eclips4
Copy link
Member

Eclips4 commented Jan 2, 2025

Thank you @abkmystery! Congratulations on your first contribution 🎊!

Eclips4 pushed a commit that referenced this pull request Jan 2, 2025
…ined decimal `Context` objects (GH-128379) (#128401)

gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379)
(cherry picked from commit 60c6518)

Co-authored-by: abkmystery <[email protected]>
Eclips4 pushed a commit that referenced this pull request Jan 2, 2025
…ined decimal `Context` objects (GH-128379) (#128402)

gh-128349: Use `.. data::` instead of `.. class::` for pre-defined decimal `Context` objects (GH-128379)
(cherry picked from commit 60c6518)

Co-authored-by: abkmystery <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 8, 2025
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.

Docs: decimal.BasicContext etc. are not classes
4 participants