Skip to content
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

GH-92678: Document that you shouldn't be doing your own dictionary offset calculations. #95598

Merged
merged 5 commits into from
Aug 9, 2022

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Aug 3, 2022

It seems like no one was doing their own address calculation anyway, but the docs needed updating.

@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting core review labels Aug 3, 2022
@markshannon markshannon added the needs backport to 3.11 only security fixes label Aug 3, 2022
encukou
encukou previously approved these changes Aug 4, 2022
@encukou encukou dismissed their stale review August 4, 2022 14:17

Actually, one moment...

@encukou
Copy link
Member

encukou commented Aug 4, 2022

Actually, _PyObject_GetDictPtr should also get an entry. Let me add one.

@encukou
Copy link
Member

encukou commented Aug 4, 2022

Added in faster-cpython#13.
This is a weird API to recommend, though. Why should it be preferred over PyObject_GenericGetDict?

@encukou
Copy link
Member

encukou commented Aug 4, 2022

See faster-cpython#14 for that alternative.

@markshannon
Copy link
Member Author

Why should it be preferred over PyObject_GenericGetDict?

It shouldn't. PyObject_GenericGetDict() is better.
Thanks for the PRs.

Copy link
Member

@encukou encukou left a comment

Choose a reason for hiding this comment

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

One more _PyObject_GetDictPtr I forgot, otherwise this looks good. Thank you!

Co-authored-by: Petr Viktorin <[email protected]>
Copy link
Contributor

@slateny slateny left a comment

Choose a reason for hiding this comment

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

Just some small typos

@markshannon markshannon merged commit 8d37c62 into python:main Aug 9, 2022
@miss-islington
Copy link
Contributor

Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-95821 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 9, 2022
…ary offset calculations. (pythonGH-95598)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Stanley <[email protected]>
(cherry picked from commit 8d37c62)

Co-authored-by: Mark Shannon <[email protected]>
markshannon added a commit that referenced this pull request Aug 9, 2022
…fset calculations. (GH-95598) (GH-95821)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Stanley <[email protected]>
Co-authored-by: Mark Shannon <[email protected]>
iritkatriel pushed a commit to iritkatriel/cpython that referenced this pull request Aug 11, 2022
…ary offset calculations. (pythonGH-95598)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Stanley <[email protected]>
@markshannon markshannon deleted the doc-tp-dictoofset branch September 26, 2023 12:55
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
None yet
Development

Successfully merging this pull request may close these issues.

5 participants