-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-33881: Use NFKC to find duplicate members in make_dataclass #7916
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
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.
This will require some tests. Can you add them?
I haven't had time to give a thorough review, but I will once there are some basic tests.
Thanks!
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Hi @ericvsmith, I wrote some tests for the PR and made a small change: normalize before checking for keywords has there was a bug there too.
|
@ValeriyaSinevich, please make the changes requested in the code review and please fix the merge conflict. Thanks! |
@ValeriyaSinevich : Any chance you can add the tests to the PR? |
I'm going to close this pull request as inactive. It can be reopened if the original author comes back to working on it or someone else can create a new PR. If a new PR is created and the original change is used, please credit the original author as co-author. |
I measured how it affected the performance by creating a dataclass with 10000 members.
python.bat -m timeit -s "from dataclasses import make_dataclass" -s "arg_list = [chr(k) * i for k in range(97, 123) for i in range(1, 500)]" "make_dataclass('a', arg_list)"
The performance didn't change, both before and after the changes it takes around 14.5s.
https://bugs.python.org/issue33881