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

gh-101100: fix sphinx warnings in reference/datamodel.rst#114280

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

Closed

Conversation

skirpichev
Copy link
Member

@skirpichevskirpichev commentedJan 19, 2024
edited by github-actionsbot
Loading

@@ -885,7 +885,7 @@ Predefined (writable) attributes:
:attr:`__name__`
The module's name.

:attr:`__doc__`
:attr:`~definition.__doc__`
Copy link
Member

@AlexWaygoodAlexWaygoodJan 19, 2024
edited
Loading

Choose a reason for hiding this comment

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

I'd prefer to fix these warnings by creating a single canonical table in the datamodel docs, and removing duplicated documentation elsewhere: see#101100 (comment) (and see PRs where I did similar things for other lists like this in this document:#112781,#112735,#112832,#112933)

@AlexWaygoodAlexWaygood added docsDocumentation in the Doc dir skip news labelsJan 19, 2024
@@ -5492,6 +5492,17 @@ types, where they are relevant. Some of these are not reported by the
The tuple of base classes of a class object.


.. attribute:: definition.__module__
Copy link
Member

@AlexWaygoodAlexWaygoodJan 19, 2024
edited
Loading

Choose a reason for hiding this comment

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

In my opinion, the attributes listed here should only be attributes such as__dict__ and__class__ that appear onall Python objects (I'm aware that's not currently the case, but that's a problem, in my opinion).

We already have a dedicated reference for the__module__ attribute on function objects; I think we should do the same for the__module__ attribute on class objects:https://docs.python.org/3/reference/datamodel.html#function.__module__ (ditto for__doc__)

@skirpichevskirpichev marked this pull request as draftJanuary 19, 2024 07:48
@hugovkhugovk added needs backport to 3.11only security fixes needs backport to 3.12only security fixes labelsJan 19, 2024
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygood
Copy link
Member

AlexWaygood commentedJan 19, 2024
edited
Loading

Suggestion: you may want to consider separate PRs for tackling warnings relating to module attributes and those relating to class attributes. Fixing the Sphinx nitpicks in the datamodel docs in a principled way is not trivial -- I've been picking away at them for a while, in#112737,#112781,#112735,#112832,#112933, etc. :)

Keeping the PRs small will make it easier for us to review your PRs, and make it easier for you to address our feedback.

I haven't as much time to work on it right now, so it's great some other people are getting involved!

@serhiy-storchaka
Copy link
Member

Directivecurrentclass (similar tocurrentmodule) would help us.

@skirpichev
Copy link
MemberAuthor

#114336 - is a set/frozenset issue.

hugovk reacted with thumbs up emojiAlexWaygood reacted with heart emoji

@skirpichevskirpichev deleted the datamodel.rst-101100 branchJanuary 27, 2024 03:44
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@hugovkhugovkhugovk left review comments

@serhiy-storchakaserhiy-storchakaserhiy-storchaka left review comments

@AlexWaygoodAlexWaygoodAlexWaygood left review comments

@willingcwillingcAwaiting requested review from willingcwillingc will be requested when the pull request is marked ready for reviewwillingc is a code owner

@AA-TurnerAA-TurnerAwaiting requested review from AA-TurnerAA-Turner will be requested when the pull request is marked ready for reviewAA-Turner is a code owner

Assignees
No one assigned
Labels
docsDocumentation in the Doc dirneeds backport to 3.11only security fixesneeds backport to 3.12only security fixesskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@skirpichev@AlexWaygood@serhiy-storchaka@hugovk

[8]ページ先頭

©2009-2025 Movatter.jp