Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

importlib.resources.as_file is leaving temporary file pointers open #100585

Closed
Labels
@samety

Description

@samety

Bug report

importlib.resources.as_file is leaving temporary file pointers open after writing their contents
see_write_contents function in importlib/resources/_common.py

Easy to repeat, just run the test case below with-We
Lib.test.test_importlib.resources.test_resource.ResourceFromZipsTest01.test_as_file_directory

Your environment

  • CPython versions tested on: Python 3.12.0a3+
  • Operating system and architecture: Ubuntu 22.04.1 LTS

I think it just needs to usePath.write_bytes and keep the file pointer closed.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp