Skip to content

Commit 22af562

Browse files
ogriselrgbkrk
authored andcommitted
FIX ApiModule can be vendored in the pytest package (#135)
1 parent dac351a commit 22af562

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/cloudpickle_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,10 +690,10 @@ def f():
690690
s = py.builtin.set([1])
691691
return s.pop()
692692

693-
# some setup is required to allow pytest apimodules to be correctly serializable.
693+
# some setup is required to allow pytest apimodules to be correctly
694+
# serializable.
694695
from cloudpickle import CloudPickler
695-
from py._apipkg import ApiModule
696-
CloudPickler.dispatch[ApiModule] = CloudPickler.save_module
696+
CloudPickler.dispatch[type(py.builtin)] = CloudPickler.save_module
697697
g = cloudpickle.loads(cloudpickle.dumps(f))
698698

699699
result = g()

0 commit comments

Comments
 (0)