Skip to content

Commit fb82ad9

Browse files
committed
COMPAT: re-enable dateutil install from master
1 parent 0055c61 commit fb82ad9

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

ci/requirements-3.6_NUMPY_DEV.build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,7 @@ PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf
1212
pip install --pre --upgrade --timeout=60 -f $PRE_WHEELS numpy scipy
1313

1414
# install dateutil from master
15-
16-
# TODO(jreback), temp disable dateutil master has changed
17-
# pip install -U git+git://github.com/dateutil/dateutil.git
18-
pip install python-dateutil
15+
pip install -U git+git://github.com/dateutil/dateutil.git
1916

2017
# cython via pip
2118
pip install cython

pandas/compat/__init__.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -385,18 +385,23 @@ def raise_with_traceback(exc, traceback=Ellipsis):
385385

386386
if PY2 and LooseVersion(dateutil.__version__) == '2.0':
387387
# dateutil brokenness
388-
raise Exception('dateutil 2.0 incompatible with Python 2.x, you must '
389-
'install version 1.5 or 2.1+!')
388+
raise Exception("dateutil 2.0 incompatible with Python 2.x, "
389+
"you must install version 1.5 or 2.1+!")
390390

391-
from dateutil import parser as _date_parser
392-
if LooseVersion(dateutil.__version__) < '2.0':
391+
try:
393392

394-
@functools.wraps(_date_parser.parse)
395-
def parse_date(timestr, *args, **kwargs):
396-
timestr = bytes(timestr)
397-
return _date_parser.parse(timestr, *args, **kwargs)
398-
else:
399-
parse_date = _date_parser.parse
393+
from dateutil import parser as _date_parser
394+
if LooseVersion(dateutil.__version__) < '2.0':
395+
396+
@functools.wraps(_date_parser.parse)
397+
def parse_date(timestr, *args, **kwargs):
398+
timestr = bytes(timestr)
399+
return _date_parser.parse(timestr, *args, **kwargs)
400+
else:
401+
parse_date = _date_parser.parse
402+
except Exception as e:
403+
print(e)
404+
raise
400405

401406

402407
# https://github.com/pandas-dev/pandas/pull/9123

0 commit comments

Comments
 (0)