When ZipFile.debug is not zero, some debugging messages are printed to stdout. Some of them are for debugging the zipfile module itself. But some are warnings about user's operation which perhaps make not what the user is expected -- truncating long archive comment or adding a file with duplicated name. These cases cases can be considered as logic error, they can be prevented by external checks (check that comment's length does not excite the limit and that specified name is not in the ZIP file). So it will be sane and helpful to convert these prints to regular warnings, which are controlled in same way as all other warnings. See also . It have a patch which looks too excessive to me. Here is a patch. I don't sure to which version it should be targeted.
LGTM. I audited the other 'ZipFile.debug' uses and agree that the others are mainly useful in debugging the zipfile implementation itself. Since it isn't that critical of a change, the default branch should be sufficient.