Show More
@@ -355,6 +355,13 b' def getdoc(obj: object) -> Optional[byte' | |||||
355 | def _wrapattrfunc(f): |
|
355 | def _wrapattrfunc(f): | |
356 | @functools.wraps(f) |
|
356 | @functools.wraps(f) | |
357 | def w(object, name, *args): |
|
357 | def w(object, name, *args): | |
|
358 | if isinstance(name, bytes): | |||
|
359 | from . import util | |||
|
360 | ||||
|
361 | msg = b'function "%s" take `str` as argument, not `bytes`' | |||
|
362 | fname = f.__name__.encode('ascii') | |||
|
363 | msg %= fname | |||
|
364 | util.nouideprecwarn(msg, b"6.6", stacklevel=2) | |||
358 | return f(object, sysstr(name), *args) |
|
365 | return f(object, sysstr(name), *args) | |
359 |
|
366 | |||
360 | return w |
|
367 | return w |
General Comments 0
You need to be logged in to leave comments.
Login now