Skip to content

Commit 4ac33e3

Browse files
committed
BLD: require python-dateutil>=2.5.0
1 parent 2f9d4fb commit 4ac33e3

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

ci/requirements-2.7.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
python=2.7*
2-
python-dateutil=2.4.1
2+
python-dateutil=2.5.0
33
pytz=2013b
44
nomkl
55
numpy

ci/requirements-2.7.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
python-dateutil=2.4.1
1+
python-dateutil=2.5.0
22
pytz=2013b
33
numpy
44
xlwt=0.7.5

ci/requirements-2.7_COMPAT.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
python=2.7*
22
numpy=1.9.2
33
cython=0.23
4-
dateutil=1.5
4+
dateutil=2.5.0
55
pytz=2013b

ci/requirements-2.7_COMPAT.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
numpy=1.9.2
2-
dateutil=1.5
2+
dateutil=2.5.0
33
pytz=2013b
44
scipy=0.14.0
55
xlwt=0.7.5

doc/source/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Dependencies
200200

201201
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__
202202
* `NumPy <http://www.numpy.org>`__: 1.9.0 or higher
203-
* `python-dateutil <http://labix.org/python-dateutil>`__: 1.5 or higher
203+
* `python-dateutil <//https://dateutil.readthedocs.io/en/stable/>`__: 2.5 or higher
204204
* `pytz <http://pytz.sourceforge.net/>`__: Needed for time zone support
205205

206206
.. _install.recommended_dependencies:

doc/source/whatsnew/v0.22.0.txt

+12
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ Other Enhancements
3131
Backwards incompatible API changes
3232
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3333

34+
Dependencies have increased minimum versions
35+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36+
37+
We have updated our minimum supported versions of dependencies ().
38+
If installed, we now require:
39+
40+
+-----------------+-----------------+----------+
41+
| Package | Minimum Version | Required |
42+
+=================+=================+==========+
43+
| python-dateutil | 2.5.0 | X |
44+
+-----------------+-----------------+----------+
45+
3446
-
3547
-
3648
-

pandas/compat/__init__.py

+4-16
Original file line numberDiff line numberDiff line change
@@ -378,25 +378,13 @@ def raise_with_traceback(exc, traceback=Ellipsis):
378378
If traceback is not passed, uses sys.exc_info() to get traceback."""
379379

380380

381-
# http://stackoverflow.com/questions/4126348
382-
# Thanks to @martineau at SO
383-
381+
# dateutil minimum version
384382
import dateutil
385383

386-
if PY2 and LooseVersion(dateutil.__version__) == '2.0':
387-
# dateutil brokenness
388-
raise Exception('dateutil 2.0 incompatible with Python 2.x, you must '
389-
'install version 1.5 or 2.1+!')
390-
384+
if LooseVersion(dateutil.__version__) < '2.5':
385+
raise ImportError('dateutil 2.5.0 is the minimum required version')
391386
from dateutil import parser as _date_parser
392-
if LooseVersion(dateutil.__version__) < '2.0':
393-
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
387+
parse_date = _date_parser.parse
400388

401389

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

0 commit comments

Comments
 (0)