Skip to content

Conversation

@XLTechie
Copy link
Collaborator

@XLTechie XLTechie commented May 10, 2024

Link to issue number:

None

Summary of the issue:

The monkeypatch for wx.CallAfter didn't indicate wrapping.

>>> import wx
>>> help(wx.CallAfter)
Help on function wx_CallAfter_wrapper in module monkeyPatches.wxMonkeyPatches:

wx_CallAfter_wrapper(func, *args, **kwargs)

Description of user facing changes

None

Description of development approach

Imported wraps from functools, and added @wraps to the wrapper.
From a build after the modification:

>>> import wx
>>> help(wx.CallAfter)
Help on function CallAfter in module wx.core:

CallAfter(callableObj, *args, **kw)
    Call the specified function after the current and pending event
    handlers have been completed.  This is also good for making GUI
    method calls from non-GUI threads.  Any extra positional or
    keyword args are passed on to the callable when it is called.

Also converted the apply() function's comment into a docstring.

Testing strategy:

Ran with the fix in a portable copy of NVDA.
I found no difficulties.

Known issues with pull request:

I do not know what original STR prompted the wrapping of this callable. As far as I can tell, it was originally introduced in 528d570, but there is no commit message for this change.

Did some issue/pr searches, but couldn't find any reasoning there either. So I don't know what caused the wrapping, to test that specifically. Do you remember, @michaelDCurran?

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

@XLTechie XLTechie marked this pull request as ready for review May 13, 2024 03:30
@XLTechie XLTechie requested a review from a team as a code owner May 13, 2024 03:30
@XLTechie XLTechie requested a review from SaschaCowley May 13, 2024 03:30
@seanbudd seanbudd merged commit 7b17eab into nvaccess:master May 13, 2024
@XLTechie XLTechie deleted the wxCallAfterWrapperFix branch May 14, 2024 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants