-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DEPS: drop numpy < 1.12 #23062
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEPS: drop numpy < 1.12 #23062
Changes from 12 commits
22dab2d
a495db9
124d511
12b9a79
c8bfe66
b2cffb4
e9c407e
aac634d
f18880d
f81ad9f
c29b478
7ecc5f2
6e533e7
2ab7f55
7ca1753
9b85061
5b54612
708b2f6
a41ed9f
1e0c553
317e042
31dc4fa
ec93bdb
d20077a
925b555
b971bfb
93eabad
d72b547
e075eff
305f12b
752b5d7
9dc846a
e7f5bf2
169974b
5b45639
308e943
9be3d10
61763f6
ededd73
079bdaf
162458b
cdd497d
d8587a8
8e37179
d097b43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -225,7 +225,7 @@ Dependencies | |
------------ | ||
|
||
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__: 24.2.0 or higher | ||
* `NumPy <http://www.numpy.org>`__: 1.9.0 or higher | ||
* `NumPy <http://www.numpy.org>`__: 1.12.0 or higher | ||
* `python-dateutil <https://dateutil.readthedocs.io/en/stable/>`__: 2.5.0 or higher | ||
* `pytz <http://pytz.sourceforge.net/>`__ | ||
|
||
|
@@ -236,11 +236,11 @@ Recommended Dependencies | |
|
||
* `numexpr <https://github.com/pydata/numexpr>`__: for accelerating certain numerical operations. | ||
``numexpr`` uses multiple cores as well as smart chunking and caching to achieve large speedups. | ||
If installed, must be Version 2.4.6 or higher. | ||
If installed, must be Version 2.6.2 or higher. | ||
|
||
* `bottleneck <https://github.com/kwgoodman/bottleneck>`__: for accelerating certain types of ``nan`` | ||
evaluations. ``bottleneck`` uses specialized cython routines to achieve large speedups. If installed, | ||
must be Version 1.0.0 or higher. | ||
must be Version 1.2.0 or higher. | ||
|
||
.. note:: | ||
|
||
|
@@ -255,9 +255,9 @@ Optional Dependencies | |
|
||
* `Cython <http://www.cython.org>`__: Only necessary to build development | ||
version. Version 0.28.2 or higher. | ||
* `SciPy <http://www.scipy.org>`__: miscellaneous statistical functions, Version 0.14.0 or higher | ||
* `SciPy <http://www.scipy.org>`__: miscellaneous statistical functions, Version 0.18.1 or higher | ||
* `xarray <http://xarray.pydata.org>`__: pandas like handling for > 2 dims, needed for converting Panels to xarray objects. Version 0.7.0 or higher is recommended. | ||
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage. Version 3.0.0 or higher required, Version 3.2.1 or higher highly recommended. | ||
* `PyTables <http://www.pytables.org>`__: necessary for HDF5-based storage. Version 3.4.2 or higher required. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you are changing the meaning, remove requires |
||
* `Feather Format <https://github.com/wesm/feather>`__: necessary for feather-based storage, version 0.3.1 or higher. | ||
* `Apache Parquet <https://parquet.apache.org/>`__, either `pyarrow <http://arrow.apache.org/docs/python/>`__ (>= 0.4.1) or `fastparquet <https://fastparquet.readthedocs.io/en/latest>`__ (>= 0.0.6) for parquet-based storage. The `snappy <https://pypi.org/project/python-snappy>`__ and `brotli <https://pypi.org/project/brotlipy>`__ are available for compression support. | ||
* `SQLAlchemy <http://www.sqlalchemy.org>`__: for SQL database support. Version 0.8.1 or higher recommended. Besides SQLAlchemy, you also need a database specific driver. You can find an overview of supported drivers for each SQL dialect in the `SQLAlchemy docs <http://docs.sqlalchemy.org/en/latest/dialects/index.html>`__. Some common drivers are: | ||
|
@@ -266,7 +266,7 @@ Optional Dependencies | |
* `pymysql <https://github.com/PyMySQL/PyMySQL>`__: for MySQL. | ||
* `SQLite <https://docs.python.org/3/library/sqlite3.html>`__: for SQLite, this is included in Python's standard library by default. | ||
|
||
* `matplotlib <http://matplotlib.org/>`__: for plotting, Version 1.4.3 or higher. | ||
* `matplotlib <http://matplotlib.org/>`__: for plotting, Version 2.0.0 or higher. | ||
* For Excel I/O: | ||
|
||
* `xlrd/xlwt <http://www.python-excel.org/>`__: Excel reading (xlrd) and writing (xlwt) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,8 +199,32 @@ Other Enhancements | |
|
||
Backwards incompatible API changes | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
- A newly constructed empty :class:`DataFrame` with integer as the ``dtype`` will now only be cast to ``float64`` if ``index`` is specified (:issue:`22858`) | ||
|
||
.. _whatsnew_0240.api_breaking.deps: | ||
|
||
Dependencies have increased minimum versions | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
We have updated our minimum supported versions of dependencies (:issue:`21242`). | ||
If installed, we now require: | ||
|
||
+-----------------+-----------------+----------+---------------+ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove the issue part here it is not necessary |
||
| Package | Minimum Version | Required | Issue | | ||
+=================+=================+==========+===============+ | ||
| numpy | 1.12.0 | X | :issue:`21242`| | ||
+-----------------+-----------------+----------+---------------+ | ||
| bottleneck | 1.2.0 | | :issue:`21242`| | ||
+-----------------+-----------------+----------+---------------+ | ||
| matplotlib | 2.0.0 | | :issue:`21242`| | ||
+-----------------+-----------------+----------+---------------+ | ||
| numexpr | 2.6.2 | | :issue:`21242`| | ||
+-----------------+-----------------+----------+---------------+ | ||
| pytables | 3.4.2 | | :issue:`21242`| | ||
+-----------------+-----------------+----------+---------------+ | ||
| scipy | 0.18.1 | | :issue:`21242`| | ||
+-----------------+-----------------+----------+---------------+ | ||
|
||
.. _whatsnew_0240.api_breaking.interval_values: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,19 +9,16 @@ | |
# numpy versioning | ||
_np_version = np.__version__ | ||
_nlv = LooseVersion(_np_version) | ||
_np_version_under1p10 = _nlv < LooseVersion('1.10') | ||
_np_version_under1p11 = _nlv < LooseVersion('1.11') | ||
_np_version_under1p12 = _nlv < LooseVersion('1.12') | ||
_np_version_under1p13 = _nlv < LooseVersion('1.13') | ||
_np_version_under1p14 = _nlv < LooseVersion('1.14') | ||
_np_version_under1p15 = _nlv < LooseVersion('1.15') | ||
|
||
|
||
if _nlv < '1.9': | ||
if _nlv < '1.12': | ||
raise ImportError('this version of pandas is incompatible with ' | ||
'numpy < 1.9.0\n' | ||
'numpy < 1.12.0\n' | ||
'your numpy version is {0}.\n' | ||
'Please upgrade numpy to >= 1.9.0 to use ' | ||
'Please upgrade numpy to >= 1.12.0 to use ' | ||
'this pandas version'.format(_np_version)) | ||
|
||
|
||
|
@@ -43,9 +40,7 @@ def np_datetime64_compat(s, *args, **kwargs): | |
tz-changes in 1.11 that make '2015-01-01 09:00:00Z' show a deprecation | ||
warning, when need to pass '2015-01-01 09:00:00' | ||
""" | ||
|
||
if not _np_version_under1p11: | ||
s = tz_replacer(s) | ||
s = tz_replacer(s) | ||
return np.datetime64(s, *args, **kwargs) | ||
|
||
|
||
|
@@ -56,23 +51,17 @@ def np_array_datetime64_compat(arr, *args, **kwargs): | |
tz-changes in 1.11 that make '2015-01-01 09:00:00Z' show a deprecation | ||
warning, when need to pass '2015-01-01 09:00:00' | ||
""" | ||
|
||
if not _np_version_under1p11: | ||
|
||
# is_list_like | ||
if hasattr(arr, '__iter__') and not \ | ||
isinstance(arr, string_and_binary_types): | ||
arr = [tz_replacer(s) for s in arr] | ||
else: | ||
arr = tz_replacer(arr) | ||
# is_list_like | ||
if hasattr(arr, '__iter__') and not \ | ||
isinstance(arr, string_and_binary_types): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you do this without the backslash? |
||
arr = [tz_replacer(s) for s in arr] | ||
else: | ||
arr = tz_replacer(arr) | ||
|
||
return np.array(arr, *args, **kwargs) | ||
|
||
|
||
__all__ = ['np', | ||
'_np_version_under1p10', | ||
'_np_version_under1p11', | ||
'_np_version_under1p12', | ||
'_np_version_under1p13', | ||
'_np_version_under1p14', | ||
'_np_version_under1p15' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,6 @@ | |
from pandas.tseries.frequencies import FreqGroup | ||
from pandas.core.indexes.period import Period, PeriodIndex | ||
|
||
from pandas.plotting._compat import _mpl_le_2_0_0 | ||
|
||
# constants | ||
HOURS_PER_DAY = 24. | ||
MIN_PER_HOUR = 60. | ||
|
@@ -371,13 +369,6 @@ def __init__(self, locator, tz=None, defaultfmt='%Y-%m-%d'): | |
if self._tz is dates.UTC: | ||
self._tz._utcoffset = self._tz.utcoffset(None) | ||
|
||
# For mpl > 2.0 the format strings are controlled via rcparams | ||
# so do not mess with them. For mpl < 2.0 change the second | ||
# break point and add a musec break point | ||
if _mpl_le_2_0_0(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since mpl has a min version of 2.0.0 don't we still need this check? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That was probably being used incorrectly. I don't think it would apply to 2.0.0 but not 2.0.1. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I made sure to test all available matplotlib versions, and while the removal of the code for 2.0.0 was an oversight, nothing in the test suite failed. As far as I can tell, 2.0.0 wasn't tested in the CI before, which is also the reason that several if-switches before this PR were strictly speaking wrong (when I removed the compat code in a way that just removed pre-2.0 branches, suddenly there were failures). |
||
self.scaled[1. / SEC_PER_DAY] = '%H:%M:%S' | ||
self.scaled[1. / MUSEC_PER_DAY] = '%H:%M:%S.%f' | ||
|
||
|
||
class PandasAutoDateLocator(dates.AutoDateLocator): | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you remove code related this this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure where code related to this would be hiding? There was nothing in
compat.__init__
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.