On Fri, Nov 10, 2017 at 7:43 PM, Mike Hommey <m...@glandium.org> wrote:
> On Fri, Nov 10, 2017 at 05:42:01PM -0800, Gregory Szorc wrote: > > On Fri, Nov 10, 2017 at 4:22 PM, Xidorn Quan <m...@upsuper.org> wrote: > > > > > I'm happy hearing this. I would be interested on whether we are going > to > > > drop Python 2 at some point, or are we stuck with that forever? > > > > > > > Let's put it this way: we still have a few uses of Perl in the build > > system. There have been no meaningful changes to that Perl code in years. > > > > We'll likely be using Python 2 for years ahead because there isn't a > > compelling reason to port code that isn't being actively updated. > > > > > > > > > > Also I'm curious what modern features are the team looking forward to? > > > > > > > asyncio is huge for performance, especially for I/O bound workloads (both > > local and network). We have a few of these in critical paths in the build > > system. > > > > Python 3.6 is faster than 2.7 pretty much across the board in everything > > except for process startup overhead. > > > > Python 3 has sensible behavior with regards to not coercing Unicode and > > bytes types, which means people not using English in their operation > system > > won't experience as many build failures due to us failing to handle > Unicode > > in the build system. > > In fairness, those problems wouldn't be magically be fixed by using > python 3. We'd still have to handle the difference between bytes and > unicode somehow, and the reason there have been these problems is that > we're failing to do that, and python 3 alone wouldn't solve that. > Python 3 refuses to perform automatic type coercion between bytes and unicode. Unlike Python 2, if you mix types without an explicit encode() or decode(), Python 3 complains loudly for *all* values, not just values that can't be converted losslessly using the current default encoding (likely ascii). In my experience, this catches a lot of "this function isn't handling types consistently" bugs before they occur. Yes, you can still have bugs due to e.g. improper encoding/decoding. But at least you can more easily find and audit where encoding/decoding occurs because automatic type coercion doesn't occur. _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform