FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add private API retrieving the current event loop and backend GUI info. by anntzer · Pull Request #11520 · matplotlib/matplotlib · GitHub

Repository navigation

Add private API retrieving the current event loop and backend GUI info. - #11520

Merged
jklymak merged 1 commit into
matplotlib:masterfrom
anntzer:getcurrenteventloop
Jul 4, 2018
Merged

jklymak merged 1 commit into
matplotlib:masterfrom
anntzer:getcurrenteventloop

Conversation

anntzer commented Jun 27, 2018

Copy link
Copy Markdown
Contributor

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, or
not...

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

anntzer added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jun 27, 2018
anntzer added this to the v3.0 milestone Jun 27, 2018
Comment thread lib/matplotlib/backends/__init__.py Outdated
if not line.startswith(' File "<frozen importlib._bootstrap'))


def _get_current_event_loop():

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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()).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done, see below.

Copy link
Copy Markdown
Member

I like the direction this is heading.

anntzer force-pushed the getcurrenteventloop branch from f1e925f to 8bb7bea Compare June 29, 2018 22:12

anntzer commented Jun 29, 2018 •
edited
Loading

Copy link
Copy Markdown
Contributor Author

Comment handled, and documented the required_interactive_framework global.

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...
anntzer force-pushed the getcurrenteventloop branch from 8bb7bea to 93ebee6 Compare June 30, 2018 12:54

efiring left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I don't understand every detail, but overall it looks fine, and I don't see how it could hurt anything.

jklymak merged commit d762d6d into matplotlib:master Jul 4, 2018
anntzer deleted the getcurrenteventloop branch July 4, 2018 18:13
tacaswell mentioned this pull request Jul 8, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL