Xpra: Ticket #1568: python3

Tracker ticket for everything related to python3.

Split from #640 / #90. See also:



Mon, 10 Jul 2017 05:24:19 GMT - Antoine Martin: status, description changed


Mon, 10 Jul 2017 10:42:30 GMT - Antoine Martin:

Subcommands with python3:

Server bits are moved to their own ticket: #1571.


Mon, 10 Jul 2017 14:07:18 GMT - Antoine Martin: description changed


Mon, 10 Jul 2017 14:12:48 GMT - Antoine Martin: description changed


Tue, 18 Jul 2017 14:45:23 GMT - Antoine Martin:

nvenc fixes and dependency updates: r16399 + r16400 + r16401 (see ticket:1550#comment:14)


Thu, 20 Jul 2017 13:22:06 GMT - Antoine Martin: description changed


Fri, 11 Aug 2017 16:11:02 GMT - Antoine Martin:

Part of r16607 doesn't work on python3:

Warning: unable to override socket object
 SSL peek support will not be available
 module 'socket' has no attribute '_socketobject'

See #1504 for details.


Sun, 17 Sep 2017 16:14:27 GMT - Antoine Martin: description changed


Sun, 01 Oct 2017 18:36:37 GMT - Antoine Martin:

Lots of updates in r17015 + r17017. The shadow server is now usable with python3, only needs a few minor fixes:


Mon, 02 Oct 2017 08:39:03 GMT - Antoine Martin:

More updates and fixes:

Python3 shadow servers are now totally usable and fast. Not much left to fix here:

TODO:


Sat, 18 Nov 2017 09:57:22 GMT - Antoine Martin:

r17098 is wrong, the bug is still present in all GTK3 versions! Ctrl+C does not exit gtk app - absolutely amazing that such a fundamental issue has not been fixed in so many years. It does mean that we may be scheduling timers too often, which is why we exit the main loop and catch the signal. Worth looking into.


Sun, 26 Nov 2017 08:00:11 GMT - Antoine Martin:

Lots more fixes: r17498, r17507, r17509.


Sun, 03 Dec 2017 18:20:58 GMT - Antoine Martin: priority changed

Found a blocker bug with "de" keyboard layout and win32 clients: I can get a client crash just by pressing the first key to the right of the left shift key!

ERROR:../../pygobject-3.26.1/gi/pygi-argument.c:1004:_pygi_argument_to_object: code should not be reached

Why give a helpful warning when you can just crash the whole application, thanks GTK! sigh.


Thu, 07 Dec 2017 06:38:51 GMT - Antoine Martin:

Updates:

Some import warnings were completely hidden behind a generic message until I used this badly documented gem:

PYTHONWARNINGS='error::ImportWarning' python3 /usr/bin/xpra attach

The remaining warnings are:


Fri, 08 Dec 2017 18:06:04 GMT - Antoine Martin: description changed


Tue, 12 Dec 2017 16:52:44 GMT - Antoine Martin:

The signal handler has finally been fixed, it only took GTK ~7 years to fix a basic unix feature. Considering that other platforms (win32 and macos) are barely supported... wow. The changesets needed to pygobject are:

If these changes apply cleanly to the pygobject version in MSYS2, let's patch it.


Tue, 19 Dec 2017 00:18:30 GMT - Ray Donnelly:

Both those patches to GTK are from a very active MSYS2 developer so hopefully there'll be official packages sometime soon.


Sat, 28 Apr 2018 18:02:35 GMT - Antoine Martin:

Hit a concurrency error with python3, fixed in r19101. Problem is that there are likely many more like this one because they have changed the semantics of values(), keys() and items() on dictionaries. Major pain. Wherever we fix this by using a temporary list, we unnecessarily penalise python2. A version specific wrapper function would be better, but would still cost an extra function call.


Mon, 30 Apr 2018 06:57:16 GMT - Antoine Martin:

rpmbuild moans about those:

*** WARNING: mangling shebang in /usr/lib/cups/backend/xpraforwarder from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/libexec/xpra/auth_dialog from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
*** WARNING: mangling shebang in /usr/libexec/xpra/xdg-open from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

Sun, 24 Jun 2018 16:55:19 GMT - Antoine Martin:

Lots of GTK3 issues trying to fix deprecation warnings shown with PYTHONWARNINGS=all, some fixes in r19697, r19698, r19699, r19700, r19701.

Gtk.StatusIcon: the whole class is deprecated, ie: there is no direct replacement for this function. Oh great, good thing we're only using this on X11

Also found a crasher bug: #1886.


Mon, 02 Jul 2018 12:04:36 GMT - Antoine Martin:

Regarding comment:19, those shebangs get mangled by rpmbuild (see zfs commit : Exclude python scripts from RPM shebang check) prevents that: r19812.


Fri, 03 Aug 2018 13:31:13 GMT - Antoine Martin: attachment set

websockify 0.8 modified to run on python 3.7


Sun, 23 Sep 2018 05:30:13 GMT - Antoine Martin: milestone changed

See also: GTK4 #1977

A good summary of how bad the situation is with python3 strings vs bytes: The Python Unicode Mess


Mon, 25 Feb 2019 17:58:23 GMT - Antoine Martin:

See also #2121. SSL socket peek support is now properly fixed: r21877.


Fri, 08 Mar 2019 04:23:37 GMT - Antoine Martin: status changed; resolution set

Everything seems to work fine, including the proxy server (#2185).

The few remaining bits are things like #2195, which have their own ticket.


Wed, 05 Jun 2019 19:57:53 GMT - MayeulC:

Replying to Antoine Martin:

See also: GTK4 #1977

A good summary of how bad the situation is with python3 strings vs bytes: The Python Unicode Mess

Another good read is https://drewdevault.com/2017/01/13/The-problem-with-Python-3.html

The situation really isn't as bad as it is being painted there. Thank you for porting xpra to python3, hopefully I can now remove (again) python2 from my (wayland, sigh) system once the change trickles to the Arch packages :)


Thu, 06 Jun 2019 02:49:34 GMT - Antoine Martin:

Another good read is ​https://drewdevault.com/2017/01/13/The-problem-with-Python-3.html

Awful. The guy just doesn't get it. Please count the hundreds of pointless changesets we've had to make for python3 (still ongoing) and tell me again why this is "better".


Sat, 23 Jan 2021 05:27:56 GMT - migration script:

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