[Python-checkins] r63159 - python/trunk/Lib/urllib.py

Guido van Rossum guido at python.org
Mon May 12 16:28:48 CEST 2008


I suggest to put the OS-X-specific code in a separate module in invoke
that from urllib. Ideally there would be some way to "plug in"
different versions of this functionality for different operating
systems.

On Mon, May 12, 2008 at 6:47 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> ronald.oussoren wrote:
>>
>> Author: ronald.oussoren
>> Date: Mon May 12 13:31:05 2008
>> New Revision: 63159
>>
>> Log:
>> MacOSX: remove dependency on Carbon package for urllib
>>
>> This patch removes the dependency on the Carbon package from urllib. The
>> mac-specific code for getting proxy configuration is now writting in
>> Python using ctypes and uses the SystemConfiguration framework instead of
>> InternetConfig. Also provides a mac-specific implementation of
>> proxy_bypass.
>
> There appear to be a lot of imports inside functions in this patch - what
> are the chances of any of this code being called from a thread spawned as
> side effect of an import, and hence deadlocking an application?
>
> It may be better to pull the imports up to be module level code (but still
> guarded by the check for 'darwin' as the platform)
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> ---------------------------------------------------------------
>            http://www.boredomandlaziness.org
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
>



-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-checkins mailing list