16 ms·
I'm the author. I've never worked at Microsoft (where did you get that?). I'm a Linux guy. The "lazy people" you refer to is 98% of the Python community. Pyth
by postfuturist 12y ago
I'm the author. I've never worked at Microsoft (where did you get that?). I'm a Linux guy.
The "lazy people" you refer to is 98% of the Python community.
Python 3 didn't "gain" static type checking. You can (and I do) run pylint against Python 2 code which is just static analysis, not full type checking. The situation here has not changed between Python 2 and 3.
Python is glue code. You write a small piece of Python to tie together external libraries. Moving a smallish piece of Python code from Python 2 to Python 3 often means porting several 3rd party libraries. If you were to move to Ruby, all you'd need to rewrite is your own code, as there are likely already 3rd party libraries which need no porting.
- akerl_ 12y agoDo you have examples for these critical 3rd party libraries that haven't yet been ported? As I noted elsewhere in this thread, the list gets shorter every day: http://python3wos.appspot.com/ http://python3wos.appspot.com/
- postfuturist 12y agoDid you read the article? The long tail is the critical collection of libraries and most of them will never be ported. People write new Python 2 libraries every day, actually--the list is getting longer, not shorter. That said, gevent is an extremely critical library for a lot of production Python 2 code. There doesn't even seem to be a roadmap to port it to Python 3.
- illumen 12y agogevent is ported to python 3. I guess a proper release would be soon. See here: https://github.com/surfly/gevent/issues/38 https://github.com/surfly/gevent/issues/38 If the libraries are used by people, they tend to get ported. Like most of the most popular packages, and 4799 packages listed on pypi. Any others you depend on? I'm prepared to roll up my sleeves and help.
- YokoZar 12y agoIf you genuinely want to help, I suggest porting launchpadlib to Python3: https://bugs.launchpad.net/launchpadlib/+bug/1060734 https://bugs.launchpad.net/launchpadlib/+bug/1060734 This is affecting other parts of Ubuntu, as we don't always install python2 anymore after porting all the default apps to python3. The lack of python3 launchpadlib means apport (the automatic bug reporting tool) doesn't work on some installations. edit: porting launchpadlib requires first porting lazr.restfulclient, which might be genuinely challenging: https://bugs.launchpad.net/lazr.restfulclient/+bug/1000801 https://bugs.launchpad.net/lazr.restfulclient/+bug/1000801
- toma7 12y agoLet's assume a modestly sized Python program uses 8 libraries or so. Assuming 80% of libraries are ported, that means 20% aren't. The likelihood of at least one of your 8 libraries not being ported is 1 - (0.8)^8 = 83%. In other words, most people will find that at least one of their cricitcal libraries is not ported. That is certainly the case for me (Bloomberg Python API, for 2.7, and which, btw, only came out 6 months ago). Inevitably the people using Python come from specific domains, and use at least one domain specific library, so while all the common "usual suspect" libraries are ported, there is usually a very high chance that one critical library is not. Perhaps the way the entire question should be thought of is: are there actually many properly useful Python 3 libraries that are not available in Python 2?? I bet the above equation would look much better when inverted.
- rcruzeiro 12y agoOff the top of my head: Twisted and gevent. It was actually the lack of a Python 3 gevent that lead my to create one crucial piece of software for my startup using NodeJs communicating with the main Python application passing messages via Redis.
- illumen 12y agoTwisted and gevent are available for python 3.
- rspeer 12y agoLook, I'm a Python 3 supporter, but you should never foist the Python 3 fork of gevent on anyone. I'm pretty sure that, the monkey-patched way most people use it, it's a happy accident when gevent even works correctly on Python 2. This happy accident doesn't happen in an unofficial fork.
- theshrike79 12y agoAvailable, yes. Working? No. File "/usr/lib/python3.2/site-packages/twisted/internet/_sslverify.py", line 1389 self._cipherString = u':'.join( ^ SyntaxError: invalid syntax (Twisted 14.0.0, installed with pip)
- Ihmahr 12y agoNumpy, Scipy, NLTK. These are really HUGE and I can not do my work without them.
- akerl_ 12y agoAnd of those, only NLTK isn't compatible with Python 3.
- doug1001 12y agoi use NLTK with python 3.4 (and before that, 3.3); NLTK has an alpha release for pyhthon 3; i have not had any problems either installing it or using it.
- kmike84 12y agoTo clarify: NLTK develop branch is compatible with Python 3.2+ for more than a year. NLTK 3.0a4 (http://www.nltk.org/nltk3-alpha/ http://www.nltk.org/nltk3-alpha/) is not released as NLTK 3.0 because of some pending API changes, not because of Python 3 compatibility issues.
- rdtsc 12y agoOk so why would I risk hitting even one incompatible library or have stuff break because those are dev experimental, untested branches. Why? What does Python 3 offer me except risk of breakage?
- deleted 12y ago[deleted]
- bitL 12y agoIf you are running multiple automated eCommerce companies that have their core system written in Python 2 like I do, you'd find that boto/mws and python-excel aren't available for Python 3 (python-excel's porting to Py3 stopped in 2011), which would prevent you from spawning new businesses on Amazon or handling (unfortunately standard) MS Office interchange files quickly. I actually made the decision to run on Python 2 due to unavailability of these libraries for Python 3 about a year ago (I didn't really care about Python before as I primarily used C++/Java/Asm/GLSL/C#/Haskell in the past) - I was deeply shocked by what Py3 did to its own community and still have that weird feeling that Python is slowly killing itself. I didn't want to write my own Amazon and MS Office wrappers in Python 3 anyway and from all platforms available Py2 seemed to have the least amount of troubles (though I had to write some Py3 code for handling advanced TLS properly).
- fat0wl 12y agoyup. I think this is the reason so much eCommerce software is Java (& I'm sure there is a bunch of C# but that's not my thing). Java moves like a glacier but damn is it ever stable, and for those who wish to be "cutting edge" there is everything-under-the-sun on the JVM -- Clojure, Scala, Jython, JRuby, slimmer-by-the-minute Java APIs. And the community is just working their lil buns off trying to modernize this stuff while maintaining interop / backwards compatibility. I think the flack Java gets is for not modernizing fast enough, but I think in a way that makes you stop and smell the roses (the roses being many years' worth of badass JVM features and massive flexibility/reliability in software development). But Ruby & Python (I am an ex-Ruby guy) take this cutting edge thing wayyy too far & end up with a community of people who can't trust them anymore cuz they all had their damn feet shot off. Sometimes I see the rates for Ruby guys & wonder if they're high cuz its so productive or just cuz its very niche & the stack is shite. On principal, it's hard for me to imagine going back down that road after experiencing the JVM (plus, I'd like to get away from web one day...). EDIT: Funny thing I just realized actually -- all the Ruby rates I've seen tend to be exactly on par with a lot of FUBAR niche near-extinct Java technologies. The only people I've seen do better than both these camps are down & dirty Linux/Oracle/Java guys. Maybe my view is skewed but I always feel like the rock-solid langs will live on & eventually "modernize" (though lets be real, modernize is kindof a BS term for slim API & lots of MVC tutorials). These other techs are at the mercy of market trends.
- chhantyal 12y agoIndeed, 73% of popular packages in PyPi already support Python 3 http://py3readiness.org http://py3readiness.org And it's getting better everyday.
- phkahler 12y agowxPython is a big one for me. But it looks more like it's dying altogether rather than not getting ported to 3.
- burntsushi 12y agoI just looked at that list and I see several prominent projects that (according to that list) don't support Python 3: MySQL-python, gevent, Twisted, eventlet, oauth2, thrift, nltk, mechanize, etc. I've used more than a few of these libraries over the years. I mean, yeah, the list is getting smaller. That's understood. But that doesn't render the problem of depending on only-Python 2 libraries moot. I think the fundamental insight of the OP is that Python X (the purgatory corresponding to code compatible with both Python 2 and 3) is an absolute pain to write. There's plenty you can do to make Python X easier (like the `six` library or ignoring Python 3.{0,1,2}), but the programmer is still left with the burden of writing code compatible with both versions. There's just no denying that the Python 3 transition is a huge fucking pain that is costing people tons of time and money. With that in mind, it is absolutely reasonable that people are resisting the change.
- illumen 12y agoTwisted is mostly ported, and you can install via pip and pypi. Some of the more ancient parts remain to be finished however. gevent is ported, but not in an official release. There is a mysql alternative module. mechanize is ported, but not in official branch nltk alpha3 for python 3 is available There are python3 thrift ports, but the maintainers are slow.
- burntsushi 12y agoYes, I knew most of that. But the fact remains that they aren't complete yet and therefore can't actually be relied on as a dependency. (N.B. I seem to recall someone telling me that gevent had been ported over a year ago and that all that remained was to just make a release. So count me skeptical until the port is complete.) And that's just the most popular projects. Imagine what it looks like with the less popular projects? It isn't pretty. This is what the OP was talking about with the "tail" of Python projects. N.B. I don't personally have this problem with less popular projects. I've always done my best to avoid depending on unmaintained or inactive projects because they tend to rot as time goes on (irrespective of massive changes like Python 2 and 3). But plenty of other people have this problem and it's definitely not an unreasonable problem to have.
- dagw 12y agoThere's a large number of significant commercial applications that use Python as their scripting and plug-in language. Non of them that I am aware of are showing any interest in Python 3.
- DRAGONERO 12y agoI'd love to have scapy for Python 3. A lot of ports of it have been started but it seems none of them reached a working state.
- illumen 12y agoThere was a link to a Microsoft person in the top right of your page. I mistook it for the author link. Edited post to remove that. You are right that the same tools work for python 2. However, I mentioned tools there which allow python to do type checking, and type inference because they can be done now. See here on how to use them: http://renesd.blogspot.de/2014/05/statically-checking-python.html http://renesd.blogspot.de/2014/05/statically-checking-python... You're right in that case where you use several libraries that aren't ported. However, there's 4799 packages registered on pypi as supporting python 3, and most of the popular ones are ported. Considering that most libraries are ported, porting small scripts should be easy most of the time. I don't know if you actually ported any code, but it's often trivial.
- higherpurpose 12y agoIn every Python book I read they were recommending me to use Python 2.7 instead of 3.0. Shouldn't it be the role of educators to promote the latest version out there and work with it, so that by the time the new students get into a working environment they are already on the same page with what is required?
- pdonis 12y ago> Python 2.7 instead of 3.0. Maybe you need to read more up to date books. The latest release is Python 3.4, and even most Linux distros are at least at Python 3.2.
- claystu 12y agoAccording to Distrowatch, out of the top twelve (12) distros, all but #8--Arch--use Python2. The other 11 in order of popularity are #1 Mint, #2 Ubuntu, #3 Debian, #4 Mageia, #5 Fedora, #6 openSUSE, #7 elementary OS, #9 Zorin OS, #10 Puppy Linux, #11 PCLinuxOS, and #12 CentOS. Most Linux distros use Python 2.
- chc 12y agoThat's not quite a complete picture. Those distros include Python 2 as the default "python" executable, but many include Python 3 as python3, and even more have standard python3 packages that just aren't installed by default.
- rdtsc 12y ago> and even most Linux distros are at least at Python 3.2 Why are you spreading lies? You are hurting your cause (advocating Python 3). Let's take a look at latest Ubuntu: $ cat /etc/issue Ubuntu 14.04 LTS \n \l $ python --version Python 2.7.6 How about the popular server distro CentOS 6? $ cat /etc/issue CentOS release 6.5 (Final) Kernel \r on an \m $ python --version Python 2.6.6 What exactly are these "most" Linux distros everyone is using that I haven't heard of?
- 12y ago
- pdonis 12y ago> Python is glue code. Um, no. Major applications are written in Python. It looks to me like the problem is not Python but your perception of it.
- dagw 12y agoFrom personal observation I'd say that for every person writing major applications in python you have at least 20 using it for glue code. And having written a major application in python, I'm not really convinced it's a good language for it.
- pdonis 12y ago> From personal observation Which is not a good metric. Have there been any actual surveys or studies of Python programmers to see what the distribution is? > having written a major application in python, I'm not really convinced it's a good language for it. Out of curiosity, what was the major application?
- coldtea 12y ago>Which is not a good metric. Have there been any actual surveys or studies of Python programmers to see what the distribution is? So where are your metrics?
- pdonis 12y agohttp://en.wikipedia.org/wiki/List_of_Python_software http://en.wikipedia.org/wiki/List_of_Python_software This doesn't show how many programmers work on "glue code" vs. "major applications" (which is why I asked if anyone has data on that), but it certainly shows that there is a lot of Python code out there that is not just "glue code". Bear in mind that it's not just the particular packages listed on that page, since many of them are frameworks; there are also plenty of "major applications" written in those frameworks. (I am counting major websites using a web framework, major numerical applications using NumPy or SciPy, etc., as "major applications", btw, not "glue code". I suspect on re-reading this subthread that the poster I was originally responding to might differ with me on that point, but application logic is not "glue code" in my view.)
- vram22 12y ago>Python is glue code. You write a small piece of Python to tie together external libraries. Glue code is only one of the things that Python can be and is used for. Python is used for small, medium and large [2] applications as well. Do all of the following look like glue code? Recent marketing brochure from the PSF (Python Software Foundation) - (it's a PDF): http://brochure.getpython.info/media/releases/psf-python-brochure-vol.-i-final-download.pdf http://brochure.getpython.info/media/releases/psf-python-bro... Python success stories: https://www.python.org/about/success/ https://www.python.org/about/success/ Google's web front-end (many of their URLs even end in .py)), Dropbox clients (wxPython), YouTube [3], Disqus are some apps / sites written in Python. [1] See the paragraphs about YouTube near the end of this post (by me, but much before this current thread): http://jugad2.blogspot.in/2013/03/youtube-dl-yourube-downloader-in-python.html http://jugad2.blogspot.in/2013/03/youtube-dl-yourube-downloa... [2], [3] The PyCon talk below is by one of the original engineers at YouTube. https://us.pycon.org/2012/schedule/presentation/128/ https://us.pycon.org/2012/schedule/presentation/128/ The Wikipedia article below says YouTube is one of the largest web sites in the world. A lot of YouTube is written in Python. http://en.wikipedia.org/wiki/YouTube http://en.wikipedia.org/wiki/YouTube
- vram22 12y agoAlso: Disqus, written partly in Python, mentioned on the High Scalability site: http://highscalability.com/blog/2014/4/28/how-disqus-went-realtime-with-165k-messages-per-second-and-l.html http://highscalability.com/blog/2014/4/28/how-disqus-went-re...