mirror of
https://github.com/python/cpython.git
synced 2025-08-28 20:56:54 +00:00
Change all the function attributes from func_* -> __*__. This gets rid
of func_name, func_dict and func_doc as they already exist as __name__, __dict__ and __doc__.
This commit is contained in:
parent
27d517b21b
commit
221085de89
37 changed files with 160 additions and 184 deletions
|
@ -54,7 +54,7 @@ def with_warning_restore(func):
|
|||
# Grrr, we need this function to warn every time. Without removing
|
||||
# the warningregistry, running test_tarfile then test_struct would fail
|
||||
# on 64-bit platforms.
|
||||
globals = func.func_globals
|
||||
globals = func.__globals__
|
||||
if '__warningregistry__' in globals:
|
||||
del globals['__warningregistry__']
|
||||
warnings.filterwarnings("error", r"""^struct.*""", DeprecationWarning)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue