Tracker ticket for everything related to python3.
Split from #640 / #90. See also:
Subcommands with python3:
Server bits are moved to their own ticket: #1571.
nvenc fixes and dependency updates: r16399 + r16400 + r16401 (see ticket:1550#comment:14)
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.
Lots of updates in r17015 + r17017. The shadow server is now usable with python3, only needs a few minor fixes:
RuntimeError: dictionary changed size during iteration
in cancel_damage
: for sequence in self.statistics.encoding_pending.keys():
More updates and fixes:
Python3 shadow servers are now totally usable and fast. Not much left to fix here:
TODO:
ForkingMixIn
)
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.
Lots more fixes: r17498, r17507, r17509.
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.
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:
from __future__ import absolute_import
to the pyx files doesn't work, it breaks somewhere else trying to cimport withoud pxd files (how is that supposed to work!?)
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.
Both those patches to GTK are from a very active MSYS2 developer so hopefully there'll be official packages sometime soon.
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.
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!
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.
Regarding comment:19, those shebangs get mangled by rpmbuild (see zfs commit : Exclude python scripts from RPM shebang check) prevents that: r19812.
websockify 0.8 modified to run on python 3.7
See also: GTK4 #1977
A good summary of how bad the situation is with python3 strings vs bytes: The Python Unicode Mess
See also #2121. SSL socket peek support is now properly fixed: r21877.
Everything seems to work fine, including the proxy server (#2185).
The few remaining bits are things like #2195, which have their own ticket.
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 :)
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".
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1568