Skip to content

pathlib.Path objects can be used as context managers #83863

Description

@barneygale
BPO 39682
Nosy @brettcannon, @pitrou, @barneygale
PRs
  • bpo-39682: make pathlib.Path immutable by removing (undocumented) support for "closing" a path by using it as a context manager #18846
  • bpo-46556: emit DeprecationWarning from pathlib.Path.__enter__() #30971
  • 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 = <Date 2020-04-01.14:11:09.381>
    created_at = <Date 2020-02-19.02:10:35.842>
    labels = ['type-bug', 'library', '3.9']
    title = 'pathlib.Path objects can be used as context managers'
    updated_at = <Date 2022-01-27.23:22:28.820>
    user = 'https://github.com/barneygale'

    bugs.python.org fields:

    activity = <Date 2022-01-27.23:22:28.820>
    actor = 'barneygale'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-04-01.14:11:09.381>
    closer = 'pitrou'
    components = ['Library (Lib)']
    creation = <Date 2020-02-19.02:10:35.842>
    creator = 'barneygale'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 39682
    keywords = ['patch']
    message_count = 14.0
    messages = ['362244', '362840', '362934', '363206', '363209', '363218', '363260', '363261', '363285', '363298', '363383', '363468', '363469', '365473']
    nosy_count = 4.0
    nosy_names = ['brett.cannon', 'pitrou', 'Isaac Muse', 'barneygale']
    pr_nums = ['18846', '30971']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue39682'
    versions = ['Python 3.9']

    Linked PRs

    Activity

    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

      3.9 (EOL)end of lifestdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions