4 ms·
Default to version 3. However you need to check these 2 things: 1. Are the libraries you need available in python 3. (Most are, but there are exceptions). 2.
by noselasd 12y ago
Default to version 3. However you need to check these 2 things:
1. Are the libraries you need available in python 3. (Most are, but there are exceptions).
2. What are you deploying on. There's still a lot of older RHEL/CentOS series servers in production. At best
the ops team will say "no" when you tell them to install python 3.
- mhurron 12y ago> There's still a lot of older RHEL/CentOS series servers in production. At best the ops team will say "no" when you tell them to install python 3. And then you tell them that it's better to not build against the system python and ask them again to install another version.
- jessaustin 12y agoPresumably they're already installing app-specific pythons via virtualenv? As you indicate, system python is a bad idea. They might still prefer python 2.7?
- gdulli 12y agoA better version of the first question is, are the libraries you need, and will ever need in the lifetime of this application, available in python 3? If you can't predict the answer to this, it's risky to go with Python 3.
- dragonwriter 12y agoThis seems to presume that no libraries that you might ever need are exclusively Python 3 -- if they are, then both choices have risks. Sure, there's probably more existing Python 2-only libraries than Python 3-only ones, but if the challenge is to predict not only the libraries you need now, but the libraries you "will ever need in the lifetime of this application"...
- celebdor 12y agoAbout 2: https://www.softwarecollections.org/en/ https://www.softwarecollections.org/en/ Now RHEL and CentOS have a solution for python 3.3
- deleted 12y ago[deleted]
- malkia 12y agoFor us, it's only if Autodesk (and other applications that bundle python) are putting python 3 in their packages... Oh, and our best python coders do not like 3 - I'm more of a lua/c person myself so for me only the first point is important.
- voltagex_ 12y agoI'd be interested to know what they don't like about Python 3.
- Walkman 12y agoIf You skim through Armin Ronacher blog [1] and you will find out pretty soon :) Also there is a Q&A for Python 2 vs 3 by Nick Coghlan. [2] Basically Python 3 makes it much-much harder working with legacy POSIX system and web frameworks where you need to do a bunch of unicode <--> bytes encoding dance seemingly unnecessary. [1]: http://lucumr.pocoo.org/ http://lucumr.pocoo.org/ [2]: http://python-notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html http://python-notes.curiousefficiency.org/en/latest/python3/...
- malkia 12y agoMost obviously - things that would no longer work in 3, that used to work in 2 - if that was not a problem, then it would've been an issue to switch (and the performance is not worse than 2). But I guess it's not that easy. Also the "C" api must be backward-compatible.