-
Notifications
You must be signed in to change notification settings - Fork 42
Fix python311 compatibility #69
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
Changes from all commits
f9471b7
20b54f1
b1c5680
0ca1000
3d95df3
ade3203
8ee5c4c
1a259ae
b565cf9
acbde35
e40c8e6
4366b97
203cda7
7f4cb5d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,15 @@ def touch(self, path, **kwargs): | |
kwargs.pop("truncate", None) | ||
super().touch(path, **kwargs) | ||
|
||
def mkdir(self, path, create_parents=True, **kwargs): | ||
pth = self._format_path(path) | ||
if create_parents: | ||
return self._fs.makedirs(pth, **kwargs) | ||
else: | ||
if not kwargs.get("exist_ok", False) and self._fs.exists(pth): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not put There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm using the function signature defined in the base accessor cls previously defined in #59 I don't think it's worth cleaning this up a lot, since (1) it's a private interface and (2) all of this has to be refactored again once the remaining pathlib changes land in python=3.12. |
||
raise FileExistsError | ||
return self._fs.mkdir(pth, create_parents=create_parents, **kwargs) | ||
|
||
|
||
class HDFSPath(upath.core.UPath): | ||
_default_accessor = _HDFSAccessor |
Uh oh!
There was an error while loading. Please reload this page.