Comments (1)
There is a difference between fsspec glob syntax and pathlib glob syntax, as noted in the example notebook (link added):
The
glob
method is also available for most filesystems. Note the syntax here is as detailed infsspec
docs, rather than that ofpathlib
.
The fsspec implementation has some issues, see fsspec/filesystem_spec#1019, which seems like it may be the root cause.
Based on some limited testing, the pattern /**/*
seems to be treated by fsspec as an absolute path within the bucket, so it may only be a circumstantial work around if you are operating at the root of the bucket, and pathlib doesn't even accept the pattern because it says only relative patterns are accepted. There is possibly a separate bug in fsspec, because the resulting paths are incorrectly assembled.
Open PR #96 includes an improved rglob
, which might be a better work around for this issue once it gets merged.
I think that addressing the issues mentioned here should happen in the fsspec implementation. I am not sure if the fsspec behavior is intended to differ from pathlib. If not, then fixing that is what is needed, but if the difference is intended, then maybe some consideration ought to be given to implementing a more pathlib compliant approach here, and I could see reasons to go either way.
Hope this helps.
from universal_pathlib.
Related Issues (20)
- Adhere to semver and add a changelog
- UPath broken in Python 3.11
- The noxfile has to be changed to support newer nox versions
- UPath with_name, with_stem, with_suffix is broken
- Handling of absolute file:// paths HOT 6
- mkdir does not respect exist_ok when parents is set to True
- Accessing the underlying filesystem HOT 8
- URI paths are incorrectly parsed as posix paths HOT 3
- Updating admins/maintainers HOT 3
- Use `urllib.parse.urljoin` when joining paths HOT 5
- Support for data URI scheme? HOT 5
- Should `UPath.__new__` return `pathlib.Path` instances for local paths HOT 16
- Should the `UPath` public class API be identical to the public `pathlib.Path` class API HOT 2
- URI query component is ignored when opening a file HOT 5
- Inconsistency with Path HOT 3
- `joinpath` does not update url
- Refactor tests HOT 3
- Updating package dev tools HOT 4
- Add ability to register custom UPath implementations HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from universal_pathlib.