Skip to content

Commit 6fdcc42

Browse files
committed
[fix] Fixed race condition in shared session headers
1 parent 0ef9249 commit 6fdcc42

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pyatlan/client/aio/client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ def __init__(self, **kwargs):
129129
self._async_session = httpx.AsyncClient(
130130
transport=AsyncRetryTransport(retry=self.retry),
131131
headers={
132-
"authorization": f"Bearer {self.api_key}",
133132
"x-atlan-agent": "sdk",
134133
"x-atlan-agent-id": "python",
135134
"x-atlan-client-origin": "product_sdk",
@@ -726,7 +725,6 @@ async def _s3_presigned_url_file_upload(self, api, upload_file):
726725
params = copy.deepcopy(self._request_params)
727726
# No need of Atlan's API token here
728727
params["headers"].pop("authorization", None)
729-
self._async_session.headers.pop("authorization", None)
730728
return await self._call_api_internal(api, path, params, binary_data=upload_file)
731729

732730
async def _azure_blob_presigned_url_file_upload(self, api, upload_file):
@@ -735,7 +733,6 @@ async def _azure_blob_presigned_url_file_upload(self, api, upload_file):
735733
params = copy.deepcopy(self._request_params)
736734
# No need of Atlan's API token here
737735
params["headers"].pop("authorization", None)
738-
self._async_session.headers.pop("authorization", None)
739736
# Add mandatory headers for azure blob storage
740737
params["headers"]["x-ms-blob-type"] = "BlockBlob"
741738
return await self._call_api_internal(api, path, params, binary_data=upload_file)
@@ -746,7 +743,6 @@ async def _gcs_presigned_url_file_upload(self, api, upload_file):
746743
params = copy.deepcopy(self._request_params)
747744
# No need of Atlan's API token here
748745
params["headers"].pop("authorization", None)
749-
self._async_session.headers.pop("authorization", None)
750746
return await self._call_api_internal(api, path, params, binary_data=upload_file)
751747

752748
async def _presigned_url_file_download(self, api, file_path: str):
@@ -755,7 +751,6 @@ async def _presigned_url_file_download(self, api, file_path: str):
755751
params = copy.deepcopy(self._request_params)
756752
# No need of Atlan's API token here
757753
params["headers"].pop("authorization", None)
758-
self._async_session.headers.pop("authorization", None)
759754
return await self._call_api_internal(
760755
api, path, params, download_file_path=file_path
761756
)

0 commit comments

Comments
 (0)