Skip to content

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

Merged
merged 1 commit into from
Jul 16, 2021

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Jul 16, 2021

@miss-islington
Copy link
Contributor

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

@bedevere-bot
Copy link

GH-27198 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 16, 2021
… as the missing one (pythonGH-27197)

(cherry picked from commit 6714dec)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit that referenced this pull request Jul 16, 2021
… as the missing one (GH-27197) (GH-27198)

(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) {
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

Opened #106025

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.

5 participants