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

feat: support smart_open >=5.0.0,<6.0.0 #63

Merged
merged 3 commits into from
Jun 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ client library prefers.

# CLI

Pathy command line interface. (v0.5.1)
Pathy command line interface. (v0.5.2)

**Usage**:

Expand Down
6 changes: 4 additions & 2 deletions pathy/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@ def exists(self) -> bool:

class BucketClientS3(BucketClient):
client: S3NativeClient
_session: Optional[Any]
_session: Optional[boto3.Session]

@property
def client_params(self) -> Dict[str, Any]:
return dict() if self._session is None else dict(session=self._session)
session: Any = self._session
result: Any = dict() if session is None else dict(client=session.client("s3"))
return result

def __init__(self, **kwargs: Any) -> None:
self.recreate(**kwargs)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
smart-open>=2.2.0,<4.0.0
smart-open>=5.0.0,<6.0.0
typer>=0.3.0,<1.0.0
dataclasses>=0.6,<1.0; python_version < "3.7"