Fixes issues with security.create_token() and Unicode problems #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
bytes,str,unicode, andbasestringmean differentthings to Python 2.5, 2.6, and 3.x.
Python 2.5
bytesis not available.stris a byte string.unicodeconverts to unicode string.basestringexists.Python 2.6
bytesis available and maps to strstris a byte string.unicodeconverts to unicode stringbasestringexists.Python 3.x
bytesis available and does not map tostr.strmaps to the earlierunicode, butunicodehas been removed.basestringhas been removed.unicodehas been removedThis patch adds portable support for all three versions
of Python by adding a portable types module.
All Unicode handling has been replaced to use the
functions from this module and tests pass.
It introduces these portable types that you can use
in your code:
byteswhere you need byte strings.unicode_stringwhere you need unicode stringscomplications behind type checking therefore cleaning
up the code base.
hexadecimal string.
bytesis a Python 2.6+ type not availablein Python 2.5. This patch fixes it with a suitable
replacement.
webapp2 is still small, but it doesn't necessarily mean
we can't use packages. All the existing tests pass
without affecting any existing parent projects.
This patch ensures webapp2 can be easily ported
to Python 3.x in the future as and when required.
Signed-off-by: Gora Khargosh gora.khargosh@gmail.com