Skip to content

Commit

Permalink
Use typechecking to overcome sphynx error (#7895)
Browse files Browse the repository at this point in the history
* Use typechecking to overcome spynx error

* Add missing item to chanelog
  • Loading branch information
guy-har authored Jun 20, 2024
1 parent fd2f5b1 commit a0a82fb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion clients/python-wrapper/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
## v0.7.0
:new: What's new:

- AWS role Authentication: Initiate lakeFS Python client sessions securely using your AWS Role. (#7874) [Read more](https://docs.lakefs.io/reference/security/external-principals-aws.html#login-with-python)
- AWS role Authentication: Initiate lakeFS Python client sessions securely using your AWS Role. (#7874) [Read more](https://docs.lakefs.io/reference/security/external-principals-aws.html#login-with-python)

:bug: Bugs fixed:

- ObjectWriter write buffer as binary always (#7903)

## v0.6.2

Expand Down
8 changes: 6 additions & 2 deletions clients/python-wrapper/lakefs/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import json
from threading import Lock
from typing import Optional
from typing import TYPE_CHECKING
from urllib.parse import urlparse, parse_qs

import lakefs_sdk
Expand All @@ -20,6 +21,9 @@
from lakefs.exceptions import NotAuthorizedException, ServerException, api_exception_handler
from lakefs.models import ServerStorageConfiguration

if TYPE_CHECKING:
import boto3

DEFAULT_REGION = 'us-east-1'


Expand Down Expand Up @@ -131,7 +135,7 @@ def _extract_region_from_endpoint(endpoint):


def _get_identity_token(
session: 'boto3.Session',
session: boto3.Session,
lakefs_host: str,
additional_headers: dict[str, str],
presign_expiry
Expand Down Expand Up @@ -208,7 +212,7 @@ def _get_identity_token(


def from_aws_role(
session: 'boto3.Session',
session: boto3.Session,
ttl_seconds: int = 3600,
presigned_ttl: int = 60,
additional_headers: dict[str, str] = None,
Expand Down

0 comments on commit a0a82fb

Please sign in to comment.