From 202c559cac64a2c85a7f5e2a20088766d56b9c41 Mon Sep 17 00:00:00 2001 From: Edward Lemur Date: Mon, 21 Oct 2019 22:44:52 +0000 Subject: [PATCH] depot_tools: Include httplib2 using vpython. Bug: 1002153 Change-Id: I940b9d834c2f76caab2bd86fc5d5d5c3b03b4b46 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1871763 Reviewed-by: Anthony Polito Commit-Queue: Edward Lesmes --- .vpython | 22 ++++++++++++++++++++++ auth.py | 3 +-- gerrit_util.py | 2 +- git_cl.py | 2 +- my_activity.py | 13 +------------ 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/.vpython b/.vpython index 398aab95f..520fa0790 100644 --- a/.vpython +++ b/.vpython @@ -1 +1,23 @@ python_version: "2.7" + +# Used by: +# auth.py +# gerrit_util.py +# git_cl.py +# my_activity.py +# TODO(crbug.com/1002153): Add ninjalog_uploader.py +wheel: < + name: "infra/python/wheels/httplib2-py2_py3" + version: "version:0.10.3" +> + +# Used by: +# my_activity.py +wheel: < + name: "infra/python/wheels/python-dateutil-py2_py3" + version: "version:2.7.3" +> +wheel: < + name: "infra/python/wheels/six-py2_py3" + version: "version:1.10.0" +> diff --git a/auth.py b/auth.py index 494e618f3..1123cf70c 100644 --- a/auth.py +++ b/auth.py @@ -9,14 +9,13 @@ from __future__ import print_function import collections import datetime import functools +import httplib2 import json import logging import os import subprocess2 -from third_party import httplib2 - # This is what most GAE apps require for authentication. OAUTH_SCOPE_EMAIL = 'https://www.googleapis.com/auth/userinfo.email' diff --git a/gerrit_util.py b/gerrit_util.py index de1251a33..8af187b61 100644 --- a/gerrit_util.py +++ b/gerrit_util.py @@ -14,6 +14,7 @@ import base64 import contextlib import cookielib import httplib # Still used for its constants. +import httplib2 import json import logging import netrc @@ -35,7 +36,6 @@ import gclient_utils import metrics import metrics_utils import subprocess2 -from third_party import httplib2 LOGGER = logging.getLogger() # With a starting sleep time of 1.5 seconds, 2^n exponential backoff, and seven diff --git a/git_cl.py b/git_cl.py index ab05f3e9c..0415fd426 100755 --- a/git_cl.py +++ b/git_cl.py @@ -16,6 +16,7 @@ import collections import datetime import glob import httplib +import httplib2 import itertools import json import logging @@ -37,7 +38,6 @@ import webbrowser import zlib from third_party import colorama -from third_party import httplib2 import auth import clang_format import dart_format diff --git a/my_activity.py b/my_activity.py index 0f2079fa8..164ee5042 100755 --- a/my_activity.py +++ b/my_activity.py @@ -21,23 +21,13 @@ Example: # check those details to determine if there was activity in the given period. # This means that query time scales mostly with (today() - begin). -# [VPYTHON:BEGIN] -# wheel: < -# name: "infra/python/wheels/python-dateutil-py2_py3" -# version: "version:2.7.3" -# > -# wheel: < -# name: "infra/python/wheels/six-py2_py3" -# version: "version:1.10.0" -# > -# [VPYTHON:END] - from __future__ import print_function import collections import contextlib from datetime import datetime from datetime import timedelta +import httplib2 import itertools import json import logging @@ -54,7 +44,6 @@ import auth import fix_encoding import gerrit_util -from third_party import httplib2 try: import dateutil # pylint: disable=import-error