◐ Shell
reader mode source ↗
Skip to content

gh-111746: Doc: Format built-in function's attributes#113574

Open
adorilson wants to merge 14 commits into
python:mainfrom
adorilson:gh111746_fix_list_attr_datamodel_doc
Open

gh-111746: Doc: Format built-in function's attributes#113574
adorilson wants to merge 14 commits into
python:mainfrom
adorilson:gh111746_fix_list_attr_datamodel_doc

Conversation

@adorilson

@adorilson adorilson commented Dec 29, 2023

Copy link
Copy Markdown
Contributor

adorilson and others added 5 commits December 27, 2023 18:20
The check about the f argument type was removed in this commit:
python@2c94aa5

Thanks for Pedro Arthur Duarte (pedroarthur.jedi at gmail.com) by the help with
this bug.
…#106335)

Remove private _PyThreadState and _PyInterpreterState C API
functions: move them to the internal C API (pycore_pystate.h and
pycore_interp.h). Don't export most of these functions anymore, but
still export functions used by tests.

Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C
API, but keep it in the stable API.

@hugovk hugovk 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.

Hide comment

Looks good, one comment.

@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Dec 30, 2023
@bedevere-app

bedevere-app Bot commented Dec 31, 2023

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@adorilson

Copy link
Copy Markdown
Contributor Author

I have made the requested changes; please review again

@adorilson

Copy link
Copy Markdown
Contributor Author

@AlexWaygood

I've committed the __self__ change. However, look at #58211.

11 hidden items Load more…
@AlexWaygood AlexWaygood removed their request for review December 31, 2023 17:39
@AlexWaygood

Copy link
Copy Markdown
Member

I've committed the __self__ change. However, look at #58211.

Oh, interesting. Hmm, not sure what we should do here. It seems like a misfeature, at best, that __self__ is set to module objects for builtin functions -- so maybe we shouldn't document that. Maybe the best course of action would be to say something a bit more vague like "While this may exist as an attribute on builtin function objects, its value is never meaningful (but see [section on builtin methods])". @hugovk any thoughts?

@adorilson

Copy link
Copy Markdown
Contributor Author

. Maybe the best course of action would be to say something a bit more vague like "While this may exist as an attribute on builtin function objects, its value is never meaningful (but see [section on builtin methods])"

In this PR, I'm unsure because the module object (the currently __self__ value) is significant.

This discussion must be on the issue that I cited. I proposed PR #113575 with the test to the __self__, and I'm waiting for this PR to be merged to include the doc in that PR. In the worst scenario, the discussion about that will be reopened.

So, two ideas:

  1. Keeping the text with the suggestion in this PR
  2. Adding a (foot)note highlighting the bug. Avoid some confusion and make it clear and transparent.

@hugovk hugovk removed the needs backport to 3.11 only security fixes label Apr 11, 2024
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.13 bugs and security fixes label May 9, 2024
@adorilson

Copy link
Copy Markdown
Contributor Author

@hugovk, do you have any direction here?

I'd like to make a decision at this point and then apply it to the next document sections.

@AlexWaygood AlexWaygood requested a review from willingc as a code owner January 3, 2025 14:12
@AlexWaygood

AlexWaygood commented Jan 3, 2025

Copy link
Copy Markdown
Member

The update on the conversation regarding __self__ is that it looks like #113575 might be accepted, but it's still awaiting changes that Serhiy asked for (and which I agree with)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
@adorilson adorilson requested a review from AA-Turner as a code owner December 1, 2025 14:12
@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 15, 2026
@serhiy-storchaka serhiy-storchaka added the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label May 30, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes docs Documentation in the Doc dir needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

6 participants