Skip to content

Make tempfile._TemporaryFileWrapper public #152586

Closed

Description

@srittau

Feature or enhancement

Proposal:

_TemporaryFileWrapper is the return type of (the confusingly named function) NamedTemporaryFile. As such it is commonly useful for type annotations, but also in some other circumstances, see for example graphql-python/gql#596.

_TemporaryFileWrapper should be kept for backwards compatibility.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Jun 29, 2026
  2. added a commit that references this issue on Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions