kozec / syncthing-gtk

GTK3 & python based GUI for Syncthing
GNU General Public License v2.0
1.3k stars 138 forks source link

Python 3 Support #487

Open ghost opened 6 years ago

ghost commented 6 years ago

With the upcoming Python 2 EOL, are there any plans for Python3 support ?

dralley commented 6 years ago

I have a PR that does most of the work, but I quit working on it because the author doesn't want to switch over.

ghost commented 6 years ago

I see. But the clock is ticking and a switch now seems much better then a hasty conversion in a year or so when Python2 is killed off in almost all distributions. I mean, what is the alternative?

dralley commented 5 years ago

That's my opinion too but ¯\(ツ)

phw commented 5 years ago

Another reason to switch is support in Nautilus. All other Nautilus extensions I use work with the Python 3 version of python-nautilus

swills commented 5 years ago

This really needs to be done, IMHO.

Salamandar commented 5 years ago

Is there any ETA for the python 3 port ?

akien-mga commented 5 years ago

I'll have to drop my syncthing-gtk package from Mageia 8 if no Python 3 support is provided. I expect most distros will have to do the same, or maintain their own port if they care.

@kozec Could we have a statement about plans, or lack thereof, for Python 3 support?

dralley commented 5 years ago

The same will be true of Fedora.

The python2 package and all its subpackages will be removed from Fedora 32. A legacy python27 package for developers and users will be provided. All packages in Fedora that need Python 2 to run will be removed from Fedora 32 regardless of their dependencies. All packages in Fedora that need Python 2 to build will be removed from Fedora 32 regardless of their dependencies. Exceptions can be granted by FESCo.

https://fedoraproject.org/wiki/Changes/RetirePython2

dralley commented 5 years ago

The last statement about this was here: https://github.com/syncthing/syncthing-gtk/pull/475

Skirmisher commented 4 years ago

Python 2 has one day to live.

Is there still no plan in place for moving to Python 3?

dralley commented 4 years ago

@kozec, your package is going to be removed in the next versions of Debian and Fedora if you don't do anything. Probably other distros too but I don't feel like sorting through more bug trackers.

Fedora

Already removed in the development branch 4 months ago: https://bugzilla.redhat.com/show_bug.cgi?id=1737874

Debian

Currently marked as planned to be removed: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=938614

Python 2 is officially at the End Of Life. there is no point maintaining support for it. Please allow a total port to Python 3. It really is not so different from Python 2 that you would not be able to understand the code. If you don't want to maintain it any longer, please allow someone else to do so so that the project doesn't die.

dralley commented 4 years ago

I rebased my previous work from a year ago and reopened the PR here: https://github.com/syncthing/syncthing-gtk/pull/546

I don't plan on finishing it unless it might actually be merged (although if anyone wants to work through the remaining issues anyway, I will take your patches and add them to the PR).

sandrotosi commented 4 years ago

@dralley looking at kozec activities at https://github.com/kozec i'm pretty sure there wont be many comments from them. What's left pending in your PR?

dralley commented 4 years ago

I forget exactly, I think it was something to do with the difference between strings and bytestrings w/r/t the networking code.

At this point I've just switched to using the web UI so I don't plan to finish it regardless. Anyone should feel free to take my patch set if they do feel so inclined, though.

danyeaw commented 4 years ago

I love syncthing-gtk, so thanks for the great app! :heart: With Ubuntu 20.04, this is the only application that is keeping Python2 installed on my system. Could we at least make it compatible with both Python2 and 3?

thekix commented 4 years ago

I think is time to remove it from my Debian.

root@seahorse:~# dpkg --purge syncthing-gtk (Leyendo la base de datos ... 436925 ficheros o directorios instalados actualmente.) Desinstalando syncthing-gtk (0.9.4.4-1) ... Procesando disparadores para man-db (2.9.1-1) ... Procesando disparadores para hicolor-icon-theme (0.17-2) ... Procesando disparadores para mime-support (3.64) ... Procesando disparadores para desktop-file-utils (0.24-1) ... root@seahorse:~#

Thanks for your time with this great application. When you move it to python3 and then close this bug, I will install it again.

swills commented 4 years ago

Maybe instead of complaints and threats to stop using the software, we could provide patches and/or testing?

simonvanderveldt commented 4 years ago

@dralley Would it be an idea to assume that this repo is unmaintained and simply move to using your fork? Would that be OK for you? Same question for everyone else that responded to this issue, would that be a solution for you/your distro? Otherwise we should probably start looking for someone who wants to work on a maintained fork.

dralley commented 4 years ago

My fork is not functional, I never finished it since the work wasn't going to be merged. And at this point I don't really feel like finishing it since I've started just using the webUI.

IIRC the problem is some networking code that was using strings ans StringIO on the assumption that strings == bytes, which of course doesn't apply to Python 3.

simonvanderveldt commented 4 years ago

@dralley OK, that's a pity, but also very understandable.

Maybe we're better off with a simple appindicator that can also open the web app, less stuff to maintain.

swills commented 4 years ago

Personally I've moved on to https://github.com/Martchus/syncthingtray -- maybe give it a try. Just a suggestion.

simonvanderveldt commented 4 years ago

Thanks, I'll give that a try. Also found https://github.com/jaystrictor/gnome-shell-extension-syncthing which looks nice and minimal for those using GNOME.

Rudd-O commented 4 years ago

Why not just fork it completely and ditch the author's opinion of whether Python 3 support should be merged?

I mean, just (a) take over the project, or (b) rename it and continue forward with a different name (syncthing-gtk3 comes to mind).

dralley commented 4 years ago

If you're talking to me - because I'm not really interested in maintaining it long-term and because I don't even use this software anymore, I switched to the web client.

Salamandar commented 4 years ago

https://github.com/Salamandar/syncthing-gtk Feel free to do PRs. I won't work actively on this, but I'll review/merge any code review in a reasonable delay.

sphh commented 4 years ago

Looks like there are two other forks with the same goal of Python 3 compatibility:

Does anybody has any experience, which one is the most advanced/stable?

@Salamandar @dralley @andrewshadura: Can you think of joining forces to make this great program even greater and fit for Python 3 (and for the nemo plugin to work again)?

andrewshadura commented 4 years ago

My fork is based on @dralley’s work and I believe is the most advanced, however I lost interest when I found out Syncthing-GTK reimplements HTTP because IIRC it uses GLib’s async networking, and I have little motivation to fix yet another HTTP reimplementation, and porting it to the proper Python HTTP networking was too much effort I could put into this software.

andrewshadura commented 3 years ago

Just for the reference, the Python 3 port now lives at Salsa: https://salsa.debian.org/debian/syncthing-gtk/-/tree/python3-port

And the package is back in Debian: https://tracker.debian.org/pkg/syncthing-gtk

To the best of my knowledge, there are still some rough parts, but the package mostly works, I’ve been using it on a daily basis for more than a month now.

Rudd-O commented 3 years ago

Thank you for the amazing effort @andrewshadura . I hope people can add Python 3 requests support for your port, and I hope this repository is willing to merge your change. I'll try to package it up for Fedora and see how I can work through any impediments for that.

Salamandar commented 3 years ago

Just for the reference, the Python 3 port now lives at Salsa: https://salsa.debian.org/debian/syncthing-gtk/-/tree/python3-port

Nice ! I'm going to create an AUR package with this source.

ReillyBrogan commented 3 years ago

So it seems that the consensus is that the @andrewshadura port is the one that we're all migrating to? I note that a few of the other ports linked here no longer resolve (deleted in favor of the AS one I assume).

Are there any plans to provide tagged releases for those distributions that strongly prefer that over git source? That's the only thing preventing me from updating the Solus package.

andrewshadura commented 3 years ago

@ReillyBrogan, there are some tags in https://salsa.debian.org/debian/syncthing-gtk under debian/.

andrewshadura commented 3 years ago

Similarly, if you prefer tarballs, the orig tarball here is what you’re looking for: https://packages.debian.org/source/unstable/syncthing-gtk

colemickens commented 3 years ago

Are you continuing forward with that port/fork? I have noticed an issue with it and wanted to file it, but it seems Issues are disabled.

(For context, I'm updating the nixpkgs/NixOS package of syncthing-gtk. Thank you very much for the port.)

andrewshadura commented 3 years ago

Are you continuing forward with that port/fork? I have noticed an issue with it and wanted to file it, but it seems Issues are disabled.

I’m not doing new development as I’ve got too much on my plate at the moment, but I will fix bugs. I have enabled the GitLab issues so that you should be able to report your bug.

(For context, I'm updating the nixpkgs/NixOS package of syncthing-gtk. Thank you very much for the port.)

I’m happy it’s useful :slightly_smiling_face:

Salamandar commented 3 years ago

@andrewshadura I'd gladly help on your fork, if you need btw :D

Photon89 commented 2 years ago

@Salamandar Thanks for the AUR package, just switched to it today, as the official Python2 package has been dropped from the Arch/Manjaro repos.

Salamandar commented 2 years ago

@Photon89 Yes I filled a request to merge the two packages together as this one isn't maintained anymore.

andrewshadura commented 2 years ago

I’m not quite sure what’s going on, I see new commits on the master branch, but the Python 3 work is still unmerged.

andrewshadura commented 2 years ago

I’m going to continue my fork at https://github.com/andrewshadura/syncthing-gtk.

Salamandar commented 2 years ago

I’m going to continue my fork at https://github.com/andrewshadura/syncthing-gtk.

You could work on the official Debian fork. It will be more visible than your fork i think.

Rudd-O commented 2 years ago

Oh irony of ironies GTK is now at version 4.

Salamandar commented 2 years ago

Oh irony of ironies GTK is now at version 4.

We're talking about Python here not gtk.

andrewshadura commented 2 years ago

It’s actually both, it will eventually need to get ported to GTK 4. I actually looked into this yesterday, but I guess I need to sort more pressing issues first and look into migrating to GTK 4 next.

andrewshadura commented 2 years ago

The redesign proposal (#567) is actually going to help with GTK 4 migration as it will reduce the number of custom components.

Rudd-O commented 2 years ago

What @andrewshadura said. GTK+ 4 is automatically available to Python through the gobject introspection bindings.