summaryrefslogtreecommitdiff
path: root/numpy/lib/_version.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2020-01-23 16:50:25 -0800
committerGitHub <noreply@github.com>2020-01-23 16:50:25 -0800
commit68224f43d09393c1981bb83ee3c13a5158d2817c (patch)
tree94153dd189f924c399c2621c325fd2fd2a5e6ba6 /numpy/lib/_version.py
parent4c32890b3628434996824ae2056333b9a389f46c (diff)
parentb4e3a4227e3a9cfe28717db458e67d79e916a418 (diff)
downloadnumpy-68224f43d09393c1981bb83ee3c13a5158d2817c.tar.gz
Merge pull request #15407 from charris/replace-basestring
MAINT: Replace basestring with str.
Diffstat (limited to 'numpy/lib/_version.py')
-rw-r--r--numpy/lib/_version.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/numpy/lib/_version.py b/numpy/lib/_version.py
index 6a7c5cba1..d4098acb5 100644
--- a/numpy/lib/_version.py
+++ b/numpy/lib/_version.py
@@ -7,8 +7,6 @@ work; they don't recognize anything like alpha/beta/rc/dev versions.
"""
import re
-from numpy.compat import basestring
-
__all__ = ['NumpyVersion']
@@ -114,10 +112,10 @@ class NumpyVersion():
return vercmp
def _compare(self, other):
- if not isinstance(other, (basestring, NumpyVersion)):
+ if not isinstance(other, (str, NumpyVersion)):
raise ValueError("Invalid object to compare with NumpyVersion.")
- if isinstance(other, basestring):
+ if isinstance(other, str):
other = NumpyVersion(other)
vercmp = self._compare_version(other)