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-122888: Fix crash on certain calls to str() #122889

Merged
merged 4 commits into from
Aug 12, 2024

Conversation

JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Aug 10, 2024

Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

Confimed to fix #122888 :)
Does this need to be backported to 3.13?

@JelleZijlstra JelleZijlstra added the needs backport to 3.13 bugs and security fixes label Aug 10, 2024
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM, but I think that the tests could be unified with the existing tests.

Lib/test/test_str.py Outdated Show resolved Hide resolved
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Thank you for unifying the tests @JelleZijlstra.

You can also remove the self.assertRaises(TypeError, str, 42, 42, 42) line from test_constructor.

Lib/test/test_str.py Outdated Show resolved Hide resolved
@JelleZijlstra JelleZijlstra merged commit 53ebb62 into python:main Aug 12, 2024
37 checks passed
@miss-islington-app
Copy link

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

@JelleZijlstra JelleZijlstra deleted the unicodenew branch August 12, 2024 16:20
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 12, 2024
@bedevere-app
Copy link

bedevere-app bot commented Aug 12, 2024

GH-122947 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 12, 2024
JelleZijlstra added a commit that referenced this pull request Aug 12, 2024
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect argument type for str() crashes the interpreter
4 participants