diff --git a/google/__init__.py b/google/__init__.py index 7b7d064b..ad2916be 100644 --- a/google/__init__.py +++ b/google/__init__.py @@ -13,12 +13,5 @@ # limitations under the License. """Google namespace package.""" -# pylint:disable=g-import-not-at-top -try: - import pkg_resources - - pkg_resources.declare_namespace(__name__) -except ImportError: - import pkgutil - - __path__ = pkgutil.extend_path(__path__, __name__) +# https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packages +__path__ = __import__('pkgutil').extend_path(__path__, __name__)