Changes by RonnyPfannschmidt :
Added file: http://bugs.python.org/file21344/hgdistver.py
___
Python tracker
<http://bugs.python.org/issue11638>
___
___
Python-bugs-list m
RonnyPfannschmidt added the comment:
actually its enough to have the version_hook set the version to u'0.0'
--
___
Python tracker
<http://bugs.python.o
Changes by RonnyPfannschmidt :
Added file: http://bugs.python.org/file21343/setup.cfg
___
Python tracker
<http://bugs.python.org/issue11638>
___
___
Python-bugs-list m
RonnyPfannschmidt added the comment:
here the file that passed in the unicode string via hook
note that all of the passed characters are actually ascii
--
Added file: http://bugs.python.org/file21342/hgdistver.py
___
Python tracker
<h
New submission from RonnyPfannschmidt :
i passed in a unicode value as version by accident,
resulted in:
Traceback (most recent call last):
File "/home/ronny/.local/venvs/clean/bin/pysetup", line 7, in
execfile(__file__)
File "/home/ronny/Projects/distutils2/distutils2/p
RonnyPfannschmidt added the comment:
i'll try to add some tests now
hopefully i can get rid of the implicit badness like trying to coerce
bytes to unicode in unpickle and storing bytes as list in pickle for
protocol < 3
--
___
Python tracke
Changes by RonnyPfannschmidt :
--
title: byte/unicode pickle incompatibilities between python2 andand
python3 -> byte/unicode pickle incompatibilities between python2 and python3
___
Python tracker
<http://bugs.python.org/iss
RonnyPfannschmidt added the comment:
in case the actual behavior is not supposed to change
how about a way to declare one wants exact 1:1 mapping between py2<>py3,
so str<>bytes and unicode<>str will work for sure
something like load/dump(..., encoding=bytes) ju
RonnyPfannschmidt added the comment:
unpickle of any non-ascii string from python2 will break
the only way out would be to ensure text strings and a single defined
encoding (at that point storing unicode strings in any case seems more
practical)
also byte-strings stored as python2 str would
RonnyPfannschmidt added the comment:
its even worse
python3:
>>> import pickle
>>> pickle.dumps(b'', protocol=2)
b'\x80\x02c__builtin__\nbytes\nq\x00]q\x01\x85q\x02Rq\x03.'
python2.6:
>>> import pickle
>>> pickle.loads(
RonnyPfannschmidt added the comment:
Since it breaks for anything non-ascii, its not that helpfull after all
and since python2 strings are encoding-unaware there is no way to fix
it.
It might be preferable to supply unpicklers that are cappable of
coercing if the user really wants wants
RonnyPfannschmidt added the comment:
the basic behavior i want to see for all protocols <= 2
1. python 2 string maps to python3 byte-string
2. python 2 unicode maps to python3 string
3. python 3 string map to python 2 unicode
4. python 3 bytestring maps to python 2 string
anything else is
Changes by RonnyPfannschmidt :
--
title: bytw/unicode string incompatibilities between python2 and and python3 ->
byte/unicode pickle incompatibilities between python2 and and python3
___
Python tracker
<http://bugs.python.org/iss
New submission from RonnyPfannschmidt :
i just noticed that there are some slight differences of the
bytestring/unicodestring pickles between python2/3 using the protocols
0, 1 and 2
the first things i noticed are:
a str from python2 is unpickled as unicode in python3
(fails for byte strings
14 matches
Mail list logo