diff options
author | Akira Baruah <akira.baruah@gmail.com> | 2017-12-04 10:45:35 -0800 |
---|---|---|
committer | John Cater <jcater@google.com> | 2017-12-04 15:11:37 -0500 |
commit | 4d0e6265911199b1376d0f52e249625180a0500d (patch) | |
tree | 7941683481f98b189e4fde0c5051c917b85a07b6 /third_party | |
parent | bb406b9b2f7b44d96cd5d0d1202503c19e0e6480 (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__.py | 6 |
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 * |