3 ms·
I've recently joined a Python project, my first time working with the language. We're currently using Python 2.7. How do experienced Pythonistas decide if/when
by wpietri 11y ago
I've recently joined a Python project, my first time working with the language. We're currently using Python 2.7. How do experienced Pythonistas decide if/when to upgrade to 3.x? I figured it was a no brainer given that it has been 7 years with a number of big releases, but Flask's warning on this topic put me off:
http://flask.pocoo.org/docs/0.10/python3/ http://flask.pocoo.org/docs/0.10/python3/
- detaro 11y agoIMHO the only reason to use 2.x for new projects is if a necessary dependency doesn't exist for 3 yet. Sadly the situation for using asyncio for web was not that great last I checked, because that would be a strong incentive.
- bpicolo 11y agoThose flask docs look out of date. I don't think you'll hit those troubles in python 3 anymore. It's imo a very mature ecosystem now.
- viraptor 11y agoThat's very out of date going by: "Python 3 currently has less than 1% of the users of Python 2 going by PyPI download stats." The web ui download starts stopped being updated in 2013 if I remember correctly and api was disabled shortly after due to migration to CDN. So these stats are ~2 years out of date.
- techdragon 11y agoUse it by default. If something doesnt work and you cant or dont want to make it work yourself, then fall back and use 2.7.10 P.S. That flask warning is definitely very out of date. I used Flask with Python3 quite happily, literally this week.
- 88e282102ae2e5b 11y agoI like the "use Python 3 by default, and only use Python 2 if you have mandatory dependencies that aren't 3.x compatible" rule.
- ctolsen 11y agoUsing Python 3 in production with Flask here, and been doing so for at least a year now. Never had an issue whatsoever. The warning is frankly outdated.