Skip to content

Commit fbb715c

Browse files
committed
python3: rename func_name to __name__
What's New In Python 3.0 [1]: The function attributes named func_X have been renamed to use the __X__ form, freeing up these names in the function attribute namespace for user-defined attributes. To wit, func_closure, func_code, func_defaults, func_dict, func_doc, func_globals, func_name were renamed to __closure__, __code__, __defaults__, __dict__, __doc__, __globals__, __name__, respectively. 1. https://docs.python.org/3/whatsnew/3.0.html#operators-and-special-methods Part of #20
1 parent ca84c30 commit fbb715c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/connpool.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ def deco(*args, **kwargs):
136136
except exc_classes as e:
137137
if logger is not None:
138138
logger.log(retry_log_level,
139-
retry_log_message.format(f=f.func_name, e=e))
139+
retry_log_message.format(f=f.__name__, e=e))
140140
gevent.sleep(interval)
141141
failures += 1
142142
if max_failures is not None \
143143
and failures > max_failures:
144144
if logger is not None:
145145
logger.log(max_failure_log_level,
146146
max_failure_log_message.format(
147-
f=f.func_name, e=e))
147+
f=f.__name__, e=e))
148148
raise
149149
return deco

0 commit comments

Comments
 (0)