From: Martin v. Löwis Date: Sat, 14 Jun 2003 07:20:04 +0000 (+0000) Subject: copy and deepcopy builtin functions atomically. Fixes #746304. X-Git-Tag: 2.2~67 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e348c6d1a7982bd42fe427d490ddc2b5ed378ff8;p=thirdparty%2FPython%2Fcpython.git copy and deepcopy builtin functions atomically. Fixes #746304. Also backport 2.36 (deepcopy classes atomically). --- diff --git a/Lib/copy.py b/Lib/copy.py index eae3b6f6a673..9782c6b56593 100644 --- a/Lib/copy.py +++ b/Lib/copy.py @@ -112,6 +112,7 @@ except AttributeError: d[types.TypeType] = _copy_atomic d[types.XRangeType] = _copy_atomic d[types.ClassType] = _copy_atomic +d[types.BuiltinFunctionType] = _copy_atomic def _copy_list(x): return x[:] @@ -211,6 +212,8 @@ except AttributeError: pass d[types.TypeType] = _deepcopy_atomic d[types.XRangeType] = _deepcopy_atomic +d[types.ClassType] = _deepcopy_atomic +d[types.BuiltinFunctionType] = _deepcopy_atomic def _deepcopy_list(x, memo): y = [] diff --git a/Misc/NEWS b/Misc/NEWS index ec4a61115027..eb746f32f7fe 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -1,3 +1,8 @@ +What's New in Python 2.2.4? + +- SF #746304: Builtin functions are now copy.[deep]copyable. + Classes are now also deepcopyable. + What's New in Python 2.2.3 (final) ? Release date: 30-May-2003 ====================================