-
Notifications
You must be signed in to change notification settings - Fork 4
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
Handle unicode in transformIterable better #88
Conversation
A small explanation. Our I cannot reproduce an exception or error on my laptop.
So in the first case I get too many spaces, and in the second I get unknown characters. On Plone 4.3 Python 2.7 with the same versions (plone.app.blocks 4.3.2 and repoze.xmliter 0.6) the first one gives the same problem, and the second one is slightly better but still off:
For each item in the iterable,
So it seemed best to me to make sure in Reminder:
For clarity I only use |
One more thing: I saw the traceback with Fred today. The exception that is raised there is Both exist. From the help:
So we could try/except both, or maybe use |
Looking at this issue to me it looks like we should start dropping Python 2 support. |
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.
Thanks a lot for your effort, @mauritsvanrees . It's for sure best to use safe_bytes from Products.CMFPlone.utils, as you do here. And adding tests is great.
But, without diving into mosaic (what I do not want, as my focus is on Plone 6) I cannot asses what plone.app.blocks duty is and why here is the need to deal with bytes on this abstraction layer.
3fa043c
to
338391d
Compare
And prepared this file for having another TestCase class.
Especially we pass both bytes and unicode to the transformIterable method.
Especially fix parsing combinations of bytes and unicode. I think this improves the fix from #85 which fixed plone/plone.app.mosaic#480
338391d
to
b6d432b
Compare
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.
LGTM
I have released 5.0.0 with this and the other recent fixes. |
I think this improves the fix from #85