From skip at pobox.com Mon Jun 9 17:44:20 2003 From: skip at pobox.com (Skip Montanaro) Date: Mon, 9 Jun 2003 10:44:20 -0500 Subject: [Csv] Re: csv module in Python 2.3 In-Reply-To: <16100.39916.650080.377261@grendel.zope.com> References: <16100.39916.650080.377261@grendel.zope.com> Message-ID: <16100.43860.527775.950800@montanaro.dyndns.org> I've cc'd the csv mailing list so the other participants can chime in. Fred> What I'd like is to know how good you think the test coverage is; Fred> is the bulk of the code covered? I think it does a pretty good job covering the code, though I didn't write the tests designed to exercise the underlying C code. Fred> Is the documentation fairly complete? Yes, I think so. Obviously, feedback is welcome. ;-) Fred> What are the maintenance plans for this code for versions of Fred> Python predating 2.3? I believe the intent is that it should run with 2.2+. I believe Dave Cole and Andrew MacNamara, the two primary C code authors, were running it with 2.2 when it was under active development. It uses iterators, so I believe it would need some significant surgery to work on 2.1 or earlier. Skip From andrewm at object-craft.com.au Tue Jun 10 02:16:25 2003 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Tue, 10 Jun 2003 10:16:25 +1000 Subject: [Csv] Re: csv module in Python 2.3 Message-ID: <3EE52359.9040107@object-craft.com.au> Fred> What I'd like is to know how good you think the test coverage is; Fred> is the bulk of the code covered? Skip> I think it does a pretty good job covering the code, though I didn't Skip> write the tests designed to exercise the underlying C code. The coverage of the C code should be very good. They were created by first imagining all the code that needed to be exercised, then using the gcov tool to pick up the cases I missed (so, essentially, two approaches were used and we should have the best of both worlds). From fdrake at acm.org Mon Jun 9 17:50:17 2003 From: fdrake at acm.org (Fred L. Drake, Jr.) Date: Mon, 9 Jun 2003 11:50:17 -0400 Subject: [Csv] Re: csv module in Python 2.3 In-Reply-To: <16100.43860.527775.950800@montanaro.dyndns.org> References: <16100.39916.650080.377261@grendel.zope.com> <16100.43860.527775.950800@montanaro.dyndns.org> Message-ID: <16100.44217.861537.719360@grendel.zope.com> Skip Montanaro writes: > I've cc'd the csv mailing list so the other participants can chime in. Ok; I've registered for the list now. > Fred> What I'd like is to know how good you think the test coverage is; > Fred> is the bulk of the code covered? > > I think it does a pretty good job covering the code, though I didn't write > the tests designed to exercise the underlying C code. Ok. > Fred> Is the documentation fairly complete? > > Yes, I think so. Obviously, feedback is welcome. ;-) I guess it's time for me to start reading! > Fred> What are the maintenance plans for this code for versions of > Fred> Python predating 2.3? > > I believe the intent is that it should run with 2.2+. I believe Dave Cole > and Andrew MacNamara, the two primary C code authors, were running it with > 2.2 when it was under active development. It uses iterators, so I believe > it would need some significant surgery to work on 2.1 or earlier. That's good enough for me; my requirement only reaches back to Python 2.2.3 at this point. Thanks! -Fred -- Fred L. Drake, Jr. PythonLabs at Zope Corporation From generatemorevisitors060603 at excite.com Wed Jun 11 01:18:51 2003 From: generatemorevisitors060603 at excite.com (generatemorevisitors060603 at excite.com) Date: Wed, 11 Jun 2003 09:18:51 +1000 Subject: [Csv] Testing - ignore Message-ID: <20030610231851.248193C41B@coffee.object-craft.com.au> -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From andrewm at object-craft.com.au Thu Jun 12 04:05:03 2003 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Thu, 12 Jun 2003 12:05:03 +1000 Subject: [Csv] Patch to remove eval from csv sniffer Message-ID: <20030612020503.5D8DD3C41B@coffee.object-craft.com.au> The patch by Raymond Hettinger mentioned here: www.python.org/sf/744104 makes a lot of sense. The question is - should it be applied now? We're in the 55th minute of the 11th hour for 2.3, and changes are generally unwelcome. This change changes the sniffer's behaviour slightly, but it's probably better to do this now, than after 2.3 is released (and it's a potential security problem). -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From skip at pobox.com Thu Jun 12 04:27:07 2003 From: skip at pobox.com (Skip Montanaro) Date: Wed, 11 Jun 2003 21:27:07 -0500 Subject: [Csv] Re: [Python-Dev] Patch to remove eval from csv sniffer In-Reply-To: <20030612020503.5D8DD3C41B@coffee.object-craft.com.au> References: <20030612020503.5D8DD3C41B@coffee.object-craft.com.au> Message-ID: <16103.58619.49067.883421@montanaro.dyndns.org> Andrew> The patch by Raymond Hettinger mentioned here: Andrew> http://www.python.org/sf/744104 Andrew> makes a lot of sense. The question is - should it be applied Andrew> now? I know it's late in the cycle, but the sniffer hasn't really been exposed to the outside world, so I doubt we'd break any existing applications. I attached a comment to the patch with a couple minor suggestions. Skip From andrewm at object-craft.com.au Thu Jun 12 15:41:58 2003 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Thu, 12 Jun 2003 23:41:58 +1000 Subject: [Csv] Re: [Python-Dev] Patch to remove eval from csv sniffer In-Reply-To: Message from Guido van Rossum <200306121328.h5CDRxT11057@odiug.zope.com> References: <20030612020503.5D8DD3C41B@coffee.object-craft.com.au> <200306121328.h5CDRxT11057@odiug.zope.com> Message-ID: <20030612134158.7522B3C421@coffee.object-craft.com.au> >> The patch by Raymond Hettinger mentioned here: >> >> www.python.org/sf/744104 >> >> makes a lot of sense. The question is - should it be applied now? We're >> in the 55th minute of the 11th hour for 2.3, and changes are generally >> unwelcome. This change changes the sniffer's behaviour slightly, but >> it's probably better to do this now, than after 2.3 is released (and >> it's a potential security problem). Guido said: >Better now. Raymond has commited it. Ta. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From skip at pobox.com Fri Jun 20 17:01:50 2003 From: skip at pobox.com (Skip Montanaro) Date: Fri, 20 Jun 2003 10:01:50 -0500 Subject: [Csv] Problems with CSV Module In-Reply-To: References: Message-ID: <16115.8670.659913.304345@montanaro.dyndns.org> I think most of what Andreas asked about has either been taken care of or shown not to be useful, however there is this request outstanding: Andreas> 4. There is no .readrow() Andreas> This should be just another name for .next(). It's more Andreas> intuitive if you write a row via .writerow() and read it via Andreas> .readrow(). What do people think? It should be an easy addition for Dave or Andrew, but I'm not sure it's really needed. If readrow() is really a synonym for next() I suppose it should also raise StopIteration upon completion, but that seems odd. Is there another reasonable way to signal completion without raising an exception (say, by returning None or some other non-sequence value)? Skip From skip at pobox.com Fri Jun 20 17:09:18 2003 From: skip at pobox.com (Skip Montanaro) Date: Fri, 20 Jun 2003 10:09:18 -0500 Subject: [Csv] My apologies for the continued list hiccups Message-ID: <16115.9118.498634.247791@montanaro.dyndns.org> Folks, I apologize for the continued list hiccups on the csv list. Mailman 2.1's qrunner stuff keeps crapping out. I just restarted it and will add a cron job to make sure it's running. Skip From skip at pobox.com Fri Jun 20 20:22:39 2003 From: skip at pobox.com (Skip Montanaro) Date: Fri, 20 Jun 2003 13:22:39 -0500 Subject: [Csv] test message 1 Message-ID: <16115.20719.392864.117836@montanaro.dyndns.org> Sorry to blast the list. Several test messages coming to try and tickle the Mailman 2.1 qrunner processes. Skip From skip at pobox.com Fri Jun 20 20:22:55 2003 From: skip at pobox.com (Skip Montanaro) Date: Fri, 20 Jun 2003 13:22:55 -0500 Subject: [Csv] test message 2 Message-ID: <16115.20735.610718.518981@montanaro.dyndns.org> test 2. (see test 1.) Skip From skip at pobox.com Fri Jun 20 20:23:01 2003 From: skip at pobox.com (Skip Montanaro) Date: Fri, 20 Jun 2003 13:23:01 -0500 Subject: [Csv] test message 3 Message-ID: <16115.20741.848707.789716@montanaro.dyndns.org> test 3. (see test 1.) Skip From guido at python.org Thu Jun 12 15:27:59 2003 From: guido at python.org (Guido van Rossum) Date: Thu, 12 Jun 2003 09:27:59 -0400 Subject: [Csv] Re: [Python-Dev] Patch to remove eval from csv sniffer In-Reply-To: Your message of "Thu, 12 Jun 2003 12:05:03 +1000." <20030612020503.5D8DD3C41B@coffee.object-craft.com.au> References: <20030612020503.5D8DD3C41B@coffee.object-craft.com.au> Message-ID: <200306121328.h5CDRxT11057@odiug.zope.com> > The patch by Raymond Hettinger mentioned here: > > www.python.org/sf/744104 > > makes a lot of sense. The question is - should it be applied now? We're > in the 55th minute of the 11th hour for 2.3, and changes are generally > unwelcome. This change changes the sniffer's behaviour slightly, but > it's probably better to do this now, than after 2.3 is released (and > it's a potential security problem). Better now. --Guido van Rossum (home page: http://www.python.org/~guido/) From andrewm at object-craft.com.au Mon Jun 23 01:45:54 2003 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Mon, 23 Jun 2003 09:45:54 +1000 Subject: [Csv] Testing - ignore In-Reply-To: Message from generatemorevisitors060603@excite.com <20030610231851.248193C41B@coffee.object-craft.com.au> References: <20030610231851.248193C41B@coffee.object-craft.com.au> Message-ID: <20030622234554.278AC3C424@coffee.object-craft.com.au> >Subject: [Csv] Testing - ignore >From: generatemorevisitors060603 at excite.com >Date: Wed, 11 Jun 2003 09:18:51 +1000 >To: Csv at mail.mojam.com Sigh - this should have been auto-rejected. Sorry. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From andrewm at object-craft.com.au Mon Jun 23 03:58:00 2003 From: andrewm at object-craft.com.au (Andrew McNamara) Date: Mon, 23 Jun 2003 11:58:00 +1000 Subject: [Csv] Problems with CSV Module In-Reply-To: Message from Skip Montanaro <16115.8670.659913.304345@montanaro.dyndns.org> References: <16115.8670.659913.304345@montanaro.dyndns.org> Message-ID: <20030623015800.48AAE3C424@coffee.object-craft.com.au> >I think most of what Andreas asked about has either been taken care of or >shown not to be useful, however there is this request outstanding: > > Andreas> 4. There is no .readrow() > Andreas> This should be just another name for .next(). It's more > Andreas> intuitive if you write a row via .writerow() and read it via > Andreas> .readrow(). > >What do people think? It should be an easy addition for Dave or Andrew, but >I'm not sure it's really needed. If readrow() is really a synonym for >next() I suppose it should also raise StopIteration upon completion, but >that seems odd. Is there another reasonable way to signal completion >without raising an exception (say, by returning None or some other >non-sequence value)? The use of iterators for reading rows is quite natural, but there is no equivalent concept for writing, hence the writerow method. I agree that the lack of symmetry is a bit of a wart, but the proposed solution doesn't feel any better to me. I agree that readrow() couldn't simply be a synonym for the .next() method, although the iterator protocol is simple enough that we could wrap Reader_iternext to produce a readrow method. -- Andrew McNamara, Senior Developer, Object Craft http://www.object-craft.com.au/ From skip at pobox.com Mon Jun 23 05:29:30 2003 From: skip at pobox.com (Skip Montanaro) Date: Sun, 22 Jun 2003 22:29:30 -0500 Subject: [Csv] Problems with CSV Module In-Reply-To: <20030623015800.48AAE3C424@coffee.object-craft.com.au> References: <16115.8670.659913.304345@montanaro.dyndns.org> <20030623015800.48AAE3C424@coffee.object-craft.com.au> Message-ID: <16118.29722.928652.789158@montanaro.dyndns.org> Andrew> The use of iterators for reading rows is quite natural, but Andrew> there is no equivalent concept for writing, hence the writerow Andrew> method. I agree that the lack of symmetry is a bit of a wart, Andrew> but the proposed solution doesn't feel any better to me. Then there's no harm in leaving well enough alone. It can always be added later if a crying need develops. Skip