[Distutils] Distutil BUG in RC1 !!
Pete Shinners
pete@visionart.com
Fri Apr 13 21:12:00 2001
i'm guessing this is kind of urgent, i just found a bug in
the distutils that came with my recently downloaded Python2.1C1
i installed on windows, using the win-installer for 2.1c1
here's the quick and dirty details...
in the file "lib/distutils/archive-util.py" line 103, it creates
a ZIP archive with the following command...
ZipFile(zip_filename, "wb", compression=zipfile.ZIP_DEFLATED)
the problem here is the file mode, "wb". the zipfile.py that comes
with 2.1c1 only allows the following file modes; "r", "w", or "a".
this can be seen at line 166 in "lib/zipfile.py"
modeDict = {'r' : 'rb', 'w': 'wb', 'a' : 'r+b'}
self.fp = open(file, modeDict[mode])
personally, i would think it better to make the zipfile smart enough
to handle "wb" as a mode, but it certainly does not. anyways, the
"sdist" command fails when building a zipfile because of this.
please, someone tell me this won't be found when the final Python-2.1
is released in a few days. i'll mail out a full scale assault-style
warning if there's still no news by the 16th. but i figure it can be
handled most quickly and cleanly right here and now in disutils-sig