-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add private API retrieving the current event loop and backend GUI info. #11520
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
lib/matplotlib/backends/__init__.py
Outdated
@@ -14,6 +16,49 @@ | |||
if not line.startswith(' File "<frozen importlib._bootstrap')) | |||
|
|||
|
|||
def _get_current_event_loop(): |
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.
This should be something like _get_interactive_framework_name
. _get_current_event_loop
makes me think it will return to me an object I can use as an event loop (ala asyncio.get_event_loop()
).
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.
Done, see below.
I like the direction this is heading. |
f1e925f
to
8bb7bea
Compare
Comment handled, and documented the edit: As for tests, I'll probably have something globally testing switchability once everything gets in (e.g. together with the last commit). |
Work towards implementation of backend switching. Note that the API is kept private for now as the lack of extensibility is a bit unsatisfying; perhaps we'll figure out a better way to do it if other custom implementers (e.g., code editors?) get interested in looking into it. The `required_event_loop` variable could be made private for now, or not...
8bb7bea
to
93ebee6
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 understand every detail, but overall it looks fine, and I don't see how it could hurt anything.
Work towards implementation of backend switching (#9795).
Note that the API is kept private for now as the lack of extensibility
is a bit unsatisfying; perhaps we'll figure out a better way to do it
if other custom implementers (e.g., code editors?) get interested in
looking into it.
The
required_event_loop
variable could be made private for now, ornot...
PR Summary
PR Checklist