Skip to content
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

Fix crash in normalization of data in lib #47

Merged

Conversation

belluzj
Copy link
Contributor

@belluzj belluzj commented Apr 30, 2018

First I'm pushing a test to check that it's not my machine that behaves strangely

There was indeed a problem: https://travis-ci.org/unified-font-object/ufoNormalizer/builds/372927710

@anthrotype
Copy link
Member

have you tried passing use_builtin_types=False to plistlib.loads in python3?

If use_builtin_types is true (the default) binary data will be returned as instances of bytes, otherwise it is returned as instances of Data.

https://docs.python.org/3/library/plistlib.html#plistlib.load

@belluzj
Copy link
Contributor Author

belluzj commented May 2, 2018

No I didn't, should I change my PR to use that instead?

@anthrotype
Copy link
Member

if that works too, maybe yes, as that's supposed to make python3's plistlib work the same as python2.7. I don't like too much that isinstance(..., bytes) branch is only run under python3, as the isinstance(..., basestring) branch above that runs for both unicode and bytes on python2.

@belluzj
Copy link
Contributor Author

belluzj commented May 2, 2018

Done :)

Copy link
Member

@anthrotype anthrotype left a comment

Choose a reason for hiding this comment

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

thanks

@anthrotype anthrotype merged commit a651acd into unified-font-object:master May 2, 2018
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.

None yet

2 participants