Skip to content

Commit 3e4e4b3

Browse files
authored
DEPS: require updated python-dateutil, openpyxl (#18182)
1 parent 73ed6de commit 3e4e4b3

19 files changed

+59
-498
lines changed

ci/environment-dev.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ dependencies:
66
- Cython
77
- NumPy
88
- moto
9-
- pytest
10-
- python-dateutil
9+
- pytest>=3.1
10+
- python-dateutil>=2.5.0
1111
- python=3
1212
- pytz
1313
- setuptools

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
python-dateutil=2.4.1
1+
python-dateutil=2.5.0
22
pytz=2013b
33
numpy
44
xlwt=0.7.5
55
numexpr
66
pytables
77
matplotlib
8-
openpyxl=1.6.2
8+
openpyxl=2.4.0
99
xlrd=0.9.2
1010
sqlalchemy=0.9.6
1111
lxml

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+
python-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+
python-dateutil=2.5.0
33
pytz=2013b
44
scipy=0.14.0
55
xlwt=0.7.5

ci/requirements-2.7_LOCALE.run

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
python-dateutil
2-
pytz=2013b
2+
pytz
33
numpy=1.9.2
44
xlwt=0.7.5
5-
openpyxl=1.6.2
5+
openpyxl=2.4.0
66
xlsxwriter=0.5.2
77
xlrd=0.9.2
88
bottleneck=1.0.0

ci/requirements-optional-pip.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# This file was autogenerated by scripts/convert_deps.py
2-
# Do not modify directlybeautifulsoup4
2+
# Do not modify directly
3+
beautifulsoup4
34
blosc
45
bottleneck
56
fastparquet
67
feather-format
78
html5lib
89
ipython
10+
ipykernel
911
jinja2
1012
lxml
1113
matplotlib

ci/requirements_dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Cython
44
NumPy
55
moto
6-
pytest
7-
python-dateutil
6+
pytest>=3.1
7+
python-dateutil>=2.5.0
88
pytz
99
setuptools
1010
sphinx

conda.recipe/meta.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,11 @@ requirements:
1616
- cython
1717
- numpy x.x
1818
- setuptools
19-
- pytz
20-
- python-dateutil
2119

2220
run:
2321
- python
2422
- numpy x.x
25-
- python-dateutil
23+
- python-dateutil >=2.5.0
2624
- pytz
2725

2826
test:

doc/source/install.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ 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
204-
* `pytz <http://pytz.sourceforge.net/>`__: Needed for time zone support
203+
* `python-dateutil <//https://dateutil.readthedocs.io/en/stable/>`__: 2.5.0 or higher
204+
* `pytz <http://pytz.sourceforge.net/>`__
205205

206206
.. _install.recommended_dependencies:
207207

@@ -244,8 +244,8 @@ Optional Dependencies
244244
* For Excel I/O:
245245

246246
* `xlrd/xlwt <http://www.python-excel.org/>`__: Excel reading (xlrd) and writing (xlwt)
247-
* `openpyxl <http://packages.python.org/openpyxl/>`__: openpyxl version 1.6.1
248-
or higher (but lower than 2.0.0), or version 2.2 or higher, for writing .xlsx files (xlrd >= 0.9.0)
247+
* `openpyxl <http://https://openpyxl.readthedocs.io/en/default/>`__: openpyxl version 2.4.0
248+
for writing .xlsx files (xlrd >= 0.9.0)
249249
* `XlsxWriter <https://pypi.python.org/pypi/XlsxWriter>`__: Alternative Excel writer
250250

251251
* `Jinja2 <http://jinja.pocoo.org/>`__: Template engine for conditional HTML formatting.

doc/source/io.rst

+2-4
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,7 @@ Writing Excel Files to Memory
29352935
+++++++++++++++++++++++++++++
29362936

29372937
Pandas supports writing Excel files to buffer-like objects such as ``StringIO`` or
2938-
``BytesIO`` using :class:`~pandas.io.excel.ExcelWriter`. Pandas also supports Openpyxl >= 2.2.
2938+
``BytesIO`` using :class:`~pandas.io.excel.ExcelWriter`.
29392939

29402940
.. code-block:: python
29412941
@@ -2991,9 +2991,7 @@ files if `Xlsxwriter`_ is not available.
29912991
To specify which writer you want to use, you can pass an engine keyword
29922992
argument to ``to_excel`` and to ``ExcelWriter``. The built-in engines are:
29932993

2994-
- ``openpyxl``: This includes stable support for Openpyxl from 1.6.1. However,
2995-
it is advised to use version 2.2 and higher, especially when working with
2996-
styles.
2994+
- ``openpyxl``: version 2.4 or higher is required
29972995
- ``xlsxwriter``
29982996
- ``xlwt``
29992997

doc/source/whatsnew/v0.22.0.txt

+14-1
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,22 @@ Backwards incompatible API changes
8686
- :func:`Series.fillna` now raises a ``TypeError`` instead of a ``ValueError`` when passed a list, tuple or DataFrame as a ``value`` (:issue:`18293`)
8787
- :func:`pandas.DataFrame.merge` no longer casts a ``float`` column to ``object`` when merging on ``int`` and ``float`` columns (:issue:`16572`)
8888
- The default NA value for :class:`UInt64Index` has changed from 0 to ``NaN``, which impacts methods that mask with NA, such as ``UInt64Index.where()`` (:issue:`18398`)
89-
-
9089

90+
.. _whatsnew_0220.api_breaking.deps:
91+
92+
Dependencies have increased minimum versions
93+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94+
95+
We have updated our minimum supported versions of dependencies (:issue:`15184`).
96+
If installed, we now require:
9197

98+
+-----------------+-----------------+----------+
99+
| Package | Minimum Version | Required |
100+
+=================+=================+==========+
101+
| python-dateutil | 2.5.0 | X |
102+
+-----------------+-----------------+----------+
103+
| openpyxl | 2.4.0 | |
104+
+-----------------+-----------------+----------+
92105

93106

94107

pandas/compat/__init__.py

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

398398

399-
# http://stackoverflow.com/questions/4126348
400-
# Thanks to @martineau at SO
401-
399+
# dateutil minimum version
402400
import dateutil
403401

404-
if PY2 and LooseVersion(dateutil.__version__) == '2.0':
405-
# dateutil brokenness
406-
raise Exception('dateutil 2.0 incompatible with Python 2.x, you must '
407-
'install version 1.5 or 2.1+!')
408-
402+
if LooseVersion(dateutil.__version__) < '2.5':
403+
raise ImportError('dateutil 2.5.0 is the minimum required version')
409404
from dateutil import parser as _date_parser
410-
if LooseVersion(dateutil.__version__) < '2.0':
411-
412-
@functools.wraps(_date_parser.parse)
413-
def parse_date(timestr, *args, **kwargs):
414-
timestr = bytes(timestr)
415-
return _date_parser.parse(timestr, *args, **kwargs)
416-
else:
417-
parse_date = _date_parser.parse
405+
parse_date = _date_parser.parse
418406

419407

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

pandas/compat/openpyxl_compat.py

-35
This file was deleted.

0 commit comments

Comments
 (0)