GNOME Bugzilla – Bug 698702
Port gedit-latex to python 3
Last modified: 2019-02-22 03:41:29 UTC
Gedit 3.8 no longer supports python2 libpeas plugins. An upgrade to python3 is required.
Created attachment 242299 [details] [review] python2->python3 migration patch This patch migrates gedit-latex to python3. This is done via 2to3. A dozen of remaining obvious bugs are fixed manually. There still might be non-obvious ones, but I anyway propose to switch to python3 as soon as possible, because currently python2 version of gedit-latex does not work with gedit 3.8.
Review of attachment 242299 [details] [review]: Looks good.
Created attachment 242666 [details] [review] Port __cmp__ methods to python3 Sort() methods remained broken since last patch. This fixes it.
Created attachment 242667 [details] [review] Fixurl (convert from utf8 to ascii) does not work anymore and is not needed Plugin-driven tab activation is broken because of broken fixurl method. Let's remove it altogether and keep urls in utf8.
Aleksei, once you finish with py3 maybe you would be interested to port the plugin to use gtksourcecompletion.
Created attachment 242964 [details] [review] Fix some py2->3 decoding/encoding issues
Comment on attachment 242964 [details] [review] Fix some py2->3 decoding/encoding issues Thanks
Can't frankly promise I will find time for gtksourcecompletion port any soon. Maybe some time in the summer. Besides, the current solution seems even a little nicer than gtksourcecompletion's screenshots at its sourceforge page. So keeping the same niceness would probably require some commits to gtksourcecompletion. (Maybe not, I did not research it much.)
Anyway, your port to python3 is greatly appreciated! Thanks!
See also that gtksourcecompletion was merged in gtksourceview and improved a lot since it was merged.
Could you please make a release as distros are already shipping gedit 3.8?
OK I will try to get to it today.
The port to python3 must be more-or-less finished and it should be safe to release. However, I do not really use bibtex-related parts, so not sure if something is broken there.
Sorry, maybe my comment could be understood in many ways. What I mean is, it IS more-or-less finished and safe to release :)
I will release 3.8.0 once I get to test and correct bibtex support.
3.8.0 was relased¹, but it won't load, because of a SyntaxError in latex/latex/cache.py. See the following patch: http://anonscm.debian.org/gitweb/?p=collab-maint/gedit-latex.git;a=blob;f=debian/patches/02-Fixed-SyntaxError.patch ¹ https://mail.gnome.org/archives/gedit-list/2013-July/msg00001.html
Pietro, thanks for the patch. Do you have a git.gnome.org account to push it? If not, have you considered applying for one and joining maintainership of the plugin? :)
I now have an account. The archive for 3.8.0 does contain the SyntaxError.¹ But the commit tagged 3.8.0 in git does not² (and master neither,³ by the way). I'm puzzled. But the bug is solved. ¹ http://download.gnome.org/sources/gedit-latex/3.8/gedit-latex-3.8.0.tar.xz ² https://git.gnome.org/browse/gedit-latex/tree/latex/latex/cache.py ³ https://git.gnome.org/browse/gedit-latex/tree/latex/latex/cache.py?id=3.8.0
I haven't touch anything in my checkout dir (from which I made the release and yes... the tarball had the issue, ... running make dist-check again and there is no issue... it seems I made a release out of a dirty tree or something.
Indeed, released version still have the error, so I will roll a new tarball. Reopening to recall me that
Note that the tarball at http://ftp.gnome.org/pub/GNOME/sources/gedit-latex/3.8/gedit-latex-3.8.0.tar.xz is still broken. The tarball at https://git.gnome.org/browse/gedit-latex/snapshot/gedit-latex-3.8.0.tar.gz is ok. Update the first tarball and close the bug?
Hi! The latest git (but not the release) version of the plugin works well with Gnome 3.16. Probably though, soon the deprecated uiManager, which the plugin relies upon for menues, will be removed in one of the future versions of Gtk/Gedit. Maybe it is a good time to do a release now (say version 3.16)? (And close this bug?)
José, I see that you are the default bug assignee for all gedit-latex bugs. Are you still maintaining the LaTeX plugin? It's maybe a good idea to find a new maintainer, if someone is interested. Note that there is also the LaTeXila editor, which I still maintain and develop a little.
I am fine with someone stepping in as a maintainer. At the time I didn't make a release because I wanted to find a newer fix... but then no time etc etc. so
Ok, I've opened bug #763525 to have a single place to discuss finding a new maintainer.
This was reopened by José because of the problems with the 3.8 tarball. But there is a specific bug for them (#740933, and it was just solved), so I will now close this.