Skip to content

Commit 7935824

Browse files
authored
fix: Avoid pickling processed credentials (#1016)
1 parent 892481a commit 7935824

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

google/cloud/storage/client.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,11 @@ def __init__(
130130
if project is _marker:
131131
project = None
132132

133-
# Save the initial value of client_info and client_options before they
133+
# Save the initial value of constructor arguments before they
134134
# are passed along, for use in __reduce__ defined elsewhere.
135135
self._initial_client_info = client_info
136136
self._initial_client_options = client_options
137+
self._initial_credentials = credentials
137138

138139
kw_args = {"client_info": client_info}
139140

google/cloud/storage/transfer_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ def _reduce_client(cl):
879879

880880
client_object_id = id(cl)
881881
project = cl.project
882-
credentials = cl._credentials
882+
credentials = cl._initial_credentials
883883
_http = None # Can't carry this over
884884
client_info = cl._initial_client_info
885885
client_options = cl._initial_client_options

0 commit comments

Comments
 (0)