Skip to content

Commit

Permalink
unregister SymtableEntryType
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckerns committed Jun 26, 2022
1 parent 178e7c0 commit 73d9f85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dill/_dill.py
Original file line number Diff line number Diff line change
Expand Up @@ -747,11 +747,13 @@ def _create_typemap():
_incedental_reverse_typemap['InputType'] = InputType
_incedental_reverse_typemap['OutputType'] = OutputType

'''
try:
import symtable
_incedental_reverse_typemap["SymtableEntryType"] = type(symtable.symtable("", "string", "exec")._table)
except:
except: #FIXME: fails to pickle
pass
'''

if sys.hexversion >= 0x30a00a0:
_incedental_reverse_typemap['LineIteratorType'] = type(compile('3', '', 'eval').co_lines())
Expand Down
4 changes: 2 additions & 2 deletions dill/_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ class _Struct(ctypes.Structure):

try:
import symtable
d["SymtableEntryType"] = symtable.symtable("", "string", "exec")._table
except: #FIXME: fails; should not be registered (in _reverse__typemap)?
x["SymtableEntryType"] = symtable.symtable("", "string", "exec")._table
except: #FIXME: fails to pickle
pass

if sys.hexversion >= 0x30a00a0:
Expand Down

0 comments on commit 73d9f85

Please sign in to comment.