nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.09k stars 632 forks source link

Upgrade NVDA source code to Python 3.8 #10383

Closed dpy013 closed 3 years ago

dpy013 commented 4 years ago

Python 3.8 was released recently by the Python Software Foundation After upgrading python3.8, it is not possible to build NVDA using scons to generate the NVDA translation template

Steps to reproduce:

First update the latest python3.8 official release, then build NVDA using scons with the following errors: Python 3.7-32 not found! Installed Pythons found by py Launcher for Windows (venv) * -3.8-32 Requested Python version (3.7-32) not installed, use -0 for available pythons (py3) E:\Source\Repos\nvda>

Actual behavior:

Unable to build NVDA

Expected behavior:

Build errors

System configuration

NVDA installed/portable/running from source:

NVDA source

NVDA version:

no

Windows version:

windows10-1903

Name and version of other software in use when reproducing the issue:

no

Other information about your system:

python3.8-32

Other questions

Does the issue still occur after restarting your PC?

yes

Have you tried any other versions of NVDA? If so, please report their behaviors.

no thanks

josephsl commented 4 years ago

Hi, before we can move to any future Python version, all dependencies (or at least majority of them) must be satisfied, the most important ones being wxPython, Py2exe, and others. Thanks (please don’t close this issue for now).

dpy013 commented 4 years ago

thank @josephsl Thank y ou for your reply. I will not close this issue

LeonarddeR commented 4 years ago

Note that we currently rely on wxpython 4.0.3. Newer versions in the 4.0.x branch break accessibility. If 4.0.3 happens to be incompatible with Python 3.8, we probably have to wait until 4.1.0 is out.

josephsl commented 4 years ago

Hi, the current version is 4.0.6, so there is no way 4.0.3 can become compatible with Python 3.8 unless effort is spent doing so. In this case, I think it’d be best to see how 4.1.0 turns out unless there is a remote possibility to switch to PyQT or other GUI framework. Thanks.

dpy013 commented 4 years ago

hi josephsl Is it possible to use wxWidgets directly instead of wxpython, even though wxpython is based on wxWidgets thanks

Adriani90 commented 4 years ago

@dingpengyu what is your Argument for using that instead of WX Python?

dpy013 commented 4 years ago

@dingpengyu what is your Argument for using that instead of WX Python?

hi Adriani Using wxWidgets has the following benefits: 1 can significantly improve the speed of NVDA in the browsing settings window because wxWidgets is written in C++ The development of 2wxWidgets is very active. If there are bugs, it can be fixed very quickly. thanks

LeonarddeR commented 4 years ago

Note that WXPython is simply a wrapper around wxWidgets. In WX Python 4.1 and above, they will switch to the master branch of WXWidgets.

dpy013 commented 4 years ago

Note that WXPython is simply a wrapper around wxWidgets. In WX Python 4.1 and above, they will switch to the master branch of WXWidgets.

hi leonardder I would like to ask a question, if the wxpython layer is removed, will the speed of browsing the NVDA settings window directly be updated with wxWidgets? thanks

ghost commented 4 years ago

Wxpython takes full advantage of wxvidget's speed. Because the binding is C, C ++. It's not Python.

I don't think NVDA's settings menu is slow.

dpy013 commented 4 years ago

Wxpython takes full advantage of wxvidget's speed. Because the binding is C, C ++. It's not Python.

I don't think NVDA's settings menu is slow. hi destroyersboy This is true, using the latest NVDA alpha browsing settings interface is much faster than the original python2. But then again, NVDA's overall browsing speed still has a lot of room for improvement, and it is on a computer with a relatively low configuration.

ghost commented 4 years ago

I am using NVDA on 2 computers with SSDs and hard drives. i3 5005u, i5 6200u

I didn't see the problem for the settings interface in alpha versions created with Python3. Partly slower on my hard drive.

I don't know what's going on in the background. I just think, components that are critical to NVDA can be loaded into RAM when opening NVDA. There is no need to read data from the disc as the user panels navigate. Or some parts can be written with Cython.

Reading data from RAM is much more efficient than SSD and HDD. But this increases the use of RAM.

On the other hand, when python3 errors are fixed, maybe these speed issues will be solved.

Yours.

dpy013 commented 4 years ago

I am using NVDA on 2 computers with SSDs and hard drives. i3 5005u, i5 6200u

I didn't see the problem for the settings interface in alpha versions created with Python3. Partly slower on my hard drive.

I don't know what's going on in the background. I just think, components that are critical to NVDA can be loaded into RAM when opening NVDA. There is no need to read data from the disc as the user panels navigate. Or some parts can be written with Cython.

Reading data from RAM is much more efficient than SSD and HDD. But this increases the use of RAM.

On the other hand, when python3 errors are fixed, maybe these speed issues will be solved.

Yours.

hi destroyersboy No errors, just discussing how to make NVDA better.

josephsl commented 4 years ago

Hi,

Now that wxPython 4.1.0 development snapshot includes a Python 3.8 buildbot, I'm testing Python 3.8 upgrade compatibility. So far, the following issues are seen:

  1. Liblouis.dll: cannot be loaded unless the full path is specified, which should be resolvable if we use Python 3.8's DLL loading facility in ctypes.
  2. Espeak threading: should be resolvable (OneCore works).

For now I recommend folks do some personal research into Python 3.8, as porting cannot occur until wxPython 4.1.0 beta and Py2Exe are ready. Also I'm changing the title of this issue.

Thanks.

josephsl commented 4 years ago

Hi,

A formal version of the proposal is as follows:

Python 3.8 was released on October 14, 2019, bringing with it the following changes:

All of which will benefit NVDA and add-ons.

Prerequisites: NVDA 2019.3 must be released, wxPython 4.1.0 beta, Py2Exe version that supports Python 3.8 changes.

Migration plan: to be determined - no earlier than sometime in 2020.

Thanks.

josephsl commented 4 years ago

Blocks #10933

josephsl commented 4 years ago

Blocked by wxwidgets/phoenix#1592 due to Python complaining about inability to parse incorrect locale when wxPython 4.1.0 dev snapshot is used.

josephsl commented 4 years ago

Partly blocked by #11057.

dpy013 commented 3 years ago

Current

12075

It has been merged into master For these reasons I am going to close this issues.