-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: update deprecations #177
Conversation
Pull Request Test Coverage Report for Build 9718124559Details
💛 - Coveralls |
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.
Ah, I like this. Should this replace the warning.warn
calls? I believe the decorator also raises a warning.
Pull Request Test Coverage Report for Build 9725896976Details
💛 - Coveralls |
Signed-off-by: nstarman <[email protected]>
Pull Request Test Coverage Report for Build 9753685972Details
💛 - Coveralls |
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.
LGTM. I'm happy to discover about typing_extensions.deprecated
.
By the way @wesselb , a thing that always bothered me about plum is that we have a severely polluted namespace and several modules exposed which are unclear how public they are:
In [1]: import plum
In [2]: plum.[/tab/tab]
deactivate_union_aliases() dispatcher get_context() isinstance() List multihash()
Dict Function get_overloads() issubclass() method NotFoundLookupError
< dispatch function is_faithful() Kind Missing overload() >
Dispatcher get_class() is_in_class() kind() ModuleType parametric()
I think one thing that might be helpful down the line would be to move everything to a _src
module, and expose just few things in the main namespace...
@PhilipVinc Hmmm, you’re totally right. It would be considerable improvement to better structure what’s exported where. I agree that the namespace currently is polluted. I’ve noted this down! Thanks! :) @nstarman, thanks for yet another super clean PR!! I really do appreciate the many small, very well structured PRs. You’ve contributed a lot of improvements lately. :) This also looks great, so merging right away. |
After #175 and #173 were / will be merged I took a look and noticed some small improvements.
This PR moves
Val
out of__all__
and applies the https://peps.python.org/pep-0702/deprecated
decorator to make the deprecations visible to static analyzers.Hm. Maybe I should move the stuff from here to #173 ?
Also, this PR is a good example of why the
edit
button on files in GH is not a great way to make a PR.