Kotti and Python 3 Status

204 views
Skip to first unread message

Fredrik Blomqvist

unread,
May 22, 2014, 10:35:50 AM5/22/14
to ko...@googlegroups.com
I found a couple of old discussions from 2012, where the conclusion was that it shouldn't be too hard to get it working on Python 3.

What is the current status? Has anything happened on that front in 2 years or should I just jump into the Python 2 boat? (Been doing Pyramid projects in Python 3 for a year now)

Andreas Kaiser

unread,
May 22, 2014, 10:41:25 AM5/22/14
to ko...@googlegroups.com
I'm not aware of anybody working on this. Making Kotti work on Python 2
and Python 3 shouldn't be that hard, indeed. I'm unsure wether all
dependencies are Python 3 compatible, though.

So for now Python 2 is the only (tested and supported) option.

That being said: feel free to open a python3_compat_branch… ;)


Cheers,

Andreas

Fredrik Blomqvist

unread,
May 22, 2014, 10:50:05 AM5/22/14
to ko...@googlegroups.com
Back then they said all of them (the dependencies) were compatible with Python 3, but whatever. If I enjoy Kotti during my coming project (I'll just do Python 2), I might create that branch this summer ;)

Andreas Kaiser

unread,
May 22, 2014, 10:56:22 AM5/22/14
to ko...@googlegroups.com
On 22 May 2014, at 16:50, Fredrik Blomqvist wrote:

> Back then they said all of them (the dependencies) were compatible with
> Python 3, but whatever.

Oh, really? Wasn't aware of (or at least can't remember) that.

> If I enjoy Kotti during my coming project (I'll
> just do Python 2), I might create that branch this summer ;)

I hope you'll enjoy it very much! ;)

Mike Orr

unread,
May 23, 2014, 1:18:44 AM5/23/14
to Kotti mailing list
On Thu, May 22, 2014 at 7:50 AM, Fredrik Blomqvist
<fredrik.bl...@gmail.com> wrote:
> Back then they said all of them (the dependencies) were compatible with
> Python 3, but whatever. If I enjoy Kotti during my coming project (I'll just
> do Python 2), I might create that branch this summer ;)

What it needs is testing to determine what the incompatibilities are.
Then we can determine the scope of the work

I converted one Pylons application to Pyramid in 2012 and tested it in
both Python 2 and 3 as I went, and was able to keep it running on
both. Last February I finished my second conversion, which I did the
same way, except I repeatedly encountered fatal roadblocks in Python
3. I used Fanstatic in the second application, and it dependend on
'which', which was incompatible with Python 3. 'which' is a tiny
module that looks for an executable in your $PATH and returns the full
path to it. Fanstatic wanted it for some obscure features that I
didn't even think I would use. I tried to patch 'which' but it was too
complicated to figure out, because it did different things on Windows
and Unix and I don't know enough about Windows. I even contemplated
making a stub 'which' that always returned None. But I wasn't 100%
sure it wouldn't break something I'd want in production. So I just set
Python 3 testing aside. Then a couple months later 'shutilwhich'
appeared and was Python 3 compatible, and Fanstatic switched to it. So
I tried running my app in Python 3.3 again, and it got all sorts of
Setuptools and other errors that kept changing. I blew away my
virtualenv and recreated it, but still got too many weird and changing
errors that I was afraid to use it in production. Doubtless I'll try
again in a couple months.

I'm now on my third application conversion, and it uses LDAP.
'python_ldap' is not Python 3 compatible, but there's a new package
'python3_ldap' which is. (And is pure Python, and also works on Python
2.7.) I tested it on 3 and it behaved well. So the next time I get in
a testing mood, I'll try my third app on 3. It's also using Fanstatic
and Bootstrap, and SQLAlchemy.

The point of all this is, Kotti's dependencies are probably mostly
compatible, but it's still worth making a list of which parts aren't,
and then we'll see how far we have to go. Pyramid and SQLAlchemy have
been compatible for a long time, so they say, so there's the two
biggest dependencies right there.

But I don't have time to do it since I need to finish WebHelpers2 and
upgrade Unipath before working on anything else....
Message has been deleted

Andreas Kaiser

unread,
Jul 6, 2015, 3:13:54 AM7/6/15
to ko...@googlegroups.com
On 4 Jul 2015, at 5:21, Дмитрий Комаров wrote:

> Hi! Thanks for your contribution! I'm new Kotti user and now I
> consider
> whether use this framework in my projects in a long run so I would
> like to
> know about planned updates.
> It's July 2015 now and what are the plans of migration to Python 3?

Python 3 support is on our roadmap and probably isn't even that much
work.

It just seems that no one had an urgent enough need for it to implement
it yet.

I might be interested to give it a try during Europython, if someone
else would be willing to join me.


Cheers,

Andreas

Dmitry Komarov

unread,
Jul 7, 2015, 12:25:48 PM7/7/15
to ko...@googlegroups.com
Thanks for your answer! Excuse me for deleting question.
Cool plan! Good luck with this task!

Dmitry Komarov

unread,
Nov 18, 2015, 9:19:04 PM11/18/15
to Kotti
Soo.. Can some experienced hero create at least a python3 branch on github and lay a corner stone for migration process? :)

Andreas Kaiser

unread,
Nov 19, 2015, 5:11:18 AM11/19/15
to Kotti
Matt Russell experimented quite a bit and managed to get Kotti running
under Python 3 successfully. For a full history see the related issue's
thread: https://github.com/Kotti/Kotti/issues/348.

To be able to do the real migration, we first need to get rid of all the
browser tests (and replace them with equivalent WebTest tests). I
started working on that in this branch, but haven't found the time to
further work on it since:
https://github.com/disko/Kotti/tree/feature/convert_browser_tests. So
currently the greatest help would be contributions that migrate browser
tests.


Cheers,

Andreas

Dmitry Komarov

unread,
Nov 19, 2015, 6:55:55 PM11/19/15
to Kotti
Thanks a lot for info, Andreas!

Marcel Maré

unread,
Apr 17, 2016, 6:44:39 AM4/17/16
to Kotti
So what is the status? Or better yet what's the roadmap?

Trying to install Kotti 1.3.0-alpha.4 fails with python 3.5.1.

Thanks

Andreas Kaiser

unread,
Apr 18, 2016, 5:11:52 PM4/18/16
to Kotti
On 17 Apr 2016, at 12:44, Marcel Maré wrote:

> So what is the status? Or better yet what's the roadmap?
>
> Trying to install Kotti 1.3.0-alpha.4 fails with python 3.5.1.

I'm adding some 2/3 compatibility bits every now and then, but there's
no real road map right now. That being said, getting Kotti to run on
Python 3.4 and 3.5 in addition 2.7 shouldn't be too much work. The one
part that's a bit of work (but not hard) is rewriting the remaining
browser doctests with webtest equivalents. Once that's done, we can get
rid of zope.testbrowser and the old version of wsgi_intercept, which are
the only Python 2 only requirements we have.


Andreas

Marcel Maré

unread,
Apr 19, 2016, 3:09:24 PM4/19/16
to Kotti
Thanks Andreas.

Is a roadmap available for Kotti as a whole (not only Python 3) perhaps?

Marcel

Jure Cerjak

unread,
Apr 19, 2016, 6:12:04 PM4/19/16
to Kotti
These seem like topics that could be accomplished in a Kotti sprint? I've heard that Berlin is very nice in late August ;)

Jure
Reply all
Reply to author
Forward
0 new messages