Skip to content
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

Merged
merged 3 commits into from Feb 21, 2024

Conversation

clundin25
Copy link
Contributor

No description provided.

@clundin25 clundin25 requested review from a team as code owners February 15, 2024 17:04
@@ -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()

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?

Copy link
Contributor Author

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

@clundin25 clundin25 added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 16, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 16, 2024
@clundin25 clundin25 merged commit 08b5cc3 into googleapis:main Feb 21, 2024
14 checks passed
@@ -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.
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants