/Users/sanhehu/Documents/GitHub/polars_aws-project/polars_aws/s3/_write_parquet.py:56: UserWarning: Polars found a filename. Ensure you pass a path to the file instead of a python file object when possible for best performance.
df.write_parquet(f, **kwargs)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Issue description
I am following the code in https://docs.pola.rs/user-guide/io/cloud-storage/#writing-to-cloud-storage, how ever, it still raises the "UserWarning: Polars found a filename. Ensure you pass a path to the file instead of a python file object when possible for best performance." warning. I guess it's because the example doesn't match the polars recommended best practice.
I'm not sure if gcs and s3 open file objects have fs attribute but files opened with adlfs have fs. If the other two do then I think we can just add a check here
Checks
Reproducible example
Log output
Issue description
I am following the code in https://docs.pola.rs/user-guide/io/cloud-storage/#writing-to-cloud-storage, how ever, it still raises the "UserWarning: Polars found a filename. Ensure you pass a path to the file instead of a python file object when possible for best performance." warning. I guess it's because the example doesn't match the polars recommended best practice.
Expected behavior
Should not have warning
Installed versions