Roundup Tracker - Issues

Issue 790363

classification
CSV busted in Python2.3
Type: Severity: normal
Components: None Versions:
process
Status: closed fixed
:
: dubois : dubois, jlgijsbers, richard
Priority: normal :

Created on 2003-08-18 04:25 by richard, last changed 2003-08-28 02:20 by dubois.

Messages
msg918 Author: [hidden] (richard) Date: 2003-08-18 04:25
CSV busted in Python2.3 
msg919 Author: [hidden] (jlgijsbers) Date: 2003-08-25 22:03
Logged In: YES 
user_id=469548

I see two ways to fix this:

1. Write a wrapper around the 2.3 csv module that provides
the Object-Craft API, so we'd only have to change the import
of the csv module to 'from roundup import csvwrapper'. I've
made a first cut at this, but I still have six failing
tests, of which I think two are important to roundup. It's a
pain getting the details right. Also, we'll want to move to
the 2.3 module eventually, which means this is extra work.

2. Switch to the 2.3 module now in roundup code, and put
together a standalone distribution of the 2.3 module that
works on Python 2.1/2.2. I think this seems like we're
pushing to 2.3 too hard.

Did you have another plan?
msg920 Author: [hidden] (richard) Date: 2003-08-26 00:25
Logged In: YES 
user_id=6405

Paul Dubois has already offered to fix this by applying the first of the two 
strategies you outline. 
 
Sorry this issue wasn't updated to reflect that. 
 
msg921 Author: [hidden] (dubois) Date: 2003-08-28 02:20
Logged In: YES 
user_id=5550

I have forwarded a fix to Richard for him to examine before
committing because I don't trust myself to understand how it
all works yet; this was my first pass at modifying Roundup. 

My solution is in some sense the inverse of the one
suggested; roughly, the Roundup source is changed to use
Python 2.3's csv via a new (internal to roundup) module
rcsv; the latter detects if Object Craft csv is being used
instead and compensates, and also detects if no csv is
available and sets up the error message. The "fake" version
of Python's 2.3's csv is not a complete replacement, because
the iterator semantics are not available in 2.1, but it is
able to do the job in the way that Roundup presently uses
it. I thought it better for the long run to have the source
conform to the standard module and have the rcsv module fake
it for the pre-2.3 case rather than the other way around.
History
Date User Action Args
2003-08-18 04:25:57richardcreate