classification
Title: python2.6 -3 gives "warning: callable() not supported in 3.x" on startup
Type: enhancement Stage:
Components: Interpreter Core Versions: Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, christian.heimes, eopadoan, ezio.melotti
Priority: normal Keywords:

Created on 2008-02-10 22:15 by eopadoan, last changed 2009-07-04 02:48 by ezio.melotti. This issue is now closed.

Messages (5)
msg62260 - (view) Author: Eduardo Padoan (eopadoan) Date: 2008-02-10 22:15
Running python2.6 with the -3 option, you get 6 warnings about callable():

edcrypt@DEADBEEF:~/dev/svn/python2.6$ python2.6 -3
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
warning: callable() not supported in 3.x
Python 2.6a0 (trunk:60717, Feb 10 2008, 19:53:48) 
[GCC 4.2.3 (Ubuntu 4.2.3-1ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
msg62261 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-02-10 22:28
On my Mac, I also get about 30 warnings about dict.has_key. By the way,
what are you supposed you use in py3k instead of callable?
msg62262 - (view) Author: Eduardo Padoan (eopadoan) Date: 2008-02-10 22:34
> By the way, what are you supposed you use in py3k instead of callable?

Either "try: foo(); except TypeError: ...", or "if hasattr(foo,
'__call__'): foo()".
msg62280 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-02-11 11:02
IMO the warning can be removed. The 2to3 tool can easily migrate any
callable(spam) to hasattr(spam, '__call__').
msg90100 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2009-07-04 02:48
I can't reproduce this with Python 2.6 (final) on Windows and Python
2.6.2 on Linux. I guess that this was fixed before the final release.
Closing as "fixed".
History
Date User Action Args
2009-07-04 02:48:57ezio.melottisetstatus: open -> closed

nosy: + ezio.melotti
messages: + msg90100

resolution: fixed
2008-02-11 11:02:32christian.heimessetpriority: normal
type: enhancement
messages: + msg62280
nosy: + christian.heimes
2008-02-10 22:34:30eopadoansetmessages: + msg62262
2008-02-10 22:28:09benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg62261
2008-02-10 22:15:28eopadoancreate