-
-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compression, pickle protocol to comm contexts #4019
Changes from 7 commits
a997410
e0d57a1
d62a3b9
6b03771
4ba24dd
4480a80
a4d376f
fe6b58c
25ca03d
e7f2ab7
7e72469
dad7473
5c24a55
45d86fe
91933a3
354639b
88e5622
f3e81d2
a13b50f
9f1ad0d
6e6671b
70b9716
0053cca
4909356
138d814
83a3bcc
1901c36
1f302ca
a2ed897
74b3790
26db554
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,15 +33,15 @@ def _always_use_pickle_for(x): | |
return False | ||
|
||
|
||
def dumps(x, *, buffer_callback=None): | ||
def dumps(x, *, buffer_callback=None, protocol=HIGHEST_PROTOCOL): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this suppose to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Either one is fine with me. We sometimes pass in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah no strong feelings from me either. Just noting it's a little odd to have |
||
""" Manage between cloudpickle and pickle | ||
|
||
1. Try pickle | ||
2. If it is short then check if it contains __main__ | ||
3. If it is long, then first check type, then check __main__ | ||
""" | ||
buffers = [] | ||
dump_kwargs = {"protocol": HIGHEST_PROTOCOL} | ||
dump_kwargs = {"protocol": protocol or HIGHEST_PROTOCOL} | ||
if HIGHEST_PROTOCOL >= 5 and buffer_callback is not None: | ||
dump_kwargs["buffer_callback"] = buffers.append | ||
try: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a regression. Our error reporting around bad TLS degraded a bit. It now shows up as a timeout error with a more generic "could not connect" message. I tried figuring out what was going on here for a while but couldn't come up with a resolution. I could use help here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed as issue ( #4084 ) for tracking and broader visibility.