Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DOC: fix broken link to wxPython Widget Inspection Tool#31535

Merged
timhoffm merged 3 commits intomatplotlib:mainfrom
Pedrom2002:doc-fix-wxpython-inspection-link
Apr 23, 2026
Merged

DOC: fix broken link to wxPython Widget Inspection Tool#31535
timhoffm merged 3 commits intomatplotlib:mainfrom
Pedrom2002:doc-fix-wxpython-inspection-link

Conversation

@Pedrom2002
Copy link
Copy Markdown
Contributor

PR summary

One of the broken links collected in #30306: the URL
http://wiki.wxpython.org/Widget%20Inspection%20Tool in the
embedding_in_wx5_sgskip gallery example now returns 404 (the old
wxPython 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.inspection module.

PR checklist

  • Link replacement verified (new URL returns 200, old URL returns 404).
  • No code change; only a comment URL is updated.

The wiki.wxpython.org URL returns 404. Point readers to the current
official documentation at docs.wxpython.org instead.

Refs matplotlib#30306.
@github-actions github-actions Bot added the Documentation: examples files in galleries/examples label Apr 20, 2026
@QuLogic
Copy link
Copy Markdown
Member

QuLogic commented Apr 20, 2026

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.

@Pedrom2002
Copy link
Copy Markdown
Contributor Author

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:

  • Expand the comment in the example itself to briefly say what the tool actually does (lets you browse the live widget/sizer tree, inspect properties, poke around in the app's namespace) and keep the docs link as a secondary reference. That way the useful bit lives in the file and doesn't rot.

  • Leave the docs.wxpython.org link as-is, accepting it's a bit drier than the original.

  • Or just close this and leave the 404 tracked in [Doc]: Broken links to fix in docs #30306 until something better shows up.

My instinct is the first one, but I'm happy to go whichever way you think fits matplotlib's style better.

@timhoffm
Copy link
Copy Markdown
Member

I think the regular code should contain wx.App.

Add a .. tip:: below the example to explian that InspectableApp can be useful for debuggin.

@Pedrom2002
Copy link
Copy Markdown
Contributor Author

I think the regular code should contain wx.App.

Add a .. tip:: below the example to explian that InspectableApp can be useful for debuggin.

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.
Comment on lines +8 to +13
: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>`_.
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.

Suggested change
: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.

Copy link
Copy Markdown
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

Sorry premature approval.

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.
@github-actions github-actions Bot added the Documentation: build building the docs label Apr 22, 2026
@timhoffm timhoffm merged commit 60383ac into matplotlib:main Apr 23, 2026
25 checks passed
@QuLogic QuLogic added this to the v3.11.0 milestone Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: build building the docs Documentation: examples files in galleries/examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants