nvwave.playWaveFile: async > asynchronous#8647
Conversation
| fileWavePlayerThread=None | ||
| def playWaveFile(fileName, async=True): | ||
| def playWaveFile(fileName, asynchronous=True): | ||
| """plays a specified wave file. |
There was a problem hiding this comment.
May be add information about parameters to the doc string while at it?
|
Hi, shall be done. Thanks for catching this.
|
|
Hold off until @feerrenrut has finished add-on versioning. |
|
@michaelDCurran commented on 5 Oct 2018, 09:10 CEST:
Think we're good to go now. |
|
I've changed the base branch on this back to master, since it doesn't break compatibility with python 2, or introduce any risky changes there. Merging to master reduces the number of things that may require merging. Thinking about risk, is it possible for this name change to affect add-ons? |
|
Hi, not that I know of. Thanks.
|
|
@feerrenrut commented on 13 May 2019, 19:11 CEST:
Note that all code that passes async as a keyword argument will fail after merging this. While I can't think of any add-ons that utilize this code, I'd be very reluctant to merge this into a Python 2 version of NVDA if i wanted to make sure that i wouldn't break things. Note that there's nothing wrong with breaking things like this if we agree that we don't care. |
Yes, I think this introduces too much unnecessary risk. Python 3 migration is going to break add-ons anyway, so we will direct this risk there. I will re-target this PR. |
|
Hi, yep, thanks for rebasing it (I’ll merge in Threshold then). Thanks.
|
Python 3.5 introduces 'async' and 'await' keywords to deal with asynchronous generators and other possibiliites. Since Python 3.7, use of these keywords as variable names is no longer allowed. In NVDA code, nvWave.playWaveFile is affected, so rename 'async' to 'asynchronous'.
Reviewed by Leonard de Ruijter (Babbage): document the renamed keyword arg.
|
Hi, Conflict resolved and is ready for another round of review. Steps taken:
Thanks. |
Link to issue number:
Fixes #8607
Summary of the issue:
Change async argument in nvwave.playWaveFile to asynchronous.
Description of how this pull request fixes the issue:
Python 3.5 introduces 'async' and 'await' keywords to deal with asynchronous generators and other possibilities. Since Python 3.7, use of these keywords as variable names is no longer allowed. In NVDA code, nvWave.playWaveFile is affected, so rename 'async' to 'asynchronous'.
Testing performed:
Compiled and tested various code paths that calls nvwave.playWaveFile with the new keyword arguments.
Known issues with pull request:
Any add-on that sets "async" argument to True will be affected.
Change log entry:
Changes for developers:
The "async" argument in nvwave.playWaveFile has been renamed to "asynchronous". Add-ons that relied on this name should be modified to use the new argument name. (#8607)