Re: IMPORTANT: porting notes for Python 3.8/NVDA 2021.1


 

Well, before we even decide on that we need to figure all the issues with addons access, the fact addon update can't automatically update its list of addons whenever a new one or new update is added etc.



On 31/01/2021 5:12 pm, Joseph Lee wrote:

Hello NVDA add-ons community,

The following should be considered a major advisory and should be applied as soon as possible (this isn’t a critical advisory where you need to take immediate action):

A few days ago Reef Turner from NV Access announced that upcoming NVDA version (2021.1) is targeting Python 3.8. Based on initial tests with Project Walrus builds sent out last year, moving NVDA from Python 3.7 to 3.8 is a bit easier than 2019 when we moved from Python 2 to 3 (NVDA 2019.3; you may recall all sorts of discussions about it then). However, there are some gotchas you need to be aware of, and I advise applying changes marked as “required” as soon as possible in order to minimize disruptions caused by add-on unavailability:

  • Python C extensions (required if using pyd files): if your add-on uses Python modules with C extensions (.pyd files), you MUST use C extensions designed for Python 3.8. If you need to support NVDA 2019.3 and 2020.x alongside 2021.1, you must include both Python 3.7 and 3.8 pyd files because Python 3.8 will not load Python 3.7 C extensions. The most prominent add-on affected is Resource Monitor (not anymore; see notes).
  • threading.Thread.isAlive (required): if you are creating threads through threading.Thread and wish to check if a thread is alive, you must now use threading.Thread.is_alive instead of threading.Thread.isAlive. This affects several add-ons, including StationPlaylist (see notes).

 

Notes:

  • Resource Monitor: no action required – in fact, it is the first add-on to support Python 3.8 and 3.9 (C extensions for 3.7, 3.8, and 3.9 for Psutil are included with this add-on).
  • StationPlaylist: no action required – mitigations in place since early 2020.
  • The above porting notes can change if NVDA ships with newer dependencies such as wxPython.

 

Just like we did with NVDA 2019.3, I advise add-on authors to publish their add-ons’ readiness for NVDA 2021.1 once 2021.1 beta 1 is released.

Cheers,

Joseph

Join nvda-addons@nvda-addons.groups.io to automatically receive all group messages.