X Tutup
The Wayback Machine - https://web.archive.org/web/20240111222518/https://github.com/python/cpython/issues/83915
Skip to content
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

Deprecate readinto() fallback path in _pickle.c #83915

Open
pitrou opened this issue Feb 23, 2020 · 1 comment
Open

Deprecate readinto() fallback path in _pickle.c #83915

pitrou opened this issue Feb 23, 2020 · 1 comment
Labels
3.13 new features, bugs and security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@pitrou
Copy link
Member

pitrou commented Feb 23, 2020

BPO 39734
Nosy @pitrou, @ZackerySpytz, @pierreglaser
PRs
  • gh-83915: Deprecate the readinto() fallback path in _pickle.c #19237
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2020-02-23.22:47:08.376>
    labels = ['type-feature', 'library', '3.9']
    title = 'Deprecate readinto() fallback path in _pickle.c'
    updated_at = <Date 2020-03-30.22:10:26.404>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2020-03-30.22:10:26.404>
    actor = 'ZackerySpytz'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2020-02-23.22:47:08.376>
    creator = 'pitrou'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39734
    keywords = ['patch']
    message_count = 1.0
    messages = ['362547']
    nosy_count = 4.0
    nosy_names = ['pitrou', 'ogrisel', 'ZackerySpytz', 'pierreglaser']
    pr_nums = ['19237']
    priority = 'low'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue39734'
    versions = ['Python 3.9']

    @pitrou
    Copy link
    Member Author

    pitrou commented Feb 23, 2020

    In bpo-39681 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.

    @pitrou pitrou added 3.9 only security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement labels Feb 23, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @iritkatriel iritkatriel added 3.12 bugs and security fixes and removed 3.9 only security fixes labels Nov 9, 2022
    @erlend-aasland erlend-aasland added 3.13 new features, bugs and security fixes and removed 3.12 bugs and security fixes labels Jan 5, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.13 new features, bugs and security fixes stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    Status: No status
    Development

    No branches or pull requests

    3 participants
    X Tutup