Live data from Hacker News

The first Django site to run on Python 3

myks.org

51–59 of 59 posts

Re: The first Django site to run on Python 3

#51
post #43

Earlier quoted context omitted.

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.

In that case, I wouldn't worry about installing for all users. I'd build from source and configure with the --prefix argument. Then I'd start Django using that specific Python.

Or, since Django on Python3 doesn't seem production ready yet, I'd "upgrade" to Debian testing or unstable, and hope that by the time Django became production ready Py3.2 was in Debian stable.

Re: The first Django site to run on Python 3

#52

So glad to see python 3 being adopted more and more by major web frameworks. This might be the wrong place to ask, but have there been any updates on python 3's wsgi or flask support? I've been out of the loop.

PEP 3333. Armin Ronacher has long been grumpy about Python 3 so don't count on a Flask port any time soon

> Armin Ronacher has long been grumpy about Python 3 so don't count on a Flask port any time soon

There are different reasons for why I am grumpy though. The things that stop me from porting stuff to Python 3 from the side of Python are largely resolved. In that regard I am just a lazy person and nobody cares about Python 3 YET. As far as the general development of the language goes there is still a lot missing in Python 3 that worked in Python 2 so I am not excited yet.

Port will happen though, just have to decide when I will break the API to make it possible. As it stands right now a port won't be possible without breaking Werkzeug's API because it's just one level too low.

Re: The first Django site to run on Python 3

#53
I don’t use Python for anything so I don’t really care about Django updates, but I found this cool anyway. It was interesting to look through the code on the page in order to figure out how the page printed out that code. It was also interesting to see just how little code (Python, HTML, and CSS) is needed to make a professional-looking page.

Re: The first Django site to run on Python 3

#54

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?

Look up virtualenv and virtualenvwrapper. It isn't quite analogous, but I think of virtualenv as Python's RVM. Works well enough for me.

See this answer here: http://askubuntu.com/questions/14615/how-do-i-make-the-termi...

Re: The first Django site to run on Python 3

#55
post #43

Earlier quoted context omitted.

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.

If you're currently on stable but are comfortable running a mixed system, you can install python3 from testing to get 3.2.

Re: The first Django site to run on Python 3

#56

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?

Check out pythonbrew [1] - it makes installing different Pythons pretty simple. Perhaps not the best solution for a server, though.

[1] https://github.com/utahta/pythonbrew/

EDIT: pythonz is pretty good too (http://saghul.github.com/pythonz/)

Re: The first Django site to run on Python 3

#57

Earlier quoted context omitted.

PEP 3333. Armin Ronacher has long been grumpy about Python 3 so don't count on a Flask port any time soon

> Armin Ronacher has long been grumpy about Python 3 so don't count on a Flask port any time soon There are different reasons for why I am grumpy though. The things that stop me from porting stuff to Python 3 from the side of Python are largely resolved. In that regard I am just a lazy person and nobody cares about Python 3 YET . As far as the general development of the language goes there is still a lot missing in P…

>In that regard I am just a lazy person and nobody cares about Python 3 YET.

You'd be surprised.

Re: The first Django site to run on Python 3

#58
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.

Maybe because they care about Django, not Pyramid?

Re: The first Django site to run on Python 3

#59
post #47
post #11

Earlier quoted context omitted.

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?

As far as I can tell, many people use it in production just fine. As for Pyramid vs. Flask, well pyramid gives you more, but you can use it flask-like if you want.
Post reply on HN