bpo-33881: Use NFKC to find duplicate members in make_dataclass#7916
bpo-33881: Use NFKC to find duplicate members in make_dataclass#7916ValeriyaSinevich wants to merge 4 commits into
Conversation
ericvsmith
left a comment
There was a problem hiding this comment.
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