aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar Akira Baruah <akira.baruah@gmail.com>2017-12-04 10:45:35 -0800
committerGravatar John Cater <jcater@google.com>2017-12-04 15:11:37 -0500
commit4d0e6265911199b1376d0f52e249625180a0500d (patch)
tree7941683481f98b189e4fde0c5051c917b85a07b6 /third_party
parentbb406b9b2f7b44d96cd5d0d1202503c19e0e6480 (diff)
Use PEP 328 absolute import for third_party python gflags.
Commit d926bc40260549b997a6a5a1e82d9e7999dbb65e fixed a bug (#4206, #4208) in the third_party python gflags pseudo-package but added excessive runtime warnings (see #4212). Using the python PEP 328 (absolute import) implementation eliminates these warnings while properly addressing the original bug.
Diffstat (limited to 'third_party')
-rw-r--r--third_party/py/gflags/__init__.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/third_party/py/gflags/__init__.py b/third_party/py/gflags/__init__.py
index fee354a360..16a24afda2 100644
--- a/third_party/py/gflags/__init__.py
+++ b/third_party/py/gflags/__init__.py
@@ -1,6 +1,2 @@
-# gflags raises DuplicateFlagError when defining default flags from packages
-# with different names, so this pseudo-package must mimic the core gflags
-# package name.
-__name__ += ".gflags" # i.e. "third_party.py.gflags.gflags"
-
+from __future__ import absolute_import
from gflags import *