Skip to content

Conversation

@Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Aug 15, 2024

@Eclips4 Eclips4 requested a review from vstinner August 15, 2024 18:51
@bedevere-app bedevere-app bot added tests Tests in the Lib/test dir awaiting review labels Aug 15, 2024
@Eclips4 Eclips4 changed the title gh123046: Fix regexp to catch cases where the module name is omitted from the weakref repr gh-123046: Fix regexp to catch cases where the module name is omitted from the weakref repr Aug 15, 2024
@Eclips4
Copy link
Member Author

Eclips4 commented Aug 15, 2024

FYI, this behavior (when __module__ is equal to __main__ or builtins or it's a non-string) has already been tested in test_capi.test_misc.CAPITest.test_get_type_name.
But if you would like to have a couple of test cases that covers this situation - I would be happy to add them :)

@Eclips4 Eclips4 added the needs backport to 3.13 bugs and security fixes label Aug 15, 2024
@Eclips4 Eclips4 requested a review from sobolevn August 16, 2024 06:21
Eclips4 and others added 2 commits August 16, 2024 09:39
@Eclips4 Eclips4 requested a review from sobolevn August 16, 2024 06:50
@sobolevn sobolevn enabled auto-merge (squash) August 16, 2024 07:00
@sobolevn sobolevn merged commit 786cac0 into python:main Aug 16, 2024
@miss-islington-app
Copy link

Thanks @Eclips4 for the PR, and @sobolevn for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 16, 2024
…mitted from the weakref repr (pythonGH-123047)

(cherry picked from commit 786cac0)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: sobolevn <mail@sobolevn.me>
@bedevere-app
Copy link

bedevere-app bot commented Aug 16, 2024

GH-123058 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 Aug 16, 2024
@Eclips4 Eclips4 deleted the tests_weakref branch August 16, 2024 07:16
sobolevn added a commit that referenced this pull request Aug 16, 2024
…omitted from the weakref repr (GH-123047) (#123058)

gh-123046: Fix regexp to catch cases where the module name is omitted from the weakref repr (GH-123047)
(cherry picked from commit 786cac0)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: sobolevn <mail@sobolevn.me>
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
…mitted from the weakref repr (python#123047)

Co-authored-by: sobolevn <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants