Remove deepcopy workaround for old python versions, only python 2.7 now
svn: r19926
This commit is contained in:
parent
747c4f2960
commit
54ed4276a4
@ -121,21 +121,6 @@ if not sys.version_info >= MIN_PYTHON_VERSION :
|
||||
'v3': MIN_PYTHON_VERSION[2]})
|
||||
sys.exit(1)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# deepcopy workaround
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
# In versions < 2.7 python does not properly copy methods when doing a
|
||||
# deepcopy. This workaround makes the copy work properly. When Gramps no longer
|
||||
# supports python 2.6, this workaround can be removed.
|
||||
if sys.version_info < (2, 7) :
|
||||
import copy
|
||||
import types
|
||||
def _deepcopy_method(x, memo):
|
||||
return type(x)(x.im_func, copy.deepcopy(x.im_self, memo), x.im_class)
|
||||
copy._deepcopy_dispatch[types.MethodType] = _deepcopy_method
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# gramps libraries
|
||||
|
Loading…
Reference in New Issue
Block a user