You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/04/07 17:22:01 UTC
[GitHub] [airflow] dstandish commented on a change in pull request #15232: S3Hook.load_file should accept Path object in addition to str
dstandish commented on a change in pull request #15232:
URL: https://github.com/apache/airflow/pull/15232#discussion_r608849164
##########
File path: airflow/providers/amazon/aws/hooks/s3.py
##########
@@ -494,6 +495,7 @@ def load_file(
uploaded to the S3 bucket.
:type acl_policy: str
"""
+ filename = filename.as_posix() if isinstance(filename, Path) else filename
Review comment:
thanks @uranusjr
> what is the semantic meaning of filename here, a file on the local filesystem, or a path in the S3 bucket?
it means path to local file
> If it’s the latter, this should be Union[str, PurePosixPath] instead, and just use str() for coercion.
did you perhaps mean former?
--
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:
users@infra.apache.org