Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'modified': 0.05; 'abstraction': 0.07; 'mess': 0.07; 'migration': 0.07; 'modules.': 0.07; 'terry': 0.07; 'python': 0.08; '21,': 0.09; 'adjusting': 0.09; 'admit': 0.09; 'all?': 0.09; 'block.': 0.09; 'comparisons': 0.09; 'content-type:multipart/signed': 0.09; 'created,': 0.09; 'filename:fname piece:signature': 0.09; 'header:In-reply-to:1': 0.09; 'incompatible': 0.09; 'kinda': 0.09; 'level:': 0.09; 'oh,': 0.09; 'similar?': 0.09; 'since.': 0.09; 'sure)': 0.09; 'files.': 0.10; 'api': 0.11; ';-)': 0.12; 'broken': 0.12; 'am,': 0.13; 'wrote:': 0.15; 'library': 0.15; '(me': 0.16; '(needs': 0.16; 'abraham': 0.16; "api's": 0.16; 'archives.': 0.16; 'content- type:application/pgp-signature': 0.16; 'did.': 0.16; 'different,': 0.16; 'do!': 0.16; 'filename:fname piece:asc': 0.16; 'filename:fname:signature.asc': 0.16; 'filesystem': 0.16; 'from:addr:kb1pkl': 0.16; 'from:name:corey richardson': 0.16; 'goals.': 0.16; 'hmm.': 0.16; "isn't.": 0.16; 'means:': 0.16; 'partly': 0.16; 'quicker': 0.16; 'rantingrick': 0.16; 'reedy': 0.16; 'richardson': 0.16; 'row': 0.16; 'see.': 0.16; 'sequence,': 0.16; 'subject:between': 0.16; 'such.': 0.16; 'zipfile': 0.16; 'folks': 0.16; 'pm,': 0.16; 'exists': 0.19; 'file)': 0.19; 'to:name:python-list': 0.19; '(which': 0.20; 'seems': 0.20; 'language': 0.20; 'archives': 0.22; 'maybe': 0.22; 'so.': 0.22; "doesn't": 0.22; 'trying': 0.23; 'etc,': 0.23; 'fri': 0.23; 'least,': 0.23; 'module,': 0.23; 'archive': 0.23; 'interface': 0.23; "python's": 0.25; 'accepting': 0.25; '(and': 0.27; "i'm": 0.27; 'beyond': 0.28; 'reflect': 0.28; 'objects': 0.28; '3.0': 0.28; 'bugs': 0.28; 'checking': 0.28; 'anyway.': 0.29; 'condition.': 0.29; 'constant': 0.29; 'idle': 0.29; 'object': 0.30; 'fact': 0.30; 'definition': 0.30; 'do.': 0.30; '-0400': 0.30; '22,': 0.30; 'elsewhere': 0.30; 'forward.': 0.30; 'repair': 0.30; 'tar': 0.30; 'yes.': 0.30; 'least': 0.31; 'changes': 0.31; 'developers': 0.32; 'certainly': 0.32; 'change.': 0.32; 'expression': 0.32; 'list': 0.32; "i'll": 0.33; 'done': 0.33; 'to:addr:python-list': 0.34; 'header:User-Agent:1': 0.34; 'there': 0.34; 'however,': 0.34; 'someone': 0.34; 'normally': 0.34; 'realize': 0.34; 'example,': 0.35; 'project': 0.35; 'here': 0.66; 'believe': 0.66; 'making': 0.66; 'from:addr:aim.com': 0.67; 'compressed': 0.68; 'database,': 0.68; 'freedom': 0.68; 'ideas.': 0.73; 'care': 0.73; 'received:205.188.169': 0.74; 'hand,': 0.76; 'blood': 0.77; 'physical': 0.78; 'introduce': 0.79; '*have*': 0.84; '12:48': 0.84; '2011:': 0.84; '4000': 0.84; 'anywhere.': 0.84; 'discourage': 0.84; 'physically': 0.84; 'pristine': 0.84; 'received:172.29.41.6': 0.84; 'received:mtaout- ma06.r1000.mx.aol.com': 0.84; 'resistance': 0.84; 'uniform': 0.84; 'received:172.29.41': 0.91; 'universe': 0.91 Subject: Re: Inconsistencies between zipfile and tarfile APIs From: Corey Richardson To: python-list In-reply-to: References: <5fd8e664-c855-41a2-9d8b-36d4c486f0b9@n35g2000yqf.googlegroups.com> <3241cbe4-9829-438b-ac0e-a0b87aff62d9@q15g2000yqk.googlegroups.com> Date: Fri, 22 Jul 2011 03:19:33 -0400 User-Agent: Sup/0.12.1 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha256"; boundary="=-1311319176-781304-10576-242-3-="; protocol="application/pgp-signature" x-aol-global-disposition: G X-AOL-VSS-INFO: 5400.1158/72621 X-AOL-VSS-CODE: scan_error X-AOL-SCOLL-SCORE: 0:2:483201248:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d29064e2924af4630 X-AOL-IP: 76.119.157.207 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 171 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1311319223 news.xs4all.nl 23959 [2001:888:2000:d::a6]:51103 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:10080 --=-1311319176-781304-10576-242-3-= Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: quoted-printable Excerpts from rantingrick's message of Fri Jul 22 02:40:51 -0400 2011: > On Jul 22, 12:45am, Terry Reedy wrote: > > On 7/22/2011 12:48 AM, rantingrick wrote: > > > On Jul 21, 11:13 pm, Corey Richardson wrote: > = > > Hmm. Archives are more like directories than files. Windows, at least= , > > seems to partly treat zipfiles as more or less as such. > = > Yes but a zipfile is just a file not a directory. This is not the > first time Microsoft has "mislead" people you know. ;-) > = Ehh...yes and no. Physically, it is a file and nothing more. But its actu= al use and contents could reflect that of a directory. Are files and directo= ries that different, after all? I don't believe so. They are both an expressio= n of the same thing. Both contain data, one just contains others of itself.= Of course, treating a zipfile as a directory will certainly have a perfor= mance cost. But here in Linux-land (and elsewhere I'm sure) I can mount, for ex= ample, a disk image to a mountpoint anywhere. It's a useful thing to do! > > Certainly, 7zip > > present a directory interface. So opening a zipfile/tarfile would be > > like opening a directory, which we normally do not do. On the other > > hand, I am not sure I like python's interface to directories that muc= h. > = > I don't think we should make comparisons between applications and > API's. > = Ehh...yes and no again. Maybe the applications are on to something? Wheth= er the filesystem is physically on disk or is just a representation of a filesystem on a file in a filesystem on disk, treating them both as a filesystem is a useful abstraction (NOT the only one available?) > > It would be more sensible to open files within the archives. Certainl= y, > > it would be nice to have the result act like file objects as much as > > possible. > = > Well you still need to start at the treetop (which is the zip/tar > file) because lots of important information is exposed at that level: > = > * compressed file listing > * created, modified times > * adding / deleting > * etc. > = > I'll admit you could think of it as a directory but i would not want > to do that. People need to realize that tar and zip files are FILES > and NOT folders. > = I think it's a useful abstraction to think if an archive as a directory. They ARE files, yes. But must their physical representation impact their semantics? I think not! It doesn't matter if Python's list object is a linked-list down under or if it isn't. Or any sequence, for that matter! It's a useful abstraction to treat them all as sequences, uniform interfa= ce etc, even though one sequence might be a linked list in a C module, or a row from a database, or whatever! > > Seaching open issues for 'tarfile' or 'zipfile' returns about 40 issu= es > > each. So I think some people would care more about fixing bugs than > > adjusting the interfaces. Of course, some of the issues may be about = the > > interface and increasing consistency where it can be done without > > compatibility issues. > = > Yes i agree! If we can at least do something as meager as this it > would be a step forward. However i still believe the current API is > broken beyond repair so we must introduce a new "archive" module. > That's my opinion anyway. > = Checking if such a thing exists already may be more useful. I saw someone= mention a project similar? > > However, I do not think there are any active > > developers focued on those two modules. > = > We need some fresh blood infused into Python-dev. I have been trying > to get involved for a long time. We as a community need to realize > that this community is NOT a homogeneous block. We need to be a little > more accepting of new folks and new ideas. I know this language would > evolve much quicker if we did. > = > > > Rick: But what about Python 3000? > > > PTB: " Oh, well, umm, lets see. Well that was then and this is now!= > > > > The changes made for 3.0 were more than enough for some people to > > discourage migration to Py3. And we *have* made additional changes > > since. So the resistance to incompatible feature changes has increase= d. > = > Yes i do understand these changes have been very painful for some > folks (me included). However there is only but one constant in this > universe and that constant is change. I believe we can improve many of > these API's starting with zip/tar modules. By the time Python 4000 > gets here (and it will be much sooner than you guys realize!) we need > to have this stdlib in pristine condition. That means: > = > * Removing style guide violations. > * Removing inconsistencies in existing API's. > * Making sure doc strings and comments are everywhere. > * Cleaning up the IDLE library (needs a complete re-write!) > * Cleaning up Tkinter. > * And more > = All noble goals. I think the fact that everyone* knows that the stdlib is= a mess and not the epitome of Good Python is kinda sad... * for some definition of "everyone" -- = Corey Richardson "Those who deny freedom to others, deserve it not for themselves" -- Abraham Lincoln --=-1311319176-781304-10576-242-3-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQEcBAEBCAAGBQJOKSSIAAoJEAFAbo/KNFvpdWoIAJw9J6zymtlRzR2cR34TPtMi bp8Zija5bH7aDvwRukV+Iy2fs5TLv3Vvm6CTvgmwboevSav/uVNQ2g+fYegue82y ESjkchh7Qw0XiYrJI6jWeNbosch+IqBKEmKXel3P3Dp7XIQTOXmyHT816xMLIard b+Escep+TOdf/xMsgBaYYaoLPksrHVnKpTaoyvUD3jmUvHk7CiXdpLe2lGgPNL62 YGUx/AbvcKbvXki5GQa988bk6f+ks0XMR45NTaviEiD1uc9oTjLuwN6a5dHPtC7+ qShTlSDWn8dMk6NNI7L/WYCadrTSd703SnjQ1sptxSh1Y14oHonOzVq+wfgft8k= =SjyG -----END PGP SIGNATURE----- --=-1311319176-781304-10576-242-3-=--