-
-
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
Conversation
Hello @h-vetinari! Thanks for updating the PR.
Comment last updated on October 12, 2018 at 16:26 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #23062 +/- ##
==========================================
+ Coverage 92.14% 92.19% +0.04%
==========================================
Files 170 170
Lines 51017 50963 -54
==========================================
- Hits 47011 46984 -27
+ Misses 4006 3979 -27
Continue to review full report at Codecov.
|
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.
Generally good; looks like there's a dependency conflict between bottleneck and numpy
ci/azure-macos-35.yaml
Outdated
@@ -11,7 +11,7 @@ dependencies: | |||
- matplotlib | |||
- nomkl | |||
- numexpr | |||
- numpy=1.10.4 | |||
- numpy=1.12.1 |
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.
Most of the code / docs point to 1.12.0 but this is 1.12.1 - any reason for the minor version bump here?
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.
Nope, that was an oversight...
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.
Can you also add the minimum version to the appropriate requirements file(s) in the ci folder?
FYI I know that bumping Matplotlib to a min of 2.0 also calls for some code cleanup / removal. OK to tackle that in a separate PR - do you mind opening the issue for that?
@WillAyd |
i don’t think any real urgency to bump numexpr or bottleneck mins we generally try to allow packages to continue to work as much as possible |
I only bumped them because anything lower is not compatible with numpy>=1.12 (you can check the respective builds to see that always something was failing due to unresolvable dependencies) |
@@ -72,18 +70,9 @@ def _maybe_valid_colors(colors): | |||
# check whether each character can be convertible to colors | |||
maybe_color_cycle = _maybe_valid_colors(list(colors)) | |||
if maybe_single_color and maybe_color_cycle and len(colors) > 1: | |||
# Special case for single str 'CN' match and convert to hex | |||
# for supporting matplotlib < 2.0.0 | |||
if re.match(r'\AC[0-9]\Z', colors) and _mpl_ge_2_0_0(): |
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.
Think we still need the condition to check the pattern match here, no?
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.
It already said under else
that "this may no longer be required". So I wanted to see if removing it still passes the test suite
pandas/tests/plotting/test_frame.py
Outdated
@@ -854,7 +847,7 @@ def test_area_lim(self): | |||
@pytest.mark.slow | |||
def test_bar_colors(self): | |||
import matplotlib.pyplot as plt | |||
default_colors = self._maybe_unpack_cycler(plt.rcParams) | |||
default_colors = [v['color'] for v in plt.rcParams['axes.prop_cycle']] |
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.
Any reason you decided to replace the method with a list comp? The couple calls would probably be more readable if left alone
@@ -72,18 +70,9 @@ def _maybe_valid_colors(colors): | |||
# check whether each character can be convertible to colors | |||
maybe_color_cycle = _maybe_valid_colors(list(colors)) | |||
if maybe_single_color and maybe_color_cycle and len(colors) > 1: | |||
# Special case for single str 'CN' match and convert to hex | |||
# for supporting matplotlib < 2.0.0 | |||
if re.match(r'\AC[0-9]\Z', colors) and _mpl_ge_2_0_0(): |
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.
It already said under else
that "this may no longer be required". So I wanted to see if removing it still passes the test suite
@@ -510,20 +493,6 @@ def is_grid_on(): | |||
obj.plot(kind=kind, grid=True, **kws) | |||
assert is_grid_on() | |||
|
|||
def _maybe_unpack_cycler(self, rcParams, field='color'): | |||
""" | |||
Compat layer for MPL 1.5 change to color cycle |
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.
@WillAyd This sounded like it was only for compat. But I'll add it back in as convenience instead of the list comps
f4f5b46
to
f81ad9f
Compare
f4f5b46
to
c29b478
Compare
doc/source/whatsnew/v0.24.0.txt
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
remove the issue part here it is not necessary
In core.ops there is a try/except for |
pandas/compat/numpy/__init__.py
Outdated
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Can you do this without the backslash?
997dd9d
to
079bdaf
Compare
I've been troubleshooting the same problem here, please let me know if you figure it out |
I understand now why no-one touched the matplotlib compat for a long time (e.g. In any case, I've now got a passing CI on all mpl builds again in 079bdaf (after the false positive from azure; there are no pins or changed code paths for matplotlib in Circle, which is lagging behind due to not cancelling on new pushes): Reverting the pins, then this thing should be done... @TomAugspurger @jreback another quick look? |
pls rebase not you will have to rebase somewhat frequently until this is merged |
What's the hold-up on getting this merged soon? |
PS. Can someone trigger the circleCI runs? not sure why they didn't start. |
this. needs review for the plotting changes |
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.
Plotting changes look fine. Thanks for cleaning that up @h-vetinari.
I don't see any way to trigger a circle build from their UI. Probably easiest to add an empty commit. |
lgtm. @WillAyd if ok, pls accept, but after that @h-vetinari will need a rebase then, just before merging to make sure nothing has changed. (you can rebase now if you want). |
Not much happened in the last 17h (3 commits), but ok. |
# 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 comment
The 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 comment
The 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 comment
The 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).
thanks @h-vetinari |
This was quite the effort I have to say. MPL has some really weird behaviour in that (e.g.) several times in
Not 100% sure this is not overlaid with some numpy/system dependencies as well, but happy that right now everything passes and got merged. |
git diff upstream/master -u -- "*.py" | flake8 --diff
Spurred on also partly by compat failure of #22725. ;-)