[issue31829] Portability issues with pickle

2020-01-10 Thread Cheryl Sabella
Change by Cheryl Sabella : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue31829] Portability issues with pickle

2019-06-12 Thread miss-islington
miss-islington added the comment: New changeset d561f848b235f2011a43b705d112055b92fa2366 by Miss Islington (bot) in branch '3.7': bpo-31829: Make protocol 0 pickles be loadable in text mode in Python 2. (GH-11859) https://github.com/python/cpython/commit/d561f848b235f2011a43b705d112055b92fa2

[issue31829] Portability issues with pickle

2019-05-31 Thread miss-islington
Change by miss-islington : -- pull_requests: +13579 pull_request: https://github.com/python/cpython/pull/13693 ___ Python tracker ___ __

[issue31829] Portability issues with pickle

2019-05-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 38ab7d4721b422547f7b46b9d68968863fa70573 by Serhiy Storchaka in branch 'master': bpo-31829: Make protocol 0 pickles be loadable in text mode in Python 2. (GH-11859) https://github.com/python/cpython/commit/38ab7d4721b422547f7b46b9d68968863fa7

[issue31829] Portability issues with pickle

2019-05-29 Thread Cheryl Sabella
Cheryl Sabella added the comment: Bumping this discussion in case the should be merged for 3.8b1. Thanks! -- nosy: +cheryl.sabella ___ Python tracker ___

[issue31829] Portability issues with pickle

2019-02-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This can help with migrating to Python 3. Python 2 programs often open files in text (default) mode for pickling and unpickling. With these changes you will get a warning when run the interpreter with the -3 option. You can also make the producer opening a

[issue31829] Portability issues with pickle

2019-02-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I am not particularly interested in making Python 2 or ancient pickle protocols easier to use, sorry ;-) -- ___ Python tracker ___ _

[issue31829] Portability issues with pickle

2019-02-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.8 -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue31829] Portability issues with pickle

2019-02-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have simplified the PR. Removed the complex code for detecting pickles written to files in text mode on Windows and for adding optional marks for correct detecting. Currently it does only two things: * Escapes \r, \0 and \x1a (end-of-file on Windows) whe

[issue31829] Portability issues with pickle

2019-02-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: The proposed PR looks big. Are these actual bug fixes or features? "Portability improvements" sounds like a feature. -- ___ Python tracker __

[issue31829] Portability issues with pickle

2019-02-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +11892 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue31829] Portability issues with pickle

2017-11-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated PR correctly loads Unicode strings saved in text mode. As a mark used some corrected opcodes followed by newline. If any of previous newlines is \r\n, thus the file was written in text mode and is read in binary mode. If no opcodes with newlines was

[issue31829] Portability issues with pickle

2017-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is possible to resolve issue with Unicode strings ending with \r. We can add a special mark in the stream (a combination of opcodes which is no-op) before writing the first Unicode strings ending with \r. If this mark is encountered in an input stream, t

[issue31829] Portability issues with pickle

2017-10-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 4067 fixes following issues when unpickle on Unix or in binary mode files written with protocol 0 in text mode on Windows: * ints were unpickled as longs by cPickle. * bools were unpickled as longs by cPickle and as ints by pickle. * floats couldn't be un

[issue31829] Portability issues with pickle

2017-10-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +4038 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue31829] Portability issues with pickle

2017-10-20 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : After reading numerous pickle-related issues on GitHab, I have found that the most common issue with pickle in Python 2 is using it with files opened with text mode. with open(file_name, "w") as f: pickle.dump(data, f) Initially pickle was a