-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
bpo-44655: Don't include suggestions for attributes that are the same as the missing one #27197
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
Conversation
… as the missing one
Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
GH-27198 is a backport of this pull request to the 3.10 branch. |
… as the missing one (pythonGH-27197) (cherry picked from commit 6714dec) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
@@ -151,6 +151,9 @@ calculate_suggestions(PyObject *dir, | |||
if (item_str == NULL) { | |||
return NULL; | |||
} | |||
if (PyUnicode_CompareWithASCIIString(name, item_str) == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can only be used if the second argument is ASCII string. item_str
is UTF-8 string. The behavior in such case is not defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #106025
https://bugs.python.org/issue44655