Skip to content

.parents returns an empty path as the last element #525

@Koncopd

Description

@Koncopd

Another attempt to upgrade.

from upath import UPath
filepath = UPath("s3://lamindb-ci/test-data/Species.csv")
filepath.parents
# on 0.3.7
>>(S3Path('lamindb-ci/test-data', protocol='s3'), S3Path('lamindb-ci/', protocol='s3'), S3Path('', protocol='s3'))
list(filepath.parents) # on 0.2.6
>> [S3Path('s3://lamindb-ci/test-data'), S3Path('s3://lamindb-ci/')]

This looks like a bug to me. Or is this intended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions