DOC: fix broken link to wxPython Widget Inspection Tool#31535
DOC: fix broken link to wxPython Widget Inspection Tool#31535timhoffm merged 3 commits intomatplotlib:mainfrom
Conversation
The wiki.wxpython.org URL returns 404. Point readers to the current official documentation at docs.wxpython.org instead. Refs matplotlib#30306.
|
I don't think this new link is as informative as what was in the old one. The old one points to a suggested wiki page looks better. |
Thanks for the feedback. You're right that the wx.lib.inspection page is really just the API reference, it doesn't give you the same "what is this thing and why should I care" feel that the old wiki page had. I did try to rescue the original link through the Wayback Machine before opening this, but it turns out the old wxPython wiki was never archived. So that content seems genuinely gone, and since the wiki itself is defunct there's no way to contribute a replacement there either. A few ways I could go from here:
My instinct is the first one, but I'm happy to go whichever way you think fits matplotlib's style better. |
|
I think the regular code should contain Add a |
Sounds good, pushing that now. |
Per review feedback, the regular example now uses wx.App() directly so readers see the standard wxPython entry point without any debug-only machinery. A .. tip:: directive in the module docstring describes wx.lib.mixins.inspection.InspectableApp as an optional debugging aid and links to the wx.lib.inspection documentation (which replaces the now-dead wiki URL). The wx.lib.mixins.inspection import is removed since it is no longer referenced from the example code.
| :class:`wx.lib.mixins.inspection.InspectableApp` is a drop-in | ||
| replacement for :class:`wx.App` that opens an inspection window | ||
| letting you browse the live widget and sizer tree. It is a useful | ||
| debugging aid when embedding Matplotlib in wxPython. See the | ||
| `wx.lib.inspection documentation | ||
| <https://docs.wxpython.org/wx.lib.inspection.html>`_. |
There was a problem hiding this comment.
| :class:`wx.lib.mixins.inspection.InspectableApp` is a drop-in | |
| replacement for :class:`wx.App` that opens an inspection window | |
| letting you browse the live widget and sizer tree. It is a useful | |
| debugging aid when embedding Matplotlib in wxPython. See the | |
| `wx.lib.inspection documentation | |
| <https://docs.wxpython.org/wx.lib.inspection.html>`_. | |
| As a development and debugging aid, you can replace :class:`wx.App` | |
| by :class:`wx.lib.mixins.inspection.InspectableApp`. | |
| This adds the capability to start the `Widget Inspection Tool | |
| <https://wiki.wxpython.org/How%20to%20use%20Widget%20Inspection%20Tool%20-%20WIT%20%28Phoenix%29>`_ via :kbd:`Ctrl-Alt-I`. |
Note: if you want to cross-reference the wx classes, you have to add the respective intersphinx_mapping. Alternatively, turn them into literals.
Rewrite the .. tip:: in the wx5 example with the wording proposed in review, and add a wx intersphinx mapping entry so the :class:`wx.App` and :class:`wx.lib.mixins.inspection.InspectableApp` cross-references resolve under nitpicky docs builds.
PR summary
One of the broken links collected in #30306: the URL
http://wiki.wxpython.org/Widget%20Inspection%20Toolin theembedding_in_wx5_sgskipgallery example now returns 404 (the oldwxPython wiki is defunct).
The current equivalent is on the official wxPython documentation:
https://docs.wxpython.org/wx.lib.inspection.html — which returns 200
and documents the same
wx.lib.inspectionmodule.PR checklist