Live data from Hacker News

The first Django site to run on Python 3

myks.org

41–50 of 59 posts

Re: The first Django site to run on Python 3

#41

Relatedly, what's the correct way to install Python 3 on a Linux server (debian based) so I can try this? while keeping Python 2.x. The last time I tried doing that I ended up in some weird quagmire with the LD_LIBRARY_PATH being messed up. There must be a standard way to install it?

Debian and Ubuntu have their own way of managing Python libraries and paths and I can't say I understand it. The modules are stored all over the place, with 'site-packages' being in one place, another called 'distro-packages' (if memory doesn't fail me) somewhere else, and user installed packages in yet another directory. It's hell.

Re: The first Django site to run on Python 3

#42

Relatedly, what's the correct way to install Python 3 on a Linux server (debian based) so I can try this? while keeping Python 2.x. The last time I tried doing that I ended up in some weird quagmire with the LD_LIBRARY_PATH being messed up. There must be a standard way to install it?

Debian and Ubuntu have their own way of managing Python libraries and paths and I can't say I understand it. The modules are stored all over the place, with 'site-packages' being in one place, another called 'distro-packages' (if memory doesn't fail me) somewhere else, and user installed packages in yet another directory. It's hell.

It is absolute confusion, and when you think you've got it, they change it again. I suppose it makes sense to someone somewhere, who probably thinks they're being helpful by inventing all these complicated schemes.

Re: The first Django site to run on Python 3

#43

Relatedly, what's the correct way to install Python 3 on a Linux server (debian based) so I can try this? while keeping Python 2.x. The last time I tried doing that I ended up in some weird quagmire with the LD_LIBRARY_PATH being messed up. There must be a standard way to install it?

What's wrong with: apt-get install python3 It's always worked for me.

Django targets Python >= 3.2, and Debian stable provides 3.1.

FYI the demo uses a manually compiled Python.

Re: The first Django site to run on Python 3

#44

Does anyone know how they decided on that porting strategy? Why not move to Python three and run 3to2 for backwards compatibility?

The porting strategy was decided by rough consensus in the core team.

We wanted a solution that would be convenient for authors of pluggable apps, so they could use the same strategy as Django itself. This is why we used six rather than an ad-hoc compatibility library.

Re: The first Django site to run on Python 3

#45

Does anyone know how they decided on that porting strategy? Why not move to Python three and run 3to2 for backwards compatibility?

3to2 as I understand it works best for supporting Python 2.6 and 2.7

Django had committed to supporting older versions of Python 2.x that weren't Python 3 friendly (largely because of older installations of RHEL and CentOS).

Here was a discussion asking about dropping 2.4 support during development of Django 1.3: http://python.6.n6.nabble.com/Django-1-3-and-Python-2-4-td50...

Django 1.2 still supported Python 2.3+, Django 1.3 supported Python 2.4+, Django 1.4 supported Python 2.5+.

Django 1.5 (which is the current trunk) finally has Python 2.6.5 as its minimum platform which reduces some of the major compatibility pain points.

Re: The first Django site to run on Python 3

#47
post #11
post #2

Not only a major boost for Python 3 adoption but also a reference for how Unicode handling [1] can be successfully ported from Python 2.x libraries. They seem to be on schedule as well, which is brilliant [2]. [1]: http://wiki.python.org/moin/PortingDjangoTo3k [2]: https://www.djangoproject.com/weblog/2012/mar/13/py3k/

yeah we already had in Pyramid 1.3 for ages ;-) I can never be surprised enough how people are excited about django features that others take for granted.

How well does Pyramid work with Python 3 (production ready)? And what are the pros and cons of Pyramid vs. Flask or some other lighter weight way to build web apps with Python 3?

Re: The first Django site to run on Python 3

#49
post #46

What is the estimated release date of Django 1.5?

Django aims for time based releases every nine months (https://docs.djangoproject.com/en/dev/internals/release-proc...). Since 1.4 was released on 23rd March, that would put 1.5 just before Christmas, appropriately enough. But real life might push it back to January.

Re: The first Django site to run on Python 3

#50

Does anyone know how they decided on that porting strategy? Why not move to Python three and run 3to2 for backwards compatibility?

A big advantage of this approach is that they can test on 2.x and 3.x without needing to run any 'translater'. That means the develop-test cycle goes quicker.
Post reply on HN