Python 2.6.1 urllib error on Mac os x PPC
nad at acm.org
Tue Mar 3 23:10:19 CET 2009
In article <1236111699.4546.4.camel at localhost>, ati <atiware at gmx.net>
> I recompiled Python-2.6.1 with MACOSX_DEPLOYMENT_TARGET=10.3, but no
> I updated developertools to xcode312_2621, no change..
> Btw.. Python-2.5.4 compiled from scratch works fine.
> I forgot to mention the ppc computer is a Mac OS X Server version and
> the Intel computer is a normal Mac OS X.
Ah, "OS X Server" and "2.5.4 works fine"! For 2.6, I see that the
getproxies code in urllib was re-written to eliminate use of the
deprecated python mac Carbon interfaces and instead use ctypes to call
the SystemConfiguration framework directly. It could very well be that
there are differences in the proxy configurations between OS X and OS X
Server. It wouldn't surprise me if that hasn't been tested by anyone
yet; unfortunately, I don't have an OS X Server instance handy to try it
I guess the easiest workaround would be to patch urllib.py to avoid
those calls to SystemConfiguration. Look at getproxies_macosx_sysconf.
If the OS X Server system is in on a network that doesn't require HTTP
proxies, return an empty dict, otherwise hardwire in the proxy
And, not to belabor the point but:
> I have to compile my own python, because i can't install the dmg under
> /usr/local/bin,lib, etc..
> I have to install python under /usr/local/some_other_dir/python. (this
> is a custom install for an application and i can't change ist
... the python.org installer installs to
/Library/Frameworks/Python.framework which is reserved for 3-party apps,
meaning it doesn't interfere with any of the Apple-supplied stuff,
including the Apple python. By default the 2.x installers *do* install
symlinks in /usr/local/bin but that can be de-selected during the
install, if necessary. Then you could create your own symlinks from
/usr/local/some_other_dir. But it's unlikely that that will directly
solve the problem above. You'll almost certainly still have to patch
You should open a tracker issue about this at http://bugs.python.org/.
And nice job documenting the problem!
nad at acm.org
More information about the Python-list