Title: Deprecate readinto() fallback path in _pickle.c
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.9
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, ogrisel, pierreglaser, pitrou
Priority: low Keywords: patch

Created on 2020-02-23 22:47 by pitrou, last changed 2020-03-30 22:10 by ZackerySpytz.

Pull Requests
URL Status Linked Edit
PR 19237 open ZackerySpytz, 2020-03-30 22:10
Messages (1)
msg362547 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2020-02-23 22:47
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.
Date User Action Args
2020-03-30 22:10:26ZackerySpytzsetkeywords: + patch
nosy: + ZackerySpytz

pull_requests: + pull_request18594
stage: patch review
2020-02-23 22:47:08pitroucreate