11 ms·
Most popular Python packages now support Python 3
- simonw 9y agoThis site has been around for a very long time, but I checked it the other day and was delighted to see that it's almost entirely green now.
- philipov 9y agoI wonder if it's possible to get a time series of the history of that ratio. Would love to plot it to see the adoption curve.
- stevekemp 9y agoSadly not, as graphite-web doesn't yet support python 3.x! (Which is a shame, graphite is something that always feels older than it should be.)
- collinmanderson 9y agoActually, graphite-web has made good progress in the last _day_. https://github.com/graphite-project/graphite-web/pull/2139 https://github.com/graphite-project/graphite-web/pull/2139 Carbon has Python 3 support in Github, it just hasn't been released to pypi yet. https://github.com/graphite-project/carbon/blob/master/setup.py#L96-L99 https://github.com/graphite-project/carbon/blob/master/setup...
- neokya 9y agoYup, grass is getting greener :) On the side note, glad to know that my small effort (I operate that site) is useful for people I highly respect. I was very surprised when I saw it on HN front page today.
- mraison 9y agoNice work everyone! I’d be curious to see what a “Python 2 deprecation” page would look like (although deprecating Python 2 support shouldn’t be the goal of course)
- gogoengie 9y agoFor many of the major scientific libraries, the goal is to deprecate Python 2.7 no later than 2020: http://www.python3statement.org/ http://www.python3statement.org/
- dbcurtis 9y agoConsidering 2.7 is EOL in 2020, I'm thinking the default policy position of any serious library should be to deprecate 2.7 by 2020.
- Paul_S 9y agoBased on having worked for 3 corporations using python I can tell you it's not going to happen by 2020. Python 2.7 will live on in big companies for a couple more decades. I will end my career before python 3 is adopted. It's more likely that by that time some other scripting language will be more popular.
- jasonrhaas 9y agoYup at this point there is no reason to not use Python 3 for new projects. What I'm finding actually is that some companies that have their codebase in Python 2 have actually started migrating to Golang rather than Python 3, because of the increased performance benefits. I'm kind of sad about this, but I think that Golang will eventually replace Python as the go-to back-end server language (maybe even data processing).
- make3 9y agobut at the same time, Python is the fastest growing language https://stackoverflow.blog/2017/09/06/incredible-growth-python/ https://stackoverflow.blog/2017/09/06/incredible-growth-pyth... because of data science and AI, and I don't see Go replacing Python anytime soon in these domains.
- anameaname 9y agoAgreed. I think the reason is because the programming mindset for data science is different than for normal software engineering. In data science, you write a program, find the answer, write your paper, and throw the program away. Python fits this usage pattern very well.
- jernfrost 9y agoHowever Python is getting attacked by new language in all areas where it is being used. Go attacks just one area. Julia is a much better language for data science than Python. It was essentially designed for it, while for Python it was an afterthought. Python has a head start today with a large selection of packages and mindshare, but as we've seen with Go, I think that will start eroding in the future. Python simply can't keep up with the development pace and possibilities offered with Julia. For Data Science and AI packages in Python to have acceptable performance they need to be written in C/C++, this means slow development. Julia has high enough performance that all these packages can be developed in Julia itself. And this is what people in this area is observing. That package development is moving much faster in the Julia community than in Python. You can also combine these packages in ways that are simply impossible to do in Python. The need to interface with C/C++ creates a lot of artificial restrictions. E.g. processing lots of data fast requires big NumPy buffers with plain data types. In Julia you can e.g. create a an image buffer made up of color objects and process it fast. Unlike Go, Julia offers the ability of a gradual transition to Julia from Python, since Python packages can be used in Julia.
- sago 9y agoClicking around, those that don't seem to be: 1. Obsolete. Either explicitly so (e.g. Google API) or abandoned, without even a minor/patch release (initools, 2010) or in some cases a code commit (e.g. pathtools, 2012) for five years or more. I suspect that they will never be Py3, the community will just move on to alternatives. 2. Working hard to bring support (e.g. ansible). 3. Part of the graphite ecosystem. If the base library won't change, none of its ecosystem will. 4. Not on public version control / issue tracking, so who knows (e.g. supervisord)
- ams6110 9y agoLack of commit activity doesn't necessarily mean a package is obsolete. A small set of well defined functionality can be "done" at some point and need no further changes.
- sago 9y agoMy choice of word was unnecessarily pejorative. I agree. Though I would say that it's the stretch to say it might 'need no further changes' if it doesn't work with the latest version of python.
- crdoconnor 9y agoAll software rots because even if the functionality never needs to change, the world (and the APIs) around it will. Some code just rots slower than others.
- finnn 9y agoA brief look around the supervisor site indicates that they have public version control and issue tracking on their github page[0] and that they have a merged PR[1] to add python 3 testing (which appears to be passing). [0] https://github.com/Supervisor/supervisor https://github.com/Supervisor/supervisor [1] https://github.com/Supervisor/supervisor/pull/901 https://github.com/Supervisor/supervisor/pull/901
- piquadrat 9y ago
- brianwawok 9y agoI notice boto as one of the top items on the list as compatible. It has many many python3 crash bugs, especially on the MWS side. I have had an open PR for like a year to fix one of them, and it has been ignored. This makes me not very hopeful that being on the list means anything. (I am exclusively python3, but I have to wrestle with this a fair bit still)
- mathnode 9y agoThis was quite poorly communicated for pypi consumers of python libraries, you should switch to boto3 as stated in their readme for boto[1]. Be wary adventurer, while boto3 is super neat and a python3 treat, there unsteady footings beneath your feet (api differences). 1. https://github.com/boto/boto/blob/develop/README.rst https://github.com/boto/boto/blob/develop/README.rst
- brianwawok 9y agoBoto3 does not support MWS. Pointing to a readme is totally not useful. Until it does, either boto should be "fixed", or perhaps the MWS piece spun off.
- gigatexal 9y agoThat second paragraph is an awesome limerick.
- ak217 9y agoboto is effectively a deprecated package. Use boto3, which has a far better architecture, is rigorously tested and maintained with lots of community activity.
- brianwawok 9y agoBoto3 does not support MWS. My PRs are to the MWS part of boto, which IS still the active and only supported library to access MWS. Until it does, either boto should be "fixed", or perhaps the MWS piece spun off.
- happy-go-lucky 9y agoI would like to know if fellow HNers who regularly code in Python are using f-strings and type hints in your production code or otherwise. I often find myself inclined to use type hinting.
- wutbrodo 9y agoI don't think I could've survived engineering in Python without type hints. I came from a big 5 and engineering in C++ for several years and had to run a team of 5 not-so-great engineers in a python codebase. The hit that dynamic typing causes to readability, maintainability, bug risk, etc is _huge_, and type hinting goes some way towards fixing that.
- aisofteng 9y agoBig 5?
- joshuamorton 9y agoHe likely means {Amazon, Apple, Facebook, Google Microsoft}.
- rdslw 9y agoBig5 And "and had to run a team of 5 not-so-great engineers" ? Interesting.
- wutbrodo 9y agoNo, I'm sorry, the way I wrote that was misleading. When I was at the bigco, I was quite happy with the quality of engineers around me. I joined a tiny startup after that and was the lead eng on a Python codebase, and that's where all the headaches of a dynamic codebase with untalented engineers came into play.
- collinmanderson 9y agoI'm still on on Python 3.5, probably will be until Ubuntu 18.04 comes out.
- collinmanderson 9y agoLibraries are mostly ported at this point. It's the applications and plugins that still need work. Here's the status in Fedora: http://fedora.portingdb.xyz http://fedora.portingdb.xyz And history: http://fedora.portingdb.xyz/history/?expand=1 http://fedora.portingdb.xyz/history/?expand=1
- greyman 9y agoYes. My friend is employed at Redhat and he told me that he also works on porting 2 to 3 (although not fulltime), and it is a huge amount of work. They work on it several years already, and it is still far from finished.
- u801e 9y agoIt's that why the default version of Python on RHEL 7.x is 2.7 instead of 3.x?
- yjftsjthsd-h 9y agoAlso, rhel 7 is years old now and they almost certainly won't change something that big until rhel 8.
- devit 9y agoPython 3 is a case study on how you should never create a new version of a language implementation that can't load and interface with code written for the old version. After almost 10 years, the old version is still in use, and the new version isn't even that much better.
- collinmanderson 9y agoYup. And the developers learned their lesson and aren't going to do it again. https://www.curiousefficiency.org/posts/2014/08/python-4000.html https://www.curiousefficiency.org/posts/2014/08/python-4000....
- Old_Thrashbarg 9y agoGiven the Python versioning effective convention, it would be strange for the developers to go from 3.9 -> 4.0 because they've run out of digits. Probably better to go to 3.10 to avoid confusion and stay on 3.X while there's no backwards-compatible breaks.
- collinmanderson 9y agoYup. They eventually decided they might go to 3.10 after 3.9. From the article above: > Update: After this post was originally written back in 2014, subsequent discussions on the core python-dev mailing list led to the conclusion that the release after 3.9 will probably just be 3.10. However, a 4.0 will presumably still happen some day, and the premise of this article is expected to hold for that release: it will be held to the same backwards compatibility obligations as a Python 3.X to 3.X+1 update.
- happy-go-lucky 9y agoPython 2 is still in active use, but Python 3 has come a long way and gotten a lot better since it first came out in 2008.
- rdsubhas 9y ago
- frou_dh 9y agoI have extreme Python 2-vs-3 fatigue and that's only from seeing the topic on news aggregators for years on end. I can't fathom how tedious the topic must be for those actually in the Python community for the whole time.
- viraptor 9y agoI feel like it's the news that are tedious mostly. Py3 has been an exciting upgrade, but almost a non-event in the grand scheme of things. At least in my Python dev life.
- neokya 9y agoIn last few years, Python 3 has got momentum. Frankly, for me it feels great to follow this progress.
- Cyph0n 9y agoTedious? How so? Because there is no more Python 2 vs 3 anymore. Whoever hasn't migrated will be stuck using deprecated libraries and outdated tools. Yes, Python 3 was initially a risky endeavor, but in the past couple of years it has cemented its position as the true and only version of Python.
- tigershark 9y agoFor me, completely outside the Python community, I really can't fathom how migrating to the next major version of the language can protract for so long... And I have been in some painful migrations in my life... Java 1.4 to 5 in a >1M loc "enterprise" application. From an object oriented database to oracle in the same application. But it didn't last for close to 10 years. It's simply a complete nonsense to my eyes.
- Cyph0n 9y agoI think the main reason was a lack of agreement between the community and the language maintainer(s) (see: Guido the BDFL). I highly doubt something like this would have happened if the community had been involved. The language maintainers themselves have clarified that introducing breaking changes was a mistake in hindsight and that it will never happen again. Anyways, the fiasco is over and Python 3 has emerged as the victor, so there really is no use discussing the issue anymore imo.
- japaget 9y agoSee also https://python3wos.appspot.com/ https://python3wos.appspot.com/ for another website that also tracks Python 3 readiness.
- kompiuter 9y agoI'm planning to spend my free time in the next couple of months learning Python, should I only learn Python 3?
- ambivalence 9y agoYes.
- wickawic 9y agoYes. But there are very few differences anyway. The only thing is that there is not 100% backward compatibility, which is why we get articles like this. For computers that is a Big Deal, but for humans it is really easy.
- karmel 9y agoWhile many companies still use Python 2.X, they are sufficiently similar that I would recommend learning 3 and retrofitting your knowledge set if necessary later on.
- deleted 9y ago[deleted]
- guhcampos 9y agoPretty much. No reason to look into Python 2 when most of the useful libraries already support Python 3, which is the point of the OP. And you'll save yourself a lot of 2-to-3 fatigue we've all been struggling with. Tip: there's a Chrome/Firefox extension to redirect all Google results from Python 2 documentation to their corresponding entries in Python 3 docs.
- aisofteng 9y agoChrome extension: https://chrome.google.com/webstore/detail/py3redirect/codfjigcljdnlklcaopdciclmmdandig?hl=en https://chrome.google.com/webstore/detail/py3redirect/codfji... Firefox: https://addons.mozilla.org/en-US/firefox/addon/redirect-python-docs/ https://addons.mozilla.org/en-US/firefox/addon/redirect-pyth...
- 9y ago
- Asdfbla 9y agoWas it just the time that the ecosystem needed to adapt to the Python 3 changes or were there essential changes in the 3.x versions up to 3.6 that made it easier to switch from Python 2?
- mjw1007 9y agoSome of both (for example, % formatting got added back to bytes objects in 3.5). Also, supporting 2.5 (or even 2.4) together with Python 3 was particularly inconvenient, so things sped up after people stopped caring about those (which took a long time because some people were running extended-support enterprise distributions).
- Polyisoprene 9y agoPython 3 killed Python? Feels like the Perl story again, lack of backwards compatibility or "next version will be perfect" killed the language. And people still complain about Java, C# and others being too slow to deprecate old apis.
- minitech 9y agoPython is very much alive. Not sure where you’re getting that. Perl 6 and Python 3 aren’t really remotely comparable, either.
- zmmmmm 9y agoIt's great that finally the popular packages are pretty much all supported. But the question is, is that really the problem? It's a bit like Microsoft Word: so many alternative word processors implement all the popular features. So what's the problem? The problem is, nearly everybody has some obscure feature they depend on. So even if an alternative has all the popular features, still almost nobody can use it. I think the constant referral to how many "popular" packages support python3 leads to a bit of false sense of optimism in the python world: it's perfectly possible to support all the popular packages with Python 3 and yet have it be unusable for a large percentage of users.
- zzleeper 9y agoI was burned by that problem two years ago, but I tried again recently and absolutely everything was supported. Heck, it's starting to be the case that py2 is not supported anymore..