-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Unpacking PY2 msgpack in PY3 #12142
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
Comments
ok, I don't see a versioning schema in the actual packed file? Is it possible to add one? so we can then conditionally do things. |
I think the cleanest solution would be to sprinkle
The other option would be to test for bytes vs strings in
|
What do people think? Would like to fix in 0.18.0. |
closed by #12129 |
In #10686, I should have made all the strings in
encode
Unicode strings. Now'abc'
packed in P2 becomes (or rather remains as)b'abc'
when unpacked in P3. This I think is the desired behavior (bytes remain as bytes and text remains as text), but it causes errors indecode
, because, for example,'typ'
(==u'type'
in P2) is expected whileb'typ'
(=='typ'
in P2) is the key.Reading in the other direction is fine because P2 is more tolerant of these things.
To reproduce this,
The text was updated successfully, but these errors were encountered: