[Python-3000] plat-mac seriously broken?

Bill Janssen janssen at parc.com
Sat Oct 27 02:45:02 CEST 2007


I found that an SSL test was failing on 3K because of the following:

Traceback (most recent call last):
  File "/local/python/3k/src/Lib/test/test_ssl.py", line 818, in testAsyncore
    f = urllib.urlopen(url)
  File "/local/python/3k/src/Lib/urllib.py", line 75, in urlopen
    opener = FancyURLopener()
  File "/local/python/3k/src/Lib/urllib.py", line 553, in __init__
    URLopener.__init__(self, *args, **kwargs)
  File "/local/python/3k/src/Lib/urllib.py", line 124, in __init__
    proxies = getproxies()
  File "/local/python/3k/src/Lib/urllib.py", line 1278, in getproxies
    return getproxies_environment() or getproxies_internetconfig()
  File "/local/python/3k/src/Lib/urllib.py", line 1263, in getproxies_internetconfig
    if 'UseHTTPProxy' in config and config['UseHTTPProxy']:
  File "/local/python/3k/src/Lib/plat-mac/ic.py", line 187, in __getitem__
    return _decode(self.h.data, key)
  File "/local/python/3k/src/Lib/plat-mac/ic.py", line 144, in _decode
    return decoder(data, key)
  File "/local/python/3k/src/Lib/plat-mac/ic.py", line 68, in _decode_boolean
    return ord(data[0])
TypeError: ord() expected string of length 1, but int found

All of the modules in plat-mac are full of this kind of stuff.
Someone needs to run 2to3 over them, I think.  Or maybe ord(int)
should just return the int.

Bill


More information about the Python-3000 mailing list