Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Oct 21, 2017

  • Document that files should be open in binary mode even for protocol 0 for
    portability.
  • Raise a ValueError when pickle with binary protocol to a file opened in
    text mode on Windows.
  • Emit a deprecation warning when pickle with binary protocol to a file
    opened in text mode on Unix.
  • Emit a deprecation warning in Py3k mode when pickle with protocol 0 to
    a file opened in text mode.
  • Fixed unpickling on Unix or in binary mode files writen in text mode on
    Windows. RuntimeWarning now is emitted in cases that was not unpickleable
    before.
    Files containing Unicode strings will be unpickled incorrectly.
  • \r, \0 and \x1a (end-of-file on Windows) now are escaped in
    Unicode strings in protocol 0.

https://bugs.python.org/issue31829

@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Oct 21, 2017
@serhiy-storchaka serhiy-storchaka changed the title bpo-31314: Resolve some portability issues with pickle. bpo-31829: Resolve some portability issues with pickle. Oct 21, 2017
@serhiy-storchaka serhiy-storchaka changed the title bpo-31829: Resolve some portability issues with pickle. [2.7] bpo-31829: Resolve some portability issues with pickle. Oct 23, 2017
* Document that files should be open in binary mode even for protocol 0 for
  portability.
* Raise a ValueError when pickle with binary protocol to a file opened in
  text mode on Windows.
* Emit a deprecation warning when pickle with binary protocol to a file
  opened in text mode on Unix.
* Emit a deprecation warning in Py3k mode when pickle with protocol 0 to
  a file opened in text mode.
* Fixed unpickling on Unix or in binary mode files writen in text mode on
  Windows. RuntimeWarning now is emitted in cases that was not unpickleable
  before.  Files containing Unicode strings will be unpickled incorrectly.
* `\r`, `\0` and `\x1a` (end-of-file on Windows) now are escaped in
  Unicode strings in protocol 0.
@taleinat
Copy link
Contributor

taleinat commented Jun 7, 2019

Ping, @serhiy-storchaka?

@csabella csabella closed this Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants