Skip to content

Commit

Permalink
Fix a problem with deepcopying typeHintedDict causing a hang, bump ve…
Browse files Browse the repository at this point in the history
…rsion number
  • Loading branch information
gb119 committed Aug 2, 2016
1 parent b1a4b02 commit 4742f62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Stoner/Core.py
Expand Up @@ -805,6 +805,16 @@ def string_to_type(self, value):
ret = None
return ret

def __deepcopy__(self,memo):
"""Implements a deepcopy method for typeHintedDict to work around something that gives a hang in newer Python 2.7.x"""
cls = self.__class__
result = cls()
memo[id(self)] = result
for k in self:
result[k]=self[k]
result.types[k]=self.types[k]
return result

def _get_name_(self, name):
"""Checks a string name for an embedded type hint and strips it out.
Expand Down
2 changes: 1 addition & 1 deletion Stoner/__init__.py
Expand Up @@ -10,6 +10,6 @@
from .Util import Data
from Stoner.Folders import DataFolder

__version_info__ = ('0', '6', '1')
__version_info__ = ('0', '6', '2')
__version__ = '.'.join(__version_info__)

0 comments on commit 4742f62

Please sign in to comment.