You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reject main when copying an existing zipapp archive #159354
zipapp.create_archive() documents that main can only be specified for a directory source without __main__.py. Existing archive sources enter the copy path before this argument is checked, silently ignoring it and modifying the target. The same problem occurs when main is explicitly set to an empty string.
Reproducer, run with the interpreter built from the CPython checkout:
Expected: Raise ZipAppError for either explicitly supplied value before reading/copying the archive or changing the target. Omitting main or passing None should continue to allow copying.
Observed: Both calls succeed and copy the existing archive, ignoring main.
Activity
pythongh-159354: Validate empty main arguments consistently