diff --git a/numpy/__init__.py b/numpy/__init__.py index 73e979a1841d..00c4a3d780e6 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -157,11 +157,8 @@ # Make these accessible from numpy name-space # but not imported in from numpy import * # TODO[gh-6103]: Deprecate these - if sys.version_info[0] >= 3: - from builtins import bool, int, float, complex, object, str - unicode = str - else: - from __builtin__ import bool, int, float, complex, object, unicode, str + from builtins import bool, int, float, complex, object, str + unicode = str from .core import round, abs, max, min # now that numpy modules are imported, can initialize limits diff --git a/numpy/core/defchararray.py b/numpy/core/defchararray.py index bc101f84b8e4..942a698a9fc1 100644 --- a/numpy/core/defchararray.py +++ b/numpy/core/defchararray.py @@ -274,7 +274,7 @@ def str_len(a): See also -------- - __builtin__.len + builtins.len """ return _vec_string(a, integer, '__len__') diff --git a/numpy/distutils/misc_util.py b/numpy/distutils/misc_util.py index b7fd74c477dc..4be1df94e60c 100644 --- a/numpy/distutils/misc_util.py +++ b/numpy/distutils/misc_util.py @@ -164,7 +164,6 @@ def get_path_from_frame(frame, parent_path=None): # we're probably running setup.py as execfile("setup.py") # (likely we're building an egg) d = os.path.abspath('.') - # hmm, should we use sys.argv[0] like in __builtin__ case? if parent_path is not None: d = rel_path(d, parent_path)