Repository navigation
Require NumPy 1.18+ & Pandas 1.0+ - #7939
Conversation
|
cc @jsignell @pentschev (in case either of you have thoughts here) |
22e3531 to
0698898
Compare
|
Have dropped a bunch of compatibility code. Please let me know if I missed any 🙂 |
| if has_keyword(meta.apply, "engine"): | ||
| # PANDAS_GT_100 | ||
| compat_kwargs = dict(engine=engine, engine_kwargs=engine_kwargs) | ||
| elif engine != "cython" or engine_kwargs is not None: | ||
| raise NotImplementedError( | ||
| f"Specifying the engine requires pandas>=1.0.0. Version '{PANDAS_VERSION}' installed." | ||
| ) | ||
| if raw is None: | ||
| # PANDAS_GT_100: The default changed from None to False | ||
| raw = inspect.signature(meta.apply).parameters["raw"] |
There was a problem hiding this comment.
Looks like the middle branch can be dropped. Not sure if there are other things needed to cleanup this code
jrbourbeau
left a comment
There was a problem hiding this comment.
Similar to the other conda environment files you already updated, we'll need to update our array/dataframe minimum dependencies environment here:
dask/continuous_integration/environment-mindeps-array-dataframe.yaml
Lines 13 to 15 in 8d49c3f
36d4aab to
d4f3d5d
Compare
| # Regression test for __array_function__ becoming default in numpy 1.17 | ||
| # dask has no sort function, so ensure that this still calls np.sort | ||
| x = da.from_array(np.array([1, 2, 4, 3]), chunks=(2,)) | ||
| if IS_NEP18_ACTIVE: | ||
| with pytest.warns( | ||
| FutureWarning, match="The `numpy.sort` function is not implemented by Dask" | ||
| ): | ||
| assert list(np.sort(x)) == [1, 2, 3, 4] | ||
| else: | ||
| with pytest.warns( | ||
| FutureWarning, match="The `numpy.sort` function is not implemented by Dask" | ||
| ): | ||
| assert list(np.sort(x)) == [1, 2, 3, 4] |
There was a problem hiding this comment.
Left the comment above in and kept the test as these seem to still make sense. Though please let me know if not
|
Just wanted to note that the documentation build failure is totally unrelated to the changes here and is being addressed over in #7943 |
|
Taking a look now. Would you mind merging |
Thanks James! 😄
Right forgot about that. Have now merged it in 🙂 |
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks for handling all this @jakirkham! Overall these changes look good. I do have a question about whether we should keep the existing IS_NEP18_ACTIVE logic or not
Co-authored-by: James Bourbeau <[email protected]>
|
Thanks James! 😄 Included a few changes that should address those concerns. Had some more thoughts on the environment variable |
jrbourbeau
left a comment
There was a problem hiding this comment.
The only lingering topic here is whether or not we're okay bumping our minimum pyarrow version to 1.0. Generally folks seem on board with this, so I'll suggest we move forward with the minimum version bump. I think the only things left to do are:
- Updating our minimum listed
pyarrowversion to 1.0 indocs/source/install.rst - Remove the corresponding
pyarrowcompatibility code. Grepping for_pa_version,pa.__version__,pyarrow <, andpyarrow >revealed a few lines we can remove
|
Sounds good James. Have pushed those changes. There was one check for |
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks for all your work on this @jakirkham! This looks good to merge
There were some surprising test failures that looked totally unrelated to the changes here, so I pushed an empty commit to rerun CI. Will merge if CI passes
|
Given it sounds like we are doing a hot-fix release ( dask/community#173 ) do we want to merge this after that? |
|
Ha, I had the opposite thought about when to merge this PR relative to the release (dask/community#173 (comment)). It's probably not a big deal either way, happy to merge this after the release 👍 |
|
Yeah was just thinking of the user that needs the bug fix, but isn't quite ready to upgrade yet. Though Idk if it matters much, they will still need to upgrade at some point :) IOW ok either way |
|
Thanks all! 😄 Hoping this simplifies maintenance going forward 🙂 |
Following up on the discussion in issue ( #7378 ), this bumps the minimums to NumPy 1.18+ and Pandas 1.0+.
black dask/flake8 dask/isort dask