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

unexpected behavior of tempfile.TemporaryFile() for O_TMPFILE #96531

Open
Labels
stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error
@zhangyoufu

Description

@zhangyoufu

Bug report

WhenO_TMPFILE is available:

  1. tempfile.TemporaryFile(mode='wb') opens withO_RDWR instead ofO_WRONLY, theopener callback ignoresmode argument and always use_bin_openflags
  2. _bin_openflags has bothO_CREAT andO_EXCL set, theopener callback removesO_CREAT from flags but leaveO_EXCL, this is an undefined behavior according to Linuxopen(2) manpage

Your environment

  • CPython versions tested on: 3.10
  • Operating system and architecture: Linux x86_64

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp