> On Aug 16, 2016, at 12:46 PM, Daniel Holth <dho...@gmail.com> wrote: > > On Tue, Aug 16, 2016 at 12:15 PM Donald Stufft <don...@stufft.io > <mailto:don...@stufft.io>> wrote: >> On Aug 16, 2016, at 11:51 AM, Brett Cannon <br...@python.org >> <mailto:br...@python.org>> wrote: >> >> One thing to remember is that Windows can't read tar files natively while it >> can for zip files. Now you can easily download tools on Windows to read tar >> files and thanks to Bash on Windows you even have it included once you turn >> that feature on. > > This is true, but I think that using .tar.gz by default still makes sense > because it’s still the vast bulk of what people actually release to PyPI. So > it represents the status quo and switching to zip as the default would break > a lot of things. > >> >> The other point is we have a zip importer in Python but not a .tar.gz one. I >> don't know how often anyone actually downloads a zip file directly from PyPI >> and then tack it on to their sys.path for importing, but that is currently >> possible. > > A sdist is not an acceptable format for adding to sys.path. While in many, > simple cases, it will “just work”, that’s more of an implementation detail > than anything else. There are many projects which simply do not run or error > out if you do this. I don’t think worrying about something that sort of > works, sometimes, is a big deal. > >> >> I doubt either of these points are important enough to continue to support >> zip files for sdists, but I just wanted to point it out. At worst this is >> something to think about if we ever do formalize the sdist format and come >> up with a custom file extension. > > If we make a sdist 2.0 with a new format, I do think it makes sense to make > it a zipfile like wheel already is (which reduces the internal formats down > from 2 to 1), not for the reasons above though, just for consistency with > wheel. > > ZIP is a fantastically designed file format. JAR, IPA (iPhone), all are ZIP > files. The only thing I sometimes wonder about for wheel is whether it would > be worth the trouble to support greater compression with something like > .zip.xz (an uncompressed ZIP inside a wrapper, possibly another ZIP) since > ZIP compresses each file individually and does not compress its metadata. But > most packages are quite small.
I don’t think it would be worth it. Right now there’s only 1 optional c library required (zlib) to install from wheels. If we deprecate all of the other things then there’s only 1 optional c library required to install from sdists too (zlib). At best it would make sense to use gzip, but since we’re already use ZIP_DEFLATE I’m not sure the extra complexity is worth it. > > ZIP's greatest weakness is also its greatest strength, as ZIP allows random > access to its members and very fast access to its metadata. This is why it > makes sense to have a ZIP importer but not a .tar.gz importer. — Donald Stufft
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig