You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for reporting! That's definitely a bug. I'll try to get a out a fixed version on the weekend.
Could you describe your use case for hashable UPath instances?
Are you using them as keys in a mapping to associate other data to the instance?
Note:
In v0.1.4__hash__ was using pathlib's implementation, which means it just relied on .parts (or ._cparts). So while UPath instances are hashable in v0.1.x, it might not be the hash you want.
Yeah the current use case is using it in a dict so we can associate it with other data but also using @cache on a function which has a UPath as a parameter.
Good to know about the current hash implementation; in the mapping scenario this won't be a problem as the paths will always have the same protocol but this could be an issue when they're used in the memoization as that function will get a mix of protocols that may have the same path.
Python v3.11
version 0.1.4 of upath:
version 0.2.0 of upath:
The text was updated successfully, but these errors were encountered: