5 ms·
i dont do a lot of python, and i think 3 is an improvement but for me the real nightmare is all of the libraries. some have 2 and 3 support, some only 2, some
by convolvatron 10y ago
i dont do a lot of python, and i think 3 is an improvement
but for me the real nightmare is all of the libraries. some have 2 and 3 support, some only 2, some with a 3 fork thats not maintained, etc etc.
every time i try to start a project using 3 i end up wasting a lot of time and going back to 2 anyways
- 52-6F-62 10y agoThis is my major confusion as well. It seems not worth it to begin work in an older version because debt is inherent right at the start, and updating code (for a new language version) is a personal peeve (or irritant). It's irrational, so don't ask, but I avoid it everywhere I can. Of course, diving into the newer version also adds a lot of debt, and possibly a total impasse, due to the lack of libraries that have made the update. I guess it will be quite some time before it becomes foolish to still cling to py2
- cthalupa 10y agoWhat libraries are unavailable in Python 3? This gets mentioned in every hacknews thread on this subject, but I honestly don't believe I've seen any that weren't either already updated to support Python 3, or didn't have alternatives that worked just as well. https://python3wos.appspot.com/ https://python3wos.appspot.com/ has a list of the largest packages in pypi, and there's very few that aren't available in Python3. httplib2 is easily replaced by requests. Supervisor isn't a library, it's an application. Same with carbon and graphite-web. Basically the only things on that list are the mozilla libraries, but IIRC some of those are in progress of being ported anyway. Twisted is one of the few I can think of that still isn't there, but most of the core APIs are there, as well as a lot of secondary stuff - half a year ago, more than 90% of the unit tests were passing on python3.
- 52-6F-62 10y agoI can't offer you any kind of solid case. My Python experience is admittedly limited. I've been working to get more into it lately. Thanks for the resource. Can I ask if you see any reason to not abandon Python 2 altogether when starting a new development project?
- cthalupa 10y agoIf you control the deployment environment, none that I can think of. If not, and you need to deploy to RHEL/Cent 7, then maybe. They're still on 2.7, though software collections will let you install 3.x on either of them.
- 52-6F-62 10y agoOh thanks for the tip. I work with CentOS regularly, but haven't worked on a Python project in that environment yet.
- convolvatron 10y agoidk, two sound libraries, an image processing library. i've moved some forward, its not that hard. still seems like a mess
- mrks_ 10y agoPersonally, I haven't found any must-have libraries for Python 2 only that don't have a satisfactory Python 3 alternative.