Skip to content

Commit 8bbea3e

Browse files
authored
compat: Import Pickler from "pickle" instead of "_pickle" (#469)
The latter is an implementation detail (see [0]), and the docs instruct users to "always import the standard version"[0]. Moreover, "pickle.Pickler" is the same as "_pickle.Pickler", for all recent CPython releases (tested 3.6->3.9). [0] https://docs.python.org/3.1/whatsnew/3.0.html#library-changes Fixes: #458 Signed-off-by: Jan Vesely <[email protected]>
1 parent 0006829 commit 8bbea3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cloudpickle/compat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
from pickle import _Pickler as Pickler # noqa: F401
1111
else:
1212
import pickle # noqa: F401
13-
from _pickle import Pickler # noqa: F401
13+
from pickle import Pickler # noqa: F401

0 commit comments

Comments
 (0)