[Python-Dev] Python 2.x and 3.x use survey, 2014 edition (original) (raw)
Mark Roberts wizzat at gmail.com
Tue Dec 16 04:08:17 CET 2014
- Previous message: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition
- Next message: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Dec 15, 2014 at 11:30 AM, Chris Barker <chris.barker at noaa.gov> wrote:
Are you primarily writing packages for others to use? if so, then yes. But I wonder how many people are in that camp? Don't most of us spend most of our time writing our own purpose-built code?
That might be a nice thing to see in a survey, actually.
So, I'm the guy that used the "hate" word in relation to writing 2/3 compliant code. And really, as a library maintainer/writer I do hate writing 2/3 compatible code. Having 4 future imports in every file and being forced to use a compatibility shim to do something as simple as iterating across a dictionary is somewhere between sad and infuriating - and that's just the beginning of the madness. From there we get into identifier related problems with their own compatibility shims - like str(), unicode(), bytes(), int(), and long(). Writing 2/3 compatible Python feels more like torture than fun. Even the python-future.org FAQ mentions how un-fun writing 2/3 compatible Python is.
The whole situation is made worse because I KNOW that Python 3 is a better language than Python 2, but that it doesn't MATTER because Python 2 is what people are - and will be - using for the foreseeable future. It's impractical to drop library support for Python 2 when all of your users use Python 2, and bringing the topic up yields a response that amounts to: "WELL, Python 3 is the future! It has been out for SEVEN YEARS! You know Python 2 won't be updated ever again! Almost every library has been updated to Python 3 and you're just behind the times! And, you'll have to switch EVENTUALLY anyway! If you'd just stop writing Python 2 libraries and focus on pure Python 3 then you wouldn't have to write legacy code! PEOPLE LIKE YOU are why the split is going to be there until at least 2020!". And then my head explodes from the hostility of the "core Python community". Perhaps no individual response is quite so blunt, but the community (taken as a whole) feels outright toxic on this topic to me.
Consider some statistics from Pypi:
- 13359 Python 2.7 packages
- 7140 Python 3.x packages
- 2732 Python 3.4 packages
- 4024 Python 2.7/3.x compatible packages
- 2281 2.7/3.4 compatible modules
- 9335 Python 2.7 without ANY Python 3 support
- 11078 Python 2.7 without Python 3.4 support
- 451 modules 3.4 only packages
- 3116 Python 3.x only packages
- 1004 Python 3.x modules without (tagged) Python 3.4 support
Looking at the numbers, I just cannot fathom how we as a community can react this way. The top 50 projects (!!) still prevent a lot of people from switching to Python 3, but the long tail of library likely an even bigger blocker. I also don't understand how we can claim people should start ALL new projects in Python 3 - and be indignant when they don't!. We haven't successfully converted the top 50 projects after SEVEN YEARS, and the long tail without 3.x support is still getting longer. Claims that we have something approaching library parity seem... hilarious, at best?
I suppose what I'm saying is that there's lots of claims that the conversion to Python 3 is inevitable, but I'm not convinced about that. I'd posit that another outcome is the slow death of Python as a language. I would suggest adding some "community health" metrics around the Python 2/3 split, as well as a question about whether someone considers themselves primarily a library author, application developer, or both. I'd also ask how many people have started a new application in another language instead of Python 3 because of the split.
-Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20141215/3431694e/attachment.html>
- Previous message: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition
- Next message: [Python-Dev] Python 2.x and 3.x use survey, 2014 edition
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]