-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IOtopic-importlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
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 in write() 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
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-IOtopic-importlibtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error