News for hackers. Stuff that matters.
Re:Python 3.6.0 released by leojg on Friday December 23, 2016 @08:34AM (#13244613)
Anybody knows what´s the state of python 3 right now? I mean, are there popular libraries and frameworks that still uses python 2?

Or this is no longer an issue?

Re:Python 3.6.0 released by msoucy on Friday December 23, 2016 @08:41AM (#13244635)
According to the Python 3 Wall of Superpowers[1], almost every commonly-used library has adopted 3. Now the problem is getting people to realize that... I was talking with someone just a month ago who said that there were no numeric processing libraries on 3 and so they couldn't switch.

[1]: https://python3wos.appspot.com/

Re:Python 3.6.0 released by bendmorris on Friday December 23, 2016 @11:17AM (#13245471)
>Now the problem is getting people to realize that...

I realize it, but (1) even after large libraries support 3 there will still be a long tail of libraries that aren't ported (and will never be), and (2) I see very little value in porting our very large code bases to Python 3, with its breaking changes and subtle behavioral differences that need to be thoroughly tested. There's no must-have feature for us to justify that effort, so we won't be making the switch for the foreseeable future.

IMO Python should have put a lot more effort into backwards compatibility when releasing Python 3. I'm genuinely concerned that this release has killed Python, and I'm not alone.

Re:Python 3.6.0 released by kstrauser on Friday December 23, 2016 @11:28AM (#13245551)
> I see very little value in porting our very large code bases to Python 3

That's too bad. We've started writing all new code in 3, and now I can't stand working with 2. It feels clunky and old in comparison. A year ago I never would have believed I could feel that way, but I do: I will not willingly (that is, absent strong business reasons) write Python 2 code again.

Re:Python 3.6.0 released by fractalb on Friday December 23, 2016 @12:07PM (#13245810)
> (1) even after large libraries support 3 there will still be a long tail of libraries that aren't ported (and will never be)

That should be a non-issue unless you require one of those libraries.

> There's no must-have feature for us to justify that effort, so we won't be making the switch for the foreseeable future.

There's no reason for making the switch if you're going to ditch your code base in the foreseeable future. Otherwise, you'll have to justify your decision in the unforeseeable future. And thereafter.

Re:Python 3.6.0 released by bendmorris on Friday December 23, 2016 @01:22PM (#13246322)
>That should be a non-issue unless you require one of those libraries.

That's kind of a truism, isn't it? I don't understand the dismissiveness - there's certainly a sizable portion of users that use libraries other than the top 50 most popular.

Re:Python 3.6.0 released by m45t3r on Friday December 23, 2016 @05:02PM (#13247449)
There is ton of new interesting libraries being compatible with Python 3 only, so you can make this argument in either way.

In the end, you should ask yourself some questions:

Am I starting a new project or continuing an older one? If the former one, Python 3 should be preferred unless some library I need is only available for Python 2. If the latter, I should ask if the cost of migrating my codebase makes sense. If not, Python 2 is still a viable choice until 2020 at least.

Re:Python 3.6.0 released by criddell on Friday December 23, 2016 @12:28PM (#13245917)
Isn't that the same argument that so many companies used to hang on to IE6 for so long? There were a ton of in-house applications built on ActiveX and IE6 quirks and porting to something newer wasn't worth the cost.

Eventually, don't you think that you will start using a more modern version of Python?

Re:Python 3.6.0 released by cauterized on Friday December 23, 2016 @01:03PM (#13246186)
Or switch to another language, just as so many people switched to Firefox or Chrome while waiting for a sane modern IE.
Re:Python 3.6.0 released by bendmorris on Friday December 23, 2016 @01:20PM (#13246312)
"Modern" for its own sake adds no value, so no, we won't port our existing code bases to something "more modern." It's funny that string interpolation, a port of a feature other languages like PHP have had for decades and the fourth way to do the same thing in Python, is being held up as something modern.
Re:Python 3.6.0 released by mixmastamyk on Friday December 23, 2016 @03:44PM (#13247138)
How about "supported?"

You may have also missed the other features from 3.0 to 3.6. Cumulatively they are substantial.

Re:Python 3.6.0 released by softwarelimits on Friday December 23, 2016 @12:30PM (#13245933)
The frustration with the neverending 2 vs. 3 transition pushed me to looking at Elixir more deeply and now I am very happy. Of course it is not yet possible to completely avoid Python, but new things are Elixir only for me.

Of course I pray every night to Eris that such a fiasko will never happen to Elixir.

Re:Python 3.6.0 released by cbcoutinho on Friday December 23, 2016 @09:44AM (#13244930)
What is a numeric processing library? Numpy?
Re:Python 3.6.0 released by goatlover on Friday December 23, 2016 @10:26AM (#13245139)
Also SciPy, SymPy, and Pandas. They've supported Python 3 for several years.
Re:Python 3.6.0 released by cbcoutinho on Wednesday January 04, 2017 @08:01AM (#13317877)
My comment was kind of a loaded question. If they consider Numpy a numeric package, then yes, it's been there for a while and they haven't been paying attention. That includes the packages you mentioned as well
Re:Python 3.6.0 released by dwightgunning on Friday December 23, 2016 @08:41AM (#13244633)
The amount of pain you'll experience is dependent on your area of work. E.g. web-dev, systems, science.

Most certainly use Python3 for any new projects.

Here's a quick overview of the most popular PyPI packages and their support for Python 3: http://py3readiness.org/

Re:Python 3.6.0 released by bendmorris on Friday December 23, 2016 @11:24AM (#13245522)
Most? Do you have a source for that?

As a counterpoint, this JetBrains survey [1] shows only 40% of Python users ever use Python 3. Considering it has been eight years since the initial release, that's a very low share.

[1]

Re:Python 3.6.0 released by epoch1970 on Friday December 23, 2016 @01:48PM (#13246472)
I think you may have misinterpreted what was meant by the "Most certainly use Python3 for any new projects." sentence.

I don't think it's using "Most certainly" in the sense of "Most developers using Python use Python 3 for any new projects.", like you appear to be thinking it says.

Rather, it appears to be saying, "Without any doubt, if you're using Python use Python 3 for any new projects."

It appears to be a statement regarding the suitability of Python 3 for new projects, rather than some quantitative claim regarding the number of users of Python 3.

Re:Python 3.6.0 released by dwightgunning on Friday December 23, 2016 @04:58PM (#13247425)
Correct. Sorry for the ambiguity.
Re:Python 3.6.0 released by xapata on Friday December 23, 2016 @12:31PM (#13245942)
Sounds like a healthy portion to me in comparison to other major software upgrades. The original expectation was about 5 years before the shift started. Seems like we're mildly behind the expected schedule.

After it was released, it'd be only the early adopters for a couple years, then the major libraries would follow a few years after. After 5ish years, the big libraries were ported and the second wave of early adopters could shift over. Now we'll start seeing major enterprises make the move over the next few years. Facebook already made the change, but they're tech-forward.

How many people use old versions of RHEL? Of Windows?

Re:Python 3.6.0 released by bendmorris on Friday December 23, 2016 @01:34PM (#13246408)
Re:Python 3.6.0 released by gh1 on Friday December 23, 2016 @08:48AM (#13244664)
You can see this recently submitted link [0] which tries to answer this question in depth. I believe that python 3 readiness[1] and python 3 wall of superpowers[2] are good indicators of the overall trend towards Python 3 adoption, but the sample size of packages considered in these two websites are not big enough to provide a complete picture of the situation.

[0] https://news.ycombinator.com/item?id=13244627

[1] http://py3readiness.org/

[2] https://python3wos.appspot.com/

Re:Python 3.6.0 released by sandGorgon on Friday December 23, 2016 @01:18PM (#13246290)
For us (and a crazy ton of systems people who dont even use python for application code), the "supervisor" incompatibility is a blocker.

supervisord is one of the most useful tools to run production systems.. and is more relevant when we look at the Docker world.

A port of supervisord is something we would gladly donate to :(

Unfortunately, I think the maintainers are handicapped by py3 expertise - https://github.com/Supervisor/supervisor/labels/python%203

Supervisor has some major issues on Python 3. Many of these issues are encoding related as well so merging this one patch doesn't move the needle much. We need someone who has strong experience in Python 2/3 porting and is willing to spend a non-trivial amount of time looking at these bytes/strings issues together.

https://github.com/Supervisor/supervisor/pull/471#issuecomme...

Re:Python 3.6.0 released by mixmastamyk on Friday December 23, 2016 @03:46PM (#13247151)
It is standalone though, not a library, and should not be an impediment to others, unless I'm missing something.
Re:Python 3.6.0 released by sandGorgon on Friday December 23, 2016 @10:21PM (#13248401)
And that's why everyone goes back to "we are most definitely not using TWO Python versions. Since everything works on 2.7, let's stay there)"
Re:Python 3.6.0 released by mixmastamyk on Sunday December 25, 2016 @07:41PM (#13256267)
Been using 3.x for a few years now, 3.6 is about to seal the deal.
Re:Python 3.6.0 released by thijsvandien on Friday December 23, 2016 @10:26AM (#13245138)
OpenCV is still a pain. While technically the latest major version is able to work with Python 3, it is relatively unstable and all samples/tutorials out there are for the previous major version.
Re:Python 3.6.0 released by jerknextdoor on Friday December 23, 2016 @10:48AM (#13245269)
I'm not sure what issues you've been having, but I've been using, OpenCV with 3.5 for over a year with no problems. The docs are out of fate, but that's because the code is all auto-generated.
Re:Python 3.6.0 released by squeaky-clean on Friday December 23, 2016 @09:01AM (#13244716)
The majority of the largest libraries support 2 and 3. It's become a very small issue for me. I still need to "fall back" to python 2 occasionally though when a vendor doesn't support 3. Namely for me, I need to use the google-ads client library and AWS Lambda, neither of which support Py3. However the majority of my projects are Py3.
Re:Python 3.6.0 released by baq on Friday December 23, 2016 @09:51AM (#13244961)
perception of python 3 is really bad compared to the actual state, especially for those groups that look at py3 every 5 years and assume nothing changes in between checks. the truth is that if you're in the 95th percentile, library support a non-issue.
Re:Python 3.6.0 released by lmm on Friday December 23, 2016 @11:39AM (#13245613)
There are now more python3-only libraries than python2-only libraries.
Re:Python 3.6.0 released by softwarelimits on Friday December 23, 2016 @12:33PM (#13245958)
The real problem is that there are "only" libraries at all - too many of them. It kills the python ecosystem in a really disgusting way.
Re:Python 3.6.0 released by kstrauser on Friday December 23, 2016 @01:23PM (#13246334)
I disagree. I wouldn't bother writing a Python 2-compatible library today. I mean, if something I wrote happens to work with it, cool!, but I wouldn't expend non-zero effort making that happen. That's especially true for anything involving async or other new language features that would be a PITA to backward-compatibly support.

IMHO, what kills the Python ecosystem is people attempting to stay on a 6+ year old major version when they've been told repeatedly that it's officially dead. Upgrading to Python 3 isn't exactly like porting from Java to OCaml, and writing new code in Python 2 today seems flat-out negligent to me.

Re:Python 3.6.0 released by lmm on Friday December 23, 2016 @12:40PM (#13246001)
No need to be rude. Libraries can't reasonably be expected to support old versions of the language indefinitely - languages have to be able to grow and evolve or they will die.