Hi,
Continuing work on researching Python 3 transition barriers:
Background:
Python 3.5 introduces async and await keywords for working with asynchronous generators and other possibilities. However, this poses a syntax issue for NVDA: nvwave.playWaveFile has "async" keyword, which, when run with Python 3.7, produces SyntaxError.
Steps to reproduce:
- Run Python 2.7 and 3.7 interpreters.
- Run the below code in both interpreters.
Code fragment:
async = True
Actual behavior:
In 2.7, the code works, but in 3.7, SyntaxError is raised.
Expected behavior:
Code should work in 3.7.
System configuration:
NVDA Installed/portable/running from source:
Not applicable
NVDA version:
Not applicable
Windows version:
Windows 10 Version 1803
Name and version of other software in use when reproducing the issue:
Python 2.7, 3.7
Other information about your system:
N/A
Other questions:
Does the issue still occur after restarting your PC?
Yes
Have you tried any other versions of NVDA?
N/A
Possible solution:
One possible solution is to rename the keyword "async" to "_async" or "asynchronous". I would vote for the latter option as it is a bit clear as to what that keyword does.
Impact:
Any module (including add-ons) that calls nvwave.playWaveFile with "async" set to True must now use the proposed keyword argument name, breaking compatibility with old NVDA releases.
Thanks.
Hi,
Continuing work on researching Python 3 transition barriers:
Background:
Python 3.5 introduces async and await keywords for working with asynchronous generators and other possibilities. However, this poses a syntax issue for NVDA: nvwave.playWaveFile has "async" keyword, which, when run with Python 3.7, produces SyntaxError.
Steps to reproduce:
Code fragment:
async = True
Actual behavior:
In 2.7, the code works, but in 3.7, SyntaxError is raised.
Expected behavior:
Code should work in 3.7.
System configuration:
NVDA Installed/portable/running from source:
Not applicable
NVDA version:
Not applicable
Windows version:
Windows 10 Version 1803
Name and version of other software in use when reproducing the issue:
Python 2.7, 3.7
Other information about your system:
N/A
Other questions:
Does the issue still occur after restarting your PC?
Yes
Have you tried any other versions of NVDA?
N/A
Possible solution:
One possible solution is to rename the keyword "async" to "_async" or "asynchronous". I would vote for the latter option as it is a bit clear as to what that keyword does.
Impact:
Any module (including add-ons) that calls nvwave.playWaveFile with "async" set to True must now use the proposed keyword argument name, breaking compatibility with old NVDA releases.
Thanks.