Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Python 3 #609

Open
iphydf opened this issue Apr 1, 2020 · 2 comments
Open

Migrate to Python 3 #609

iphydf opened this issue Apr 1, 2020 · 2 comments

Comments

@iphydf
Copy link

iphydf commented Apr 1, 2020

10 months ago, daf2db0 added a flag to force Python 2 (PY2), but it's now (3 months ago) officially sunset. With bazel 2.2.0, I can no longer build or run instrumentation tests. I tried to migrate bits to python3 in an ad-hoc hacky way, but it turned out to be a rabbit hole filled with protobufs, so I gave up. The files I did touch were pretty easy to fix (some StringIO -> io, print '' -> print(''), ConfigParser -> configparser, etc.). I gave up when I came across generated _pb2.py files.

Please migrate to python3 and drop support for python2.

@xunkai55
Copy link

xunkai55 commented Jul 5, 2021

Upvote this issue. I'm currently building a test with bazel, whose most dependencies require PY3.

@jwhpryor
Copy link

I also recently ran into this when attempting to build an android_instrumentation_test. FWIW I'm not super skilled with handling setting up dependencies for linux environments, however I'm seeing the following when trying to build:

  File "$LONG_PATH_OMITTED/bazel-out/host/bin/external/android_test_support/tools/android/emulator/unified_launcher_head.runfiles/android_test_support/tools/android/emulator/unified_launcher.py", line 468
    print ''

My workspace is currently pinned at fd8531231578414a6024f302376e9b8c489b9cb4 (recent). There were other steps that made it necessary to use python3, but I've had issues at other stages in getting an initial run working so I might have got a bad environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants