[New-bugs-announce] [issue39734] Deprecate readinto() fallback path in _pickle.c

Antoine Pitrou report at bugs.python.org
Sun Feb 23 17:47:08 EST 2020

New submission from Antoine Pitrou <pitrou at free.fr>:

In issue39681 we reestablished the fallback to read() when a file-like object doesn't provide readinto() in _pickle.c.  However, doing so leads to lower performance and all file-like object should nowadays provide readinto() (simply by deriving from the right base class - e.g. io.BufferedIOBase).

I propose to issue a DeprecationWarning when the fallback behaviour is selected, so that one day we can finally remove it.

components: Library (Lib)
messages: 362547
nosy: ogrisel, pierreglaser, pitrou
priority: low
severity: normal
status: open
title: Deprecate readinto() fallback path in _pickle.c
type: enhancement
versions: Python 3.9

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list