Skip to content

Commit 48e432a

Browse files
committed
Use internal DEFAULT_PICKLE_LIB
1 parent 2cf0930 commit 48e432a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sdks/python/apache_beam/options/pipeline_options.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1798,7 +1798,10 @@ def _handle_load_main_session(self, validator):
17981798
# save_main_session default to False for dill, while default to true
17991799
# for cloudpickle
18001800
pickle_library = getattr(self, 'pickle_library')
1801-
if pickle_library in ['default', 'cloudpickle']:
1801+
if pickle_library == 'default':
1802+
from apache_beam.internal.pickler import DEFAULT_PICKLE_LIB
1803+
pickle_library = DEFAULT_PICKLE_LIB
1804+
if pickle_library == 'cloudpickle':
18021805
setattr(self, 'save_main_session', True)
18031806
else:
18041807
setattr(self, 'save_main_session', False)

0 commit comments

Comments
 (0)