[Checkins] [zopefoundation/zope.schema] 48c708: Handle Unicode token values with non-ascii chars.
GitHub
noreply at github.com
Mon Aug 13 19:10:15 CEST 2018
Branch: refs/heads/issue15
Home: https://github.com/zopefoundation/zope.schema
Commit: 48c708a7ecff967606ff9c53c6f4cc7830627c96
https://github.com/zopefoundation/zope.schema/commit/48c708a7ecff967606ff9c53c6f4cc7830627c96
Author: Jason Madden <jamadden at gmail.com>
Date: 2018-08-13 (Mon, 13 Aug 2018)
Changed paths:
M CHANGES.rst
M src/zope/schema/interfaces.py
M src/zope/schema/tests/test__field.py
M src/zope/schema/tests/test_vocabulary.py
M src/zope/schema/vocabulary.py
Log Message:
-----------
Handle Unicode token values with non-ascii chars.
Fixes #15 and fixes #6
I went with backslashreplace because I couldn't find anything that was portable and operated on textual data (binascii and quopri need binary data; namereplace needs Python 3.5+).
The ITerm comment claims that token should be an IASCIILine, which is a native string, not necessarily text, so that's what I kept it here.
Note that we're not actually enforcing that the value is an IASCIILine. Passing in control characters would still be allowed as before.
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
More information about the checkins
mailing list