I started new project on Python 3 yesterday and I can say that there hasn't been any problems so far. Libraries I needed to use were compatible with Python 3: toml, markdown and Jinja2. I'm looking forward to use clint for better CLI as well! Everything was solid and production-ready. It's good to know that some really weird things are fixed in new Python. I can't think of any reason not to start new app in Python 3! :)
I can't think of any reason not to start new app in Python 3!
Sorry, but my recent experience has not matched yours, so the fact that this particular project had no library compatibility issues does not mean they no longer exist.
I'm glad you found a project you can use it on. That just doesn't mean much to those of us who are still hitting the same familiar issues with it.
So what's the deal with Python these days? Do people still write for 2.7 which is the default "python" in most (all?) Linux distributions, or is it safe to write for python3 now?
> which is the default "python" in most (all?) Linux distributions
Most distributions ship both 2.x and 3.x at the same time. Ubuntu ported most (all?) of its tools to 3.x already.
> is it safe to write for python3 now?
What do you mean by safe? It's been stable for a long time now. As long as you verify all your dependencies work, you should be fine. The only annoying thing you may run into is a situation where only one of the versions is provided: for example if you want to drive ufw (3.x only) from salt (2.x only), you'll have to resort to some kind of IPC instead.
There was a poll about the current state a month or two ago on HN.
Amazingly people still use Python 2.3. With source downloads you can't tell what platforms use, but you can with binary downloads. One of my projects is a Python wrapper for SQLite (APSW) for which I also provide compiled Windows binaries for every Python version from 2.3 to the latest, and 64 bit for some of them too. It is very amusing to me that some people want the latest SQLite while using a positively ancient Python version.
Google code shows download counts so you can get an idea of popularity of each release for Windows developers:
I think it's pretty safe to go with Python 3 for new and/or personal projects. I started moving all my stuff to Python 3 a few months ago and Fabric is the only major project I use that hasn't been ported.
Yes. Like any other Python 2 releases, there are always new syntax and function additions. I think the only major Python library people use not available on Python 3 is Twisted. (edit: I think Mercurial is also not compatible with Python 3 IRRC due to byte-string and unicode incompatibility). Even Tornado and pyCurl works with Python 3 (according to pypi and doc).
Before you start writing in Python 3, make sure your dependencies will run on Python 3.
It's actually getting a lot better. Many distributions ship python3 as the default python now, and even libraries like numpy and interpreters like pypy support it.
That list sure is turning greener and greener every day. It's getting harder to use that as an excuse. I think my next project, I'll start using py3. The main big ones I see are boto (has a partial 3k fork that isn't official yet) and mysql-python (looks pretty dead, shame).
Quite a few others like Gevent and supervisor, for example, have py3k ports nearly done, and mostly await merging.
That'd be nice, but since CPython is supposed to serve as a reference implementation (and not necessarily be the bleeding edge of speed) I don't hold much hope of performance improvements becoming a top priority (except to make Python3 more compelling than Python 2.x strictly on performance criteria, which they've largely accomplished if I understand correctly).
The widespread use of generators in 3 helps with performance. And the new asyncio in Python 3.4 should help with IO bound applications. If that isn't enough there's PyPy, a JIT compiled Python implementation.
Python 3 is already available by default on Ubuntu. The page you link to refers to the removal of Python 2 by default, which is a separate thing, since both can be installed at once.
[+] [-] daGrevis|12 years ago|reply
[+] [-] mildtrepidation|12 years ago|reply
Sorry, but my recent experience has not matched yours, so the fact that this particular project had no library compatibility issues does not mean they no longer exist.
I'm glad you found a project you can use it on. That just doesn't mean much to those of us who are still hitting the same familiar issues with it.
[+] [-] null_ptr|12 years ago|reply
[+] [-] viraptor|12 years ago|reply
Yes.
> which is the default "python" in most (all?) Linux distributions
Most distributions ship both 2.x and 3.x at the same time. Ubuntu ported most (all?) of its tools to 3.x already.
> is it safe to write for python3 now?
What do you mean by safe? It's been stable for a long time now. As long as you verify all your dependencies work, you should be fine. The only annoying thing you may run into is a situation where only one of the versions is provided: for example if you want to drive ufw (3.x only) from salt (2.x only), you'll have to resort to some kind of IPC instead.
There was a poll about the current state a month or two ago on HN.
[+] [-] rogerbinns|12 years ago|reply
Google code shows download counts so you can get an idea of popularity of each release for Windows developers:
https://code.google.com/p/apsw/downloads/list?can=1&q=&colsp...
I've since moved the project to github which doesn't show the download counts for releases.
https://github.com/rogerbinns/apsw/releases
[+] [-] wylee|12 years ago|reply
[+] [-] yeukhon|12 years ago|reply
Before you start writing in Python 3, make sure your dependencies will run on Python 3.
[+] [-] thomasahle|12 years ago|reply
[+] [-] zem|12 years ago|reply
[+] [-] hit8run|12 years ago|reply
I think I'll wait for 3.4 to land in a few days and from then on use py3 instead of 2.7 :)
[+] [-] agumonkey|12 years ago|reply
[+] [-] eddd|12 years ago|reply
[+] [-] makmanalp|12 years ago|reply
Quite a few others like Gevent and supervisor, for example, have py3k ports nearly done, and mostly await merging.
[+] [-] est|12 years ago|reply
[+] [-] alialkhatib|12 years ago|reply
[+] [-] rectangletangle|12 years ago|reply
[+] [-] cm127|12 years ago|reply
https://wiki.ubuntu.com/Python/3
[+] [-] rlpb|12 years ago|reply
As for making Python 3 the default if you type "python", this is unlikely to happen, for compatibility reasons: http://legacy.python.org/dev/peps/pep-0394/
[+] [-] unknown|12 years ago|reply
[deleted]