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

Appearance settings

gh-66646: Explain __base__ attribute in the docs#102554

Merged
encukou merged 23 commits into
python:mainpython/cpython:mainfrom
furkanonder:issue-66646furkanonder/cpython:issue-66646Copy head branch name to clipboard
Oct 20, 2025
Merged

gh-66646: Explain __base__ attribute in the docs#102554
encukou merged 23 commits into
python:mainpython/cpython:mainfrom
furkanonder:issue-66646furkanonder/cpython:issue-66646Copy head branch name to clipboard

Conversation

@furkanonder

@furkanonder furkanonder commented Mar 9, 2023

Copy link
Copy Markdown
Contributor

Co-authored by: Anupama Srinivas Murthy

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news labels Mar 9, 2023
@merwok

merwok commented Mar 9, 2023

Copy link
Copy Markdown
Member

I’m not sure that this implementation detail should be documented in three places.
One place with an index should be enough. Please also use the right markup to mark it as an impl. detail.

@furkanonder

Copy link
Copy Markdown
Contributor Author

@merwok Since class.__bases__ is defined in stdtypes.rst and datamodel.rst files, I wanted to define class.__base__ in these files.

@merwok

merwok commented Mar 13, 2023

Copy link
Copy Markdown
Member

I understand your reason, but still think one place would be better than 3. I would like to see other people’s opinion!

For the markup, I meant this: https://devguide.python.org/documentation/markup/#codecell33 🙂

Comment thread Doc/reference/datamodel.rst Outdated
@furkanonder

Copy link
Copy Markdown
Contributor Author

I understand your reason, but still think one place would be better than 3. I would like to see other people’s opinion!

CC: @hugovk @CAM-Gerlach

@hugovk

hugovk commented Jul 23, 2023

Copy link
Copy Markdown
Member

I don't have a strong opinion, but if it's an implementation detail, fewer places might be better. The search should help people find it when they're looking.

@furkanonder furkanonder changed the title GH-66646: Explain __base__ attribute in the docs gh-66646: Explain __base__ attribute in the docs Aug 6, 2023
@erlend-aasland

Copy link
Copy Markdown
Contributor

@furkanonder, can you please rework this PR to align with the comments Raymond, Guido, and Éric gave on the issue?

@erlend-aasland erlend-aasland added the pending The issue will be closed if no feedback is provided label Jan 17, 2024
@furkanonder

Copy link
Copy Markdown
Contributor Author

@erlend-aasland Based on Raymond, Guido, and Éric's feedback, I believe changes have been made. Could you please let me know if there is anything I missed?

Comment thread Doc/c-api/object.rst Outdated
@erlend-aasland

Copy link
Copy Markdown
Contributor

@erlend-aasland Based on Raymond, Guido, and Éric's feedback, I believe changes have been made. Could you please let me know if there is anything I missed?

Not at all. I will repeat their comments here:

Raymond said in #66646 (comment):

I think that base was intended to be a non-guaranteed implementation detail for new-style classes just like dictoffset and flags .

Guido followed up in #66646 (comment):

Raymond is correct. base is closely tied to the C implementation. I think it might be worth a mention, but with an explicit note that it is CPython-specific. It is sometimes useful, e.g. when wondering why a certain case of multiple inheritance is rejected.

So, we're talking about a non-guaranteed implementation detail. You've also been told multiple times that a single mention is sufficient, yet you do not follow up this; your PR still changes three doc files, including the reference. "Worth a mention" is far from your PR which adds 64 (!) lines.

I'm sorry, but I cannot see that you've taken any review or issue remarks into account.

@encukou encukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@erlend-aasland, do you want to request more changes?

@merwok merwok removed DO-NOT-MERGE pending The issue will be closed if no feedback is provided labels Oct 16, 2025
@furkanonder furkanonder moved this from Todo to In Progress in Docs PRs Oct 16, 2025

@willingc willingc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for rebooting this @encukou.

@merwok

merwok commented Oct 16, 2025

Copy link
Copy Markdown
Member

I disagree a bit with the label type-feature: shouldn’t we backport this small but maybe useful doc addition?

(skip news is fine)

@encukou encukou added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Oct 17, 2025
@encukou

encukou commented Oct 17, 2025

Copy link
Copy Markdown
Member

Yeah, we generally backport docs improvements.

@encukou encukou merged commit faa169a into python:main Oct 20, 2025
35 of 39 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@github-project-automation github-project-automation Bot moved this from In Progress to Done in Docs PRs Oct 20, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 20, 2025
(cherry picked from commit faa169a)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Éric <merwok@netwok.org>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 20, 2025
(cherry picked from commit faa169a)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Éric <merwok@netwok.org>
@bedevere-app

bedevere-app Bot commented Oct 20, 2025

Copy link
Copy Markdown

GH-140365 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 Oct 20, 2025
@bedevere-app

bedevere-app Bot commented Oct 20, 2025

Copy link
Copy Markdown

GH-140366 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 Oct 20, 2025
encukou pushed a commit that referenced this pull request Oct 21, 2025
…H-140365)

(cherry picked from commit faa169a)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Éric <merwok@netwok.org>
encukou pushed a commit that referenced this pull request Oct 21, 2025
…H-140366)

(cherry picked from commit faa169a)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Éric <merwok@netwok.org>
@merwok

merwok commented Oct 21, 2025

Copy link
Copy Markdown
Member

Thanks to all involved!

StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 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 type-feature A feature request or enhancement

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.