Skip to content

[s3] Feature request: handle s3 url object versionId specifier #595

@mtesch-um

Description

@mtesch-um

Feature description

  • What are you trying to achieve?

interoperability w/ url-like file specifiers that have the object version encoded in the path as ?versionId=...

  • What is the expected result?

this would return the correct version: smart_open('s3://buckety/pathy-like-path.txt?versionId=12345')

s3fs does this nicely: https://s3fs.readthedocs.io/en/latest/api.html#s3fs.core.S3FileSystem.split_path

  • What are you seeing instead?

smart_open doesn't know that ? can not be in an s3 key (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html), or that versionId is a valid url-parameter, so instead this type of open fails.

Checklist

Before you create the issue, please make sure you have:

  • Described the problem clearly
  • Provided a minimal reproducible example, including any required data
  • Provided the version numbers of the relevant software

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wantedWe can't figure this out, if you can, then please help!

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions