summaryrefslogtreecommitdiff
path: root/dateutil/parser/_parser.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-09-14 06:12:40 -0700
committerPaul Ganssle <paul@ganssle.io>2018-09-24 12:25:39 -0400
commitccb206826cd1784990f874eb81073f05d720b48b (patch)
treec14b3c1c9a345195227cfa8ae7de087126a33b41 /dateutil/parser/_parser.py
parentd4ce2386a0d6385937c819537f9f88d6884afbf4 (diff)
downloaddateutil-git-ccb206826cd1784990f874eb81073f05d720b48b.tar.gz
Remove unnecessary binary_type compatibility shim
The bytes type is available on all supported Pythons. Can remove workaround and make the code more forward compatible with Python 3.
Diffstat (limited to 'dateutil/parser/_parser.py')
-rw-r--r--dateutil/parser/_parser.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dateutil/parser/_parser.py b/dateutil/parser/_parser.py
index 9d2bb79..044466d 100644
--- a/dateutil/parser/_parser.py
+++ b/dateutil/parser/_parser.py
@@ -40,7 +40,7 @@ from calendar import monthrange
from io import StringIO
import six
-from six import binary_type, integer_types, text_type
+from six import integer_types, text_type
from decimal import Decimal
@@ -63,7 +63,7 @@ class _timelex(object):
if six.PY2:
# In Python 2, we can't duck type properly because unicode has
# a 'decode' function, and we'd be double-decoding
- if isinstance(instream, (binary_type, bytearray)):
+ if isinstance(instream, (bytes, bytearray)):
instream = instream.decode()
else:
if getattr(instream, 'decode', None) is not None: