Skip to content

Commit 6e32728

Browse files
committed
Add vendored cloudpickle.
1 parent 5a80754 commit 6e32728

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

sdks/python/apache_beam/internal/cloudpickle_pickler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import threading
3434
import zlib
3535

36-
import cloudpickle
36+
from apache_beam.internal.cloudpickle import cloudpickle
3737

3838
try:
3939
from absl import flags

sdks/python/apache_beam/internal/pickler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@
3333

3434
USE_CLOUDPICKLE = 'cloudpickle'
3535
USE_DILL = 'dill'
36-
DEFAULT_PICKLE_LIB = USE_CLOUDPICKLE
3736

37+
DEFAULT_PICKLE_LIB = USE_CLOUDPICKLE
3838
desired_pickle_lib = cloudpickle_pickler
3939

40+
# DEFAULT_PICKLE_LIB = USE_DILL
41+
# desired_pickle_lib = dill_pickler
42+
4043

4144
def dumps(o, enable_trace=True, use_zlib=False) -> bytes:
4245

sdks/python/setup.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,11 +347,6 @@ def get_portability_package_data():
347347
# dill on client and server, therefore list of allowed versions is
348348
# very narrow. See: https://github.com/uqfoundation/dill/issues/341.
349349
'dill>=0.3.1.1,<0.3.2',
350-
# It is prudent to use the same version of pickler at job submission
351-
# and at runtime, therefore bounds need to be tight.
352-
# To avoid depending on an old dependency, update the minor version on
353-
# every Beam release, see: https://github.com/apache/beam/issues/23119
354-
'cloudpickle~=2.2.1',
355350
'fastavro>=0.23.6,<2',
356351
'fasteners>=0.3,<1.0',
357352
# TODO(https://github.com/grpc/grpc/issues/37710): Unpin grpc

0 commit comments

Comments
 (0)