Skip to content
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

update minimum versions and associated code cleanup #2204

Merged
merged 17 commits into from
Jul 8, 2018
Merged

update minimum versions and associated code cleanup #2204

merged 17 commits into from
Jul 8, 2018

Conversation

jhamman
Copy link
Member

@jhamman jhamman commented May 30, 2018

This updates the following minimum versions:

  • numpy: 1.11 (Mar 27, 2016) --> 1.12 (Jan 15, 2017)
  • pandas: 0.18 (Mar 11, 2016) --> 0.19 (Oct 2, 2016)
  • dask: 0.9 (May 10, 2016) --> 0.16

and drops our tests for python 3.4.

Copy link
Collaborator

@max-sixty max-sixty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @jhamman

@@ -41,7 +41,7 @@ For accelerating xarray
For parallel computing
~~~~~~~~~~~~~~~~~~~~~~

- `dask.array <http://dask.pydata.org>`__ (0.9.0 or later): required for
- `dask.array <http://dask.pydata.org>`__ (0.XX or later): required for
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the subject of #2203. I just wanted to make sure it was flagged for an update as part of this PR.

@@ -74,7 +74,7 @@ def _importorskip(modname, minversion=None):
has_rasterio, requires_rasterio = _importorskip('rasterio')
has_pathlib, requires_pathlib = _importorskip('pathlib')
has_zarr, requires_zarr = _importorskip('zarr', minversion='2.2')
has_np112, requires_np112 = _importorskip('numpy', minversion='1.12.0')
has_np113, requires_np113 = _importorskip('numpy', minversion='1.12.0')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be minversion='1.13.0'?

raise ValueError("axis=%i is invalid for the %i-dimensional "
"input array" % (axis, m.ndim))
return m[tuple(indexer)]
as_strided = np.lib.stride_tricks.as_strided
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could push this down into the caller, rather than maintain a layer here (but also fine as-is!)

@jhamman jhamman added this to the 0.11 milestone May 30, 2018
- numpy==1.11
- pandas==0.18.0
- numpy==1.12
- pandas==0.20
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anaconda doesn't have a pandas 0.19 build with numpy 1.12 so I've bumped another version to 0.20.

# Using `unittest.skipUnless` is a temporary workaround for pytest#568,
# wherein class decorators stain inherited classes.
# xref: xarray#1531, implemented in xarray #1557.
func = unittest.skipUnless(has, reason='requires {}'.format(modname))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fixed a few versions ago in pytest

@jhamman
Copy link
Member Author

jhamman commented Jun 1, 2018

@shoyer - when you get a chance, it may be worth looking over the failing travis build. I've pinned dask to 0.16 in the py35 build and am getting a handful of failures, particularly with dask distributed.

@Zac-HD
Copy link
Contributor

Zac-HD commented Jun 11, 2018

@jhamman - also closes #2211. Note though that you have to put the word "closes" (or "fixes") before each issue reference; it doesn't handle CSV so they don't get closed, and that's an easy way to have zombie issues that cause some confusion later.

@jhamman
Copy link
Member Author

jhamman commented Jun 13, 2018

I'm lost on how to finish this up. Even bumping dask to 0.16 and distributed to 1.20, I can't seem to get the python 3.5 tests to pass. Does anyone have thoughts on how best to proceed here? We can skip the failing tests but in my opinion, that defeats the purpose of setting a minimum version.

@shoyer
Copy link
Member

shoyer commented Jun 13, 2018

Should we say that we require an even newer version of dask-distributed if you're using it, e.g., 1.21?

If old versions of distributed don't work with xarray, one option would be to simply drop distributed from the "compatibility" build in Travis-CI.

@jhamman
Copy link
Member Author

jhamman commented Jul 7, 2018

I managed to get the dask tests working here. This is ready to be merged.

Copy link
Member

@fujiisoup fujiisoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@shoyer shoyer merged commit 1688a59 into pydata:master Jul 8, 2018
@shoyer
Copy link
Member

shoyer commented Jul 8, 2018

thanks @jhamman !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update minimum version of dask DEPS: drop numpy < 1.12 Drop support for Python 3.4
5 participants