A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-May/079312.html below:

[Python-Dev] Trickery with moving urllib

[Python-Dev] Trickery with moving urllibFred Drake fdrake at acm.org
Sun May 11 09:04:06 CEST 2008
On Sat, May 10, 2008 at 11:38 PM, Brett Cannon <brett at python.org> wrote:
> I see three solutions for dealing with this.
>
> 1. Have stubs for the entire urllib API in urllib.__init__ that raise
> a DeprecationWarning either specifying the new name or saying the
> function/class is deprecated.

On May 11, 2008, at 2:58 AM, Alexandre Vassalotti wrote:
> I am probably missing something, because I don't see how this solution
> would solve the problem. The warning in urllib.__init__ will still be
> issued when people will import urllib.fetch (or urllib.fetch).


Were the warnings issued on import, yes, but I think Brett's  
suggestion was really about issuing warnings when the stub functions  
were called.  For classes, I guess this could be handled using the  
__init__ methods, but I'm not sure I like that, or that it will be  
easy to get exactly the right behavior in all cases.


   -Fred

-- 
Fred Drake   <fdrake at acm.org>




More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4