Skip to content

Commit

Permalink
Merge branch 'master' into enums
Browse files Browse the repository at this point in the history
  • Loading branch information
anivegesana authored Jun 6, 2022
2 parents c2a28f8 + 424b40e commit 8552307
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 0 additions & 1 deletion dill/_dill.py
Original file line number Diff line number Diff line change
Expand Up @@ -2210,7 +2210,6 @@ def save_function(pickler, obj):
if not _locate_function(obj, pickler):
log.info("F1: %s" % obj)
_recurse = getattr(pickler, '_recurse', None)
_byref = getattr(pickler, '_byref', None)
_postproc = getattr(pickler, '_postproc', None)
_main_modified = getattr(pickler, '_main_modified', None)
_original_main = getattr(pickler, '_original_main', __builtin__)#'None'
Expand Down
9 changes: 9 additions & 0 deletions tests/test_classdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,15 @@ def test_origbases():
if sys.hexversion >= 0x03070000:
assert dill.copy(customIntList).__orig_bases__ == customIntList.__orig_bases__

def test_attr():
import attr
@attr.s
class A:
a = attr.ib()

v = A(1)
assert dill.copy(v) == v

def test_metaclass():
if dill._dill.PY3:
class metaclass_with_new(type):
Expand Down

0 comments on commit 8552307

Please sign in to comment.