android / android/android-test

Migrate to Python 3

Open
#609 2 comments 11 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.2k
Forks
342
Avg merge
11h 29m
Merged PRs (30d)
2

Description

10 months ago, daf2db024fc249cc0b14b0553f0673416a877792 added a flag to force Python 2 (PY2), but it's now (3 months ago) officially [sunset](https://www.python.org/doc/sunset-python-2/). 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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the PY2 flag introduced by commit daf2db024fc249cc0b14b0553f0673416a877792 and the generated _pb2.py files involved in the migration. Run the instrumentation tests with Bazel 2.2.0 under Python 3, and consider the work done when Python 2 support is removed and the tests build and run successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.