Repository navigation
Fix ObjectStoragePath compatible with universal-pathlib 0.3.0 to avoid maximum recursion depth exceeded #56270
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 3 commits
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 |
|---|---|---|
|
|
@@ -294,7 +294,7 @@ def _cp_file(self, dst: ObjectStoragePath, **kwargs): | |
| # make use of system dependent buffer size | ||
| shutil.copyfileobj(f1, f2, **kwargs) | ||
|
|
||
| def copy(self, dst: str | ObjectStoragePath, recursive: bool = False, **kwargs) -> None: | ||
| def copy(self, dst: str | ObjectStoragePath, recursive: bool = False, **kwargs) -> None: # type: ignore[override] | ||
|
gopidesupavan marked this conversation as resolved.
|
||
| """ | ||
| Copy file(s) from this path to another location. | ||
|
|
||
|
|
@@ -413,5 +413,5 @@ def deserialize(cls, data: dict, version: int) -> ObjectStoragePath: | |
| def __str__(self): | ||
| conn_id = self.storage_options.get("conn_id") | ||
| if self._protocol and conn_id: | ||
| return f"{self._protocol}://{conn_id}@{self.path}" | ||
|
gopidesupavan marked this conversation as resolved.
|
||
| return f"{self._protocol}://{conn_id}@{self.parser.join(*self._raw_urlpaths)}" | ||
|
Member
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. Is this really the only options? Relying on a private method doesn't feel great. Could we do this instead:
It's much more verbose, and opaque, yes, but it doesn't depend on accessing a "private" method?
Contributor
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. As per your comment below, we should likely restrict 0.3.0 and use this library properly |
||
| return super().__str__() | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we normally don't use ignores unless absolutely necessary as ignores don't really fix stuff but just hide the issue.
isn't there a way to fix without ignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tbh i dont have any idea the super class signature is like this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calling for the expert @uranusjr
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay i removed that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didnt worked mypy still not happy