#217 building w/ python2.3 ignores 'compiler' section of site.cfg

MySQLdb-1.2
closed
Andy Dustman
MySQLdb (285)
5
2012-09-19
2006-11-06
No

on line 12 setup.py claims to be compatible with Python
2.3, but on line 115, it calls the .read() method of a
SafeConfigParser instance expecting a return, but
RawConfigParser.read() only started returning values
starting with Python 2.4, according to:

http://docs.python.org/lib/RawConfigParser-objects.html

Workaround: remove the "if" on line 115 and dedent the
block inside it so that it always executes after the
.read()

Discussion

  • Logged In: YES
    user_id=200267

    Also, wrap the list comprehension on line 116 with a dict()
    call. dict.update() doesn't accept list of 2-tuples on
    Python 2.3. Lines 115 and 116 should look like this:

    config.read(['site.cfg'])
    ext_mysql_metadata.update(dict([ (k, v.split()) for k, v in
    config.items('compiler') ]
    ))

     
  • Andy Dustman
    Andy Dustman
    2007-02-10

    Logged In: YES
    user_id=71372
    Originator: NO

    Reopen if you can still reproduce this.