On Fri, Jul 6, 2018 at 3:12 AM, Axel Hecht <l...@mozilla.com> wrote: > Nice. > > I'm just devoting my Friday productivity to fixing bustages in python 3.7 > compared to 3.6. Which affect code I copied from mozpack.path ;-) [0] > > Which leads me to: We should run tests in automation for at least 3.7 and > 3.6. Not sure what still ships 3.5, if at all? > > Testing some version of 3.x sadly isn't covering all our bases. >
I was initially hoping to go with 3.6+. I can't remember why exactly, but I was talked into 3.5+. I may have been optimizing to avoid causing too much disruption / difficulty: 3.5+ is definitely less controversial to require than 3.6+. And where my mind was a few months ago, I wanted to push us over the Python 3 hill any way possible with as little disruption / effort as possible, even if we landed on an older Python 3. My perception is the transition to require 3.5+ went pretty well and wasn't overly disruptive. So I think we made the right call there. That being said, I did push for non-Docker environments in CI to install 3.6. I believe we now have 3.6.3+ installed in the Windows and macOS environments. But the Linux build environment is 3.5. I'm not sure what the Linux test environment is. I'd entertain bumping the build requirement to 3.6. I'm all for getting all the goodies in 3.6 and not having to work around known bugs / deficiencies in 3.5. If someone can provide basic research about the state of 3.5 vs 3.6 and convince me 3.6 is relatively safe, let's do it. But be advised that we're planning on requiring Node.js soon and others are moving things to Clang. I'm wary about introducing too much developer disruption. Python 3.6 might be a difficult pill to swallow at the moment and we may want to put it on hold in favor of transitions that are more important (Node.js unlocks more than 3.5 -> 3.6 and Clang is hugely impactful). Am 03.07.18 um 17:48 schrieb Andrew Halberstadt: > > Dave Hunt has recently landed a lot of great work to get >> some of our python unittests running with Python 3. You >> can see his blog post on it here: >> http://davehunt.co.uk/2018/06/29/python-unit-tests-now-runni >> ng-with-python-3-at-mozilla.html >> >> The march to Python 3 has been long and slow, but this is a >> major milestone along the way. It gives us more confidence >> that porting a module won't be immediately regressed again >> with the next change. Thanks Dave! >> >> I want to emphasize that the time is ripe to start porting >> any python modules you maintain to support Python 3 >> (in addition to 2). Here are some things you can do: >> >> 1) Enable the py2/py3 and flake8 linters on your module. You >> can do this by adjusting the include/exclude paths at the >> following locations: >> https://searchfox.org/mozilla-central/source/tools/lint/py2.yml >> https://searchfox.org/mozilla-central/source/tools/lint/py3.yml >> https://searchfox.org/mozilla-central/source/tools/lint/flake8.yml >> >> Then run |mach lint <path/to/module>| and fix any errors that >> show up (use --fix to automatically fix whatever it can). >> >> 2) Run your |mach python-test| tests under Python 3 in CI. The >> first step is to remove the 'skip-if' annotation from the relevant >> manifest: >> https://searchfox.org/mozilla-central/search?q=skip-if.*pyth >> on+%3F%3D%3D+%3F3&case=true®exp=true&path=ini >> >> Next, run |mach python-test <path/to/module> --python 3| and >> fix any test failures that show up. >> >> Finally, adjust the task (if applicable) to run with both python 2 >> and 3 by modifying this line in the appropriate task: >> https://searchfox.org/mozilla-central/source/taskcluster/ci/ >> source-test/python.yml#94 >> >> 3) Write all new python code to be both Python 2 and Python 3 >> compatible. The 'six' library should be available in all contexts >> of mozilla-central (both locally and in CI). If it isn't, please file >> a bug. >> >> Here is a handy cheat sheet you can reference to solve >> incompatibilities: >> http://python-future.org/compatible_idioms.html >> >> 4) File bugs! Even if you don't have time to do the conversion >> now, get bugs on file and make them block the 'buildpython3' >> meta bug: >> https://bugzilla.mozilla.org/show_bug.cgi?id=1388447 >> >> Having bugs like these on file can also turn into great first >> projects for a contributor. >> >> There is also infrastructure work we could implement to make >> the transition easier. For example, we should run the 'flake8' >> linter under python 3 as well as 2. We should also make >> |mach python-test| default to running tests with both. >> >> We'll only ever get to full python 3 compatibility if everyone >> buys in. While the end goal is still a long long way away, that >> shouldn't stop us from starting to make some progress now. >> >> Cheers, >> Andrew >> >> >> > _______________________________________________ > dev-builds mailing list > dev-builds@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-builds >
_______________________________________________ dev-builds mailing list dev-builds@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-builds