commit | 50a424e6a8b53fb9f18a28e977e0c015b372228a | [log] [tgz] |
---|---|---|
author | Owen Rodley <orodley@chromium.org> | Thu Mar 25 04:29:47 2021 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Mar 25 04:29:47 2021 |
tree | 42a0b6f8f6885985fc69410f021865206262d58d | |
parent | b15c7718399539b459276cefcd72c91684e506ac [diff] |
Update the 3PP cpython3 package for Python 3.9. I've kept it compatible with 3.8 in case we need to do a patch update of that version. I've confirmed that the latest 3.8 and 3.9 build on Linux after this CL. Two changes were necessary to get 3.9 building: * In patch 0002, one of the context lines changed slightly in 3.9. To get the patch to apply cleanly under both versions we just reduce the amount of context by one line to get rid of the changed line. * In python_mod_gen.py, distutils.core is no longer importable under 3.9, as it now depends on subprocess. We apply the same hack as in setup.py, importing _bootsubprocess as subprocess before importing distutils. We keep it compatible with 3.8 by doing nothing if the import fails. Bug: 1176014 Change-Id: I002ff3088c658a55c53b28e0669e5d0357a53082 Reviewed-on: https://chromium-review.googlesource.com/c/infra/infra/+/2784173 Auto-Submit: Owen Rodley <orodley@chromium.org> Reviewed-by: Robbie Iannucci <iannucci@chromium.org> Commit-Queue: Owen Rodley <orodley@chromium.org> Cr-Commit-Position: refs/heads/master@{#39712}
Testing Welcome to the Chrome Infra repository!
Wondering where to start? Check out General Chrome Infrastructure documentation. In particular, to check out this repo and the rest of the infrastructure code, follow the instructions here. The rest of this page is specific to this repo.
sys.path
modifications.from infra.path_hacks.common import <stg>
is actually getting <stg>
from build/scripts/common.git push origin <updated hash>:deployed
git push
commandIf you've added a new module, run your tests with test.py:
*_test.py
files to this directory.Double-check that your tests are getting picked up when you want them to be: ./test.py test <path-to-package>
.
Tests still not getting picked up by test.py? Double-check to make sure you have __init__.py
files in each directory of your module so Python recognizes it as a package.
The preferred style is PEP8 with two-space indent; that is, the Chromium Python style, except functions use lowercase_with_underscores
. Use yapf (git cl format
) to autoformat new code.