8000 Add 'The Python 2.3 Method Resolution Order' by hugovk · Pull Request #116435 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

Add 'The Python 2.3 Method Resolution Order' #116435

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 7 commits into from
Apr 15, 2024
Merged

Conversation

hugovk
Copy link
Member
@hugovk hugovk commented Mar 6, 2024

Follow on from python/pythondotorg#2392.

Add "The Python 2.3 Method Resolution Order" document from https://www.python.org/download/releases/2.3/mro/ to the docs as an explanation.

Source reST taken from https://github.com/mdipierro/demo.python.org/blob/master/private/data/127.0.0.1/en/2.3/mro/mro.txt with minor formatting and link updates.


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

@hugovk
8000 Copy link
Member Author
hugovk commented Mar 7, 2024

Doctest is failing for this file, but we don't want to run it all here.

Rather than adding # doctest: +SKIP to each block, can we skip the whole file?

@encukou
Copy link
Member
encukou commented Mar 11, 2024

3 failing doctests are for the old behaviour (Python 2.2/old-style classes), SKIP would make sense to me there.
For the A.mro() one, IMO it would make sense to remove __main__. from the expected output (and add # doctest: +NORMALIZE_WHITESPACE).

I'm not sure we can use Joan G. Stark's ASCII art snakes, unfortunately. It seems the terms of use are here: https://web.archive.org/web/20091028023223/http://www.geocities.com/SoHo/7373/please.htm
I guess they're fine on python.org directly, but for the docs we do allow redistribution for commercial/non-personal use.

@hugovk
Copy link
Member Author
hugovk commented Mar 11, 2024

3 failing doctests are for the old behaviour (Python 2.2/old-style classes), SKIP would make sense to me there. For the A.mro() one, IMO it would make sense to remove __main__. from the expected output (and add # doctest: +NORMALIZE_WHITESPACE).

Updated!

I'm not sure we can use Joan G. Stark's ASCII art snakes, unfortunately. It seems the terms of use are here: web.archive.org/web/20091028023223/http://www.geocities.com/SoHo/7373/please.htm I guess they're fine on python.org directly, but for the docs we do allow redistribution for commercial/non-personal use.

That's too bad, but thanks for checking. Removed!

@hugovk hugovk removed the needs backport to 3.11 only security fixes label Apr 2, 2024
@hugovk
Copy link
Member Author
hugovk commented Apr 14, 2024

@encukou Okay to merge now?

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.

Yes, looks good. Thank you!

@hugovk hugovk merged commit 7d0be7a into python:main Apr 15, 2024
@hugovk hugovk deleted the docs-add-mro branch April 15, 2024 10:01
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

Sorry, @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 7d0be7aea569b3bc9a3936501d7d32af87c70e73 3.12

@bedevere-app
Copy link
bedevere-app bot commented Apr 15, 2024

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

hugovk added a commit to hugovk/cpython that referenced this pull request Apr 15, 2024
(cherry picked from commit 7d0be7a)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Apr 15, 2024
hugovk added a commit that referenced this pull request Apr 15, 2024
)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Assignees

@hugovk hugovk

Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0