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:
- Python 2.x has 2 run-time variants with 3 compile-time variants.
- Python 3.2 or less has 3 compile-time variants
- Python 3.3 or greater has 3 run-time variants
- 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.
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
Sounds cool. I’ll watch with interest as I’d like to build an autocompleter for the gid plugin!
If you do so, please consider putting it directly into the kate git repository.
I know some guy who already did it 🙂 — and as far as I saw its really works…
https://github.com/goinnn/Kate-plugins
That’s pysmell, though, not jedi. Jedi is new and has been created, because the existing solutions were not good enough for the author.
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.
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.
Okay, thanks. I’ll check and see if Ubuntu has a PPA for it.