Help:I upgraded to Python 1.5.2 on Redhat 5.2 and things stopped working.

Travis Oliphant olipt at mayo.edu
Fri May 28 18:01:17 EDT 1999


> Hi,
> 
> I have been using redhat 5.2 . I recently loaded and upgraded python
> 1.5.2 and some utilities that depended upon python, such as the
> graphical network configurator, have stopped working. Does anyone know
> why? And can I get back my configuration without having to uninstall the
> new python and reinstall the older one?
> 

Same thing happend to me recently when upgrading to RedHat 6.0 as they
still use Python 1.5.1 by default. The fix is really quite easy and
RedHat should fix it.

The problem is they are relying on the fact that 1.5.1 did not complain
when they (incorrectly) used non-default arguments after default arguments
in function definitions.  Python 1.5.2 rightly flags it as an error.

The fix is easy.  There are about 3 or 4 places it has to be changed.  I
just used the TraceBack to figure out which files need to be changed and
placed =None after the arguments which did not have a default argument.

Example

# Bad RedHat code
def somefunc(one,two=2,three=3,four)

# Fixed RedHat code
def somefunc(one,two=2,three=3,four=None)

If you wan't to email me the original files I could send you a patch
against what I have now (which works).

Regards,

Travis






More information about the Python-list mailing list