universal_pathlib
universal_pathlib copied to clipboard
`.parents` returns an empty path as the last element
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?
Thanks for reporting @Koncopd !
This does indeed look like a bug and needs additional tests for .parents in the JoinablePath base test suite.