After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698702 - Port gedit-latex to python 3
Port gedit-latex to python 3
Status: RESOLVED FIXED
Product: gedit-latex
Classification: Core
Component: General
3.8.x
Other Linux
: Normal critical
: ---
Assigned To: Pietro Battiston
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2013-04-23 22:11 UTC by Aleksei Lissitsin
Modified: 2019-02-22 03:41 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
python2->python3 migration patch (38.89 KB, patch)
2013-04-24 01:16 UTC, Aleksei Lissitsin
committed Details | Review
Port __cmp__ methods to python3 (3.28 KB, patch)
2013-04-27 17:27 UTC, Aleksei Lissitsin
committed Details | Review
Fixurl (convert from utf8 to ascii) does not work anymore and is not needed (5.25 KB, patch)
2013-04-27 17:30 UTC, Aleksei Lissitsin
committed Details | Review
Fix some py2->3 decoding/encoding issues (2.85 KB, patch)
2013-04-30 20:47 UTC, Aleksei Lissitsin
committed Details | Review

Description Aleksei Lissitsin 2013-04-23 22:11:17 UTC
Gedit 3.8 no longer supports python2 libpeas plugins.
An upgrade to python3 is required.
Comment 1 Aleksei Lissitsin 2013-04-24 01:16:13 UTC
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.
Comment 2 Ignacio Casal Quinteiro (nacho) 2013-04-24 06:23:07 UTC
Review of attachment 242299 [details] [review]:

Looks good.
Comment 3 Aleksei Lissitsin 2013-04-27 17:27:35 UTC
Created attachment 242666 [details] [review]
Port __cmp__ methods to python3

Sort() methods remained broken since last patch. This fixes it.
Comment 4 Aleksei Lissitsin 2013-04-27 17:30:20 UTC
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.
Comment 5 Ignacio Casal Quinteiro (nacho) 2013-04-29 14:43:43 UTC
Aleksei, once you finish with py3 maybe you would be interested to port the plugin to use gtksourcecompletion.
Comment 6 Aleksei Lissitsin 2013-04-30 20:47:06 UTC
Created attachment 242964 [details] [review]
Fix some py2->3 decoding/encoding issues
Comment 7 Ignacio Casal Quinteiro (nacho) 2013-04-30 20:57:02 UTC
Comment on attachment 242964 [details] [review]
Fix some py2->3 decoding/encoding issues

Thanks
Comment 8 Aleksei Lissitsin 2013-04-30 21:06:16 UTC
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.)
Comment 9 José Aliste 2013-04-30 23:13:43 UTC
Anyway, your port to python3 is greatly appreciated! Thanks!
Comment 10 Ignacio Casal Quinteiro (nacho) 2013-05-01 15:02:44 UTC
See also that gtksourcecompletion was merged in gtksourceview and improved a lot since it was merged.
Comment 11 Jeremy Bicha 2013-06-27 00:13:10 UTC
Could you please make a release as distros are already shipping gedit 3.8?
Comment 12 Ignacio Casal Quinteiro (nacho) 2013-06-27 07:20:46 UTC
OK I will try to get to it today.
Comment 13 Aleksei Lissitsin 2013-06-27 08:19:33 UTC
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.
Comment 14 Aleksei Lissitsin 2013-06-27 08:24:02 UTC
Sorry, maybe my comment could be understood in many ways.
What I mean is, it IS more-or-less finished and safe to release :)
Comment 15 José Aliste 2013-07-10 02:52:55 UTC
I will release 3.8.0 once I get to test and correct bibtex support.
Comment 16 Pietro Battiston 2013-09-23 13:11:00 UTC
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
Comment 17 Paolo Borelli 2013-10-03 06:29:09 UTC
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? :)
Comment 18 Pietro Battiston 2013-10-05 14:52:41 UTC
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
Comment 19 José Aliste 2013-10-05 17:03:27 UTC
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.
Comment 20 José Aliste 2013-10-07 19:41:13 UTC
Indeed, released version still have the error, so I will roll a new tarball. Reopening to recall me that
Comment 21 Aleksei Lissitsin 2014-01-21 20:59:35 UTC
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?
Comment 22 Aleksei Lissitsin 2015-06-09 17:40:14 UTC
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?)
Comment 23 Sébastien Wilmet 2015-06-15 12:27:54 UTC
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.
Comment 24 José Aliste 2015-06-15 18:07:05 UTC
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
Comment 25 Sébastien Wilmet 2016-03-12 10:31:24 UTC
Ok, I've opened bug #763525 to have a single place to discuss finding a new maintainer.
Comment 26 Pietro Battiston 2016-05-10 10:00:45 UTC
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.