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
bpo-26707: enable plistlib to read UID keys #12153
Conversation
Add tests for the following UIDs (this will expose a bug in your code):
- from
2**8
to2**16-1
- from
2**16
to2**32-1
- from
2**32
to2**63-1
- from
2**63
to2**64-1
- larger than
2**64-1
0
- negative
Add tests for the data attribute of UID, for equality/inequality tests and hashing, for repr(uid)
, for operator.index(uid)
, and for pickling/unpickling and copying of UIDs.
Document the UID class. Add the versionchanged
directives in the module documentation and a What's New entry.
Add your name into Misc/ACKS.
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 |
I have made the requested changes; please review again |
Thanks for making the requested changes! @serhiy-storchaka: please review the changes made to this pull request. |
Bump |
1 similar comment
Bump |
Plistlib currently throws an exception when asked to decode a valid .plist file that was generated by Apple's NSKeyedArchiver. Specifically, this is caused by a byte 0x80 (signifying a UID) not being understood. This fixes the problem by enabling the binary plist reader and writer to read and write plistlib.UID objects.
Also, update the documentation to reflect the new UID class
@ronaldoussoren @ned-deily either of you want to take a look, or should @serhiy-storchaka go ahead and merge? |
@ronaldoussoren and @serhiy-storchaka are the current plistlib experts. In the bpo issue, @ronaldoussoren expressed doubts about adding this support. @ronaldoussoren ? |
The PR LGTM, and I understand why this feature is needed. But I am not even a macOS user. |
I think if @ronaldoussoren doesn't respond in some capacity in the next week then we should merge based on the review from @serhiy-storchaka . |
Thank you for your contribution @bigfootjon! |
Plistlib currently throws an exception when asked to decode a valid
.plist file that was generated by Apple's NSKeyedArchiver. Specifically,
this is caused by a byte 0x80 (signifying a UID) not being understood.
This fixes the problem by enabling the binary plist reader and writer
to read and write plistlib.UID objects.
https://bugs.python.org/issue26707