Xpra: Ticket #1878: python 3.7 support

Python 3.7 is due to be released soon: Python 3.7.0rc1, there are a number of things we can take advantage of, some may allow us to drop existing workarounds.

The most interesting features:



Tue, 10 Jul 2018 15:14:23 GMT - Antoine Martin:

Eventually, it would be nice to be able to compile with the new buffer interface and avoid deprecation warnings like #1884.

In the meantime:

New problem: OpenGL_accelerate doesn't build - see #1883.


Tue, 10 Jul 2018 15:38:48 GMT - Antoine Martin: priority, status, milestone changed

There's a major blocker with cx_freeze, once again falling flat on its face. Looks like it does not support python 3.7 yet, and this also affects pyinstaller: zipimport.ZipImportError: can't find module 'encodings'.

$ ./Xpra_cmd.exe attach tcp:192.168.1.5:10000
Fatal Python error: init_sys_streams: can't initialize sys standard streams
zipimport.ZipImportError: can't find module 'io'

Moving the missing modules by hand into the "library.zip" doesn't really help and the resulting executable still fails with:

$ ./Xpra_cmd.exe attach tcp:192.168.1.5:10000
zipimport.ZipImportError: can't find module '__startup__'

BTW, those modules were already hard-coded in setup.py to workaround existing cx_freeze breakage:

            #hopefully, cx_Freeze will fix this horror:
            #(we shouldn't have to deal with DLL dependencies)
            import site
            lib_python = os.path.dirname(site.getsitepackages()[0])
            lib_dynload_dir = os.path.join(lib_python, "lib-dynload")
            add_data_files('', glob.glob("%s/zlib*dll" % lib_dynload_dir))
            for x in ("io", "codecs", "abc", "_weakrefset", "encodings"):
                add_data_files("lib/", glob.glob("%s/%s*" % (lib_python, x)))

That's amongst a few other workarounds (base_prefix, numpy, etc)


Tue, 10 Jul 2018 16:02:37 GMT - Antoine Martin: priority, description changed

cx_freeze can be fixed with this patch: Compilation correct .pyc files for Python 3.7.0

Created a mingw ticket for this: cx_Freeze for python3.7 needs a patch - bytecode is unusable


Thu, 09 Aug 2018 13:08:51 GMT - Antoine Martin: status changed; resolution set

The MSYS2 package has been updated with the patch and we have workarounds for the rest.


Fri, 21 Sep 2018 06:26:19 GMT - Antoine Martin:

One of the few noisy deprecation warnings left is from Fix collections ABCs deprecation warning).


Sun, 23 Sep 2018 05:14:13 GMT - Antoine Martin:

For websockify, see attachment/ticket/1568/websockify-0.8-py37.tar.xz


Sat, 23 Jan 2021 05:36:11 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1878