-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use local Unix paths with Pathy #87
Comments
This is a bug in spacy. I ran into the same issue when trying to use local remote storage for testing, see explosion/spaCy#11762. |
Sorry for the late reply, @b2m, you should use Pathy.fluid when you are working with a path of an unknown type. You could alternatively use the pathlib.Path class if you want to explicitly represent a unix path. |
- this addresses concerns around initializing Pathy paths with unix and windows absolute paths. The correct way to initialize these paths is to use Pathy.fluid. - raise an error if an absolute system path is given when initializing Pathy objects - fixes #87 BREAKING CHANGE: Previously Pathy would allow you to initialize Pathy instances with absolute system paths (unix and windows). Now Pathy raises a ValueError if given an absolute system path that suggest using Pathy.fluid instead.
I've thought about this some more, and I think there should be an error if you initialize Changes coming in #95 |
# [0.9.0](v0.8.1...v0.9.0) (2022-11-22) ### Bug Fixes * **blob:** properly initialize default last_modified ([d831bee](d831bee)) * **windows:** consistent path separator in resolve ([44f5ca0](44f5ca0)) * **windows:** file:/// paths had the wrong suffix ([674a109](674a109)) * **windows:** return None owner on windows where not implemented ([abd28c4](abd28c4)) ### Features * **Pathy:** raise error when not using Pathy.fluid for absolute paths ([e7f4e73](e7f4e73)), closes [#87](#87) * **windows:** add windows CI test execution ([504823d](504823d)) ### BREAKING CHANGES * **Pathy:** Previously Pathy would allow you to initialize Pathy instances with absolute system paths (unix and windows). Now Pathy raises a ValueError if given an absolute system path that suggest using Pathy.fluid instead.
🎉 This issue has been resolved in version 0.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Context
spaCy is describing on it's website that it can store project data either locally or remotely using Pathy.
Example Paths from the spaCy's documentation:
But using local paths like
/mnt/scratch/cache
does not work.Problem
Using a local Unix path currently seems not to be supported by Pathy.
I modified the example code from the project's README;
This will result in a
PermissionError: [Errno 13] Permission denied: '/test'
.Note the missing
/tmp
part in the path!So I am wondering, whether using
Pathy('/some/unix/path')
should be discouraged in favor ofPathy.fluid('/some/unix/path')
or whether this is a bug in Pathy.Possibly related issues:
The text was updated successfully, but these errors were encountered: