• Python plugin gets support for Python3

    by  • December 2, 2012 • Common • 8 Comments

    Being vaguely aware that Python3 had some “interesting” differences compared to Python2, I had decided to not think about Python3 for now, but then one of our dear users piped up to say that even building it was broken! That seemed weird, so I started poking around only to find myself falling Alice-like into a Wonderland where strings were not always strings…

    Well, I’ve long been interested in i18n and l10n in all their forms, especially as they apply to Indic languages, so I was somewhat aware of the sorts of issues that Unicode can throw up. Luckily, as a KDE developer I’m used to depending on QString handle all the routine grunt work so it was a bit of a rude awakening to discover that, the C API for Python strings takes many forms:

    Note only that, but:
    • Ubuntu does not yet have 3.3.
    • The cmake support in KDE before 4.9.4 cannot find the right libraries.
    • The PyKDE4 support for strings was broken-then-fixed.
    • Python3 pickles structures differently than Python2.
    Anyway, with some excellent support from Luca Beltrame and Alex Turbov, I’m glad to say that Pate and its plugins should now work with any of Python 2.x, <= 3.2, or 3.3 in the upcoming 4.9.4 and 4.10 releases. Thanks Luca and Alex!

    About

    8 Responses to Python plugin gets support for Python3

    1. December 11, 2012 at 17:08

      awesome. i’ll try to do a jedi¹ autocompletion plugin one 4.10 hits arch, and what’s a more awesome starting condition for that than timely support for the better python?

      ¹) https://github.com/davidhalter/jedi

      • shaheed
        December 11, 2012 at 21:52

        Sounds cool. I’ll watch with interest as I’d like to build an autocompleter for the gid plugin!

      • December 12, 2012 at 17:51

        If you do so, please consider putting it directly into the kate git repository.

    2. December 14, 2012 at 08:01

      I know some guy who already did it :) — and as far as I saw its really works…
      https://github.com/goinnn/Kate-plugins

      • December 14, 2012 at 11:53

        That’s pysmell, though, not jedi. Jedi is new and has been created, because the existing solutions were not good enough for the author.

    3. December 26, 2012 at 10:01

      Where and how do I get the PATE plugin? I saw it on github, but it hasn’t had a code update in two years and it doesn’t build under Ubuntu 12.10.

      • shaheed
        December 26, 2012 at 11:19

        The Pate mentioned here started life as the plugin you saw on github. It has been updated/integrated/upgraded into Kate’s main codebase, and so is available in the various KDE 4.10 release candidates now available. Install one of those, or wait for the 4.10 release.

        • December 26, 2012 at 11:23

          Okay, thanks. I’ll check and see if Ubuntu has a PPA for it.