-
Notifications
You must be signed in to change notification settings - Fork 310
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
fix: Typo when setting the state for the pickle deserializer. #1479
Conversation
@@ -75,7 +75,7 @@ def __getstate__(self): | |||
|
|||
def __setstate__(self, state): | |||
"""Pickle helper that deserializes the _lock attribute.""" | |||
state["_key"] = threading.Lock() | |||
state["_lock"] = threading.Lock() |
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.
is there a test we could add?
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.
ACK - Going to wait to hear back on #1478 before doing more
@@ -150,7 +150,10 @@ def test_refresh_dead_worker(): | |||
|
|||
def test_pickle(): | |||
w = _refresh_worker.RefreshThreadManager() | |||
# For some reason isinstance cannot interpret threading.Lock as a type. |
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.
The reason is that threading.Lock is a function, returning instances of _thread.lock (internal class)
No description provided.