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
DM-33204: Add deprecation warning for ButlerURI #629
Conversation
3a0f53c
to
502302f
Compare
Codecov Report
@@ Coverage Diff @@
## main #629 +/- ##
=======================================
Coverage 84.11% 84.12%
=======================================
Files 237 237
Lines 30050 30075 +25
Branches 4990 4996 +6
=======================================
+ Hits 25277 25301 +24
Misses 3635 3635
- Partials 1138 1139 +1
Continue to review full report at Codecov.
|
502302f
to
17829e4
Compare
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.
I don't really have an opinion about whether this is better or worse than no deprecation warning at all, but I don't have any better ideas. I spent a few minutes researching import hooks in the hopes of finding a way to emit a warning when the symbol is imported or accessed as an attribute of a module, but came up empty-handed.
17829e4
to
9b4672b
Compare
There can't possibly be many ButlerURI users out in the wild so this should be fine even if it's a bit convoluted. |
9b4672b
to
df9941f
Compare
This implementation does not currently support people using `isinstance(uri, ButlerURI)` since it always returns a ResourcePath.
This change inserts ButlerURI into the ResourcePath class inheritance by repointing the base class.
a150f4f
to
96c6f0e
Compare
Looks like I can't merge this until |
|
I'll take a quick look at that. |
The code is a bit hairy...
@TallJimbo let me know if you have any better ideas, especially regarding the subclasses trying to instantiate something.
Checklist
doc/changes