pitrou commented on a change in pull request #7803:
URL: https://github.com/apache/arrow/pull/7803#discussion_r465782709
##########
File path: python/pyarrow/_s3fs.pyx
##########
@@ -105,9 +105,14 @@ cdef class S3FileSystem(FileSystem):
raise ValueError(
'Cannot pass anonymous=True together with access_key '
'and secret_key.')
+
+ if session_token is None:
+ session_token = ""
+
options = CS3Options.FromAccessKey(
tobytes(access_key),
- tobytes(secret_key)
+ tobytes(secret_key),
+ tobytes(session_token)
Review comment:
If `session_token` is only used when either `access_key` or `secret_key`
is given, then an error should be raised when `session_token and access_key is
None and secret_key is None`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]