-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support newer versions of smart_open #167
Conversation
records_mover/url/s3/s3_file_url.py
Outdated
session=self._boto3_session) | ||
if SMART_OPEN_USE_SESSION: | ||
return s3_open(bucket_id=self.bucket, | ||
key_id=self.key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
records_mover/url/s3/s3_file_url.py
Outdated
if SMART_OPEN_USE_SESSION: | ||
return s3_open(bucket_id=self.bucket, | ||
key_id=self.key, | ||
mode=mode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
records_mover/url/s3/s3_file_url.py
Outdated
return s3_open(bucket_id=self.bucket, | ||
key_id=self.key, | ||
mode=mode, | ||
session=self._boto3_session) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
records_mover/url/s3/s3_file_url.py
Outdated
session=self._boto3_session) | ||
else: | ||
return s3_open(bucket_id=self.bucket, | ||
key_id=self.key, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
records_mover/url/s3/s3_file_url.py
Outdated
else: | ||
return s3_open(bucket_id=self.bucket, | ||
key_id=self.key, | ||
mode=mode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
records_mover/url/s3/s3_file_url.py
Outdated
return s3_open(bucket_id=self.bucket, | ||
key_id=self.key, | ||
mode=mode, | ||
client=self._boto3_session.client('s3')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E127 continuation line over-indented for visual indent
setup.py
Outdated
@@ -163,11 +163,11 @@ def initialize_options(self) -> None: | |||
# somewhere between much longer and forever to provide its output | |||
# without this line. | |||
# | |||
'rsa>=3.1.4,<=4.5.0', | |||
#'rsa>=3.1.4,<=4.5.0', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E265 block comment should start with '# '
tests/unit/url/test_s3_file.py
Outdated
@@ -8,10 +8,14 @@ def setUp(self): | |||
self.mock_S3Url = Mock(name='S3Url') | |||
self.mock_boto3_session = Mock(name='boto3_session') | |||
self.s3_file_url = S3FileUrl('s3://bucket/topdir/bottomdir/file', | |||
S3Url=self.mock_S3Url, | |||
boto3_session=self.mock_boto3_session) | |||
S3Url=self.mock_S3Url, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent
tests/unit/url/test_s3_file.py
Outdated
S3Url=self.mock_S3Url, | ||
boto3_session=self.mock_boto3_session) | ||
S3Url=self.mock_S3Url, | ||
boto3_session=self.mock_boto3_session) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E128 continuation line under-indented for visual indent
tests/unit/url/test_s3_file.py
Outdated
self.mock_s3_resource = self.mock_boto3_session.resource.return_value | ||
self.mock_s3_client = self.mock_boto3_session.client.return_value | ||
if SMART_OPEN_USE_SESSION: | ||
self.open_boto_args = { "session": self.mock_boto3_session } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E201 whitespace after '{'
tests/unit/url/test_s3_file.py
Outdated
self.mock_s3_resource = self.mock_boto3_session.resource.return_value | ||
self.mock_s3_client = self.mock_boto3_session.client.return_value | ||
if SMART_OPEN_USE_SESSION: | ||
self.open_boto_args = { "session": self.mock_boto3_session } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E202 whitespace before '}'
tests/unit/url/test_s3_file.py
Outdated
if SMART_OPEN_USE_SESSION: | ||
self.open_boto_args = { "session": self.mock_boto3_session } | ||
else: | ||
self.open_boto_args = { "client": self.mock_s3_client } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E201 whitespace after '{'
tests/unit/url/test_s3_file.py
Outdated
if SMART_OPEN_USE_SESSION: | ||
self.open_boto_args = { "session": self.mock_boto3_session } | ||
else: | ||
self.open_boto_args = { "client": self.mock_s3_client } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E202 whitespace before '}'
6812808
to
e4df4b7
Compare
Widen the dependency on smart_open and gracefully handle breaking changes to S3 support in newer versions