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

Python stops trying to create a.pyc if unable to completely write a.pyc file in one go #141930

Open
Labels
stdlibStandard Library Python modules in the Lib/ directorytopic-IOtopic-importlibtype-bugAn unexpected behavior, bug, or error
@stefanor

Description

@stefanor

Bug report

Bug description:

#126606 fixed a bug, in that writing incomplete.pyc files is not going to end well for the system.
But the solution was just to crash the file write, not attempt any retries.

It's not completely unexpected to receive a signal or some other interrupt that results inwrite() not writing all the provided data. This can be handled.

We've observed incomplete.pyc files in the past in Debian systems, and I just ran into this in a CI job:

https://people.debian.org/~stefanor/upstream/debusine-server_0.13.1.log

  Setting up python3-debusine-server (0.13.1) ...  os.write() didn't write the full pyc filedpkg: error processing package python3-debusine-server (--configure):   installed python3-debusine-server package post-installation script subprocess returned error exit status 1

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-IOtopic-importlibtype-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