-
Notifications
You must be signed in to change notification settings - Fork 168
NEW: Add Event to public API #501
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
Conversation
Downstream packages that want to use Event to type hint their APIs should be able to import Event without accessing private modules.
f039f14
to
9449cab
Compare
Force-pushed to rebase on latest main. |
btw we are on code freeze now, we could try to squeeze this in if it does not impact functionality and is an easy fix.
What are your thoughts on
This was not done because I worried that people just try to construct them directly, as they are not meant to be an entry point of this module. However, it does feel weird that important objects like these are not explicitly documented, and it takes a few clicks to get to their docs. Typing is one of the straws, too, if not the last. |
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.
Looks good to me.
/ok to test |
This comment has been minimized.
This comment has been minimized.
Per offline chat with @leofang: I'll merge this now and will work on api.rst changes separately, after we lift our code freeze. |
|
I think this is the main issue. Objects like |
I agree (based on offline chat, I think Leo, too). Did you see my previous comment? — "I'll merge this now and will work on api.rst changes separately, after we lift our code freeze." I'll send that PR to you for review. |
Yes. I was just expressing my agreement. No rush from me on this. I didn't even expect this PR to be merged until next month.
I'd be happy to review that. |
Oh, I assumed that it's helpful to you (and in general) to have public access to |
Downstream packages that want to use
Event
to type hint their APIs should be able to importEvent
without accessing private modules.#469 (comment)
I understand that
Event
s should not be constructed directly, but having__new__()
raise a RuntimeError should be sufficient to prevent that.