On 11:53 am, solip...@pitrou.net wrote:
On Tue, 09 Nov 2010 02:03:23 -0000
exar...@twistedmatrix.com wrote:

I wonder if there are any actual technical arguments to be made against
something like `deprecatedModuleAttribute`?

For example, does it work well with import hacks such as Mercurial's
demandimport?

I haven't tried before, but a quick experiment suggests that the two happily co-exist (aside from demandimport getting the blame instead of the true offending code, but that's really a problem with the warnings module):

 >>> import mercurial.demandimport as di
 >>> di.enable()
 >>> import twisted.python.threadpool as tp
 >>> tp.ThreadSafeList
/usr/lib/pymodules/python2.6/mercurial/demandimport.py:76: DeprecationWarning: twisted.python.threadpool.ThreadSafeList was deprecated in Twisted 10.1.0: This was an internal implementation detail of support for Jython 2.1, which is now obsolete.
 return getattr(self._module, attr)
 <class twisted.python.threadpool.ThreadSafeList at 0xb746decc>
 >>>

Jean-Paul
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to