dask / dask-yarn

Deploy dask on YARN clusters
http://yarn.dask.org
BSD 3-Clause "New" or "Revised" License
69 stars 41 forks source link

Address deprecations introduced in distributed==2021.07.0 #150

Closed jameskrach closed 3 years ago

jameskrach commented 3 years ago

distributed==2021.07.0 raises a FutureWarning on calling distributed.utils.format_bytes and distributed.utils.parse_timedelta and suggests using functions of the same name from dask.utils.

Because dask-yarn==0.9.0 requires dask>=2021.1.0, and because format_bytes and parse_timedelta both exist in dask>=2021.1.0, this deprecation can be fixed with no user impact by changing the imports to use dask.utils

This PR applies those changes to imports. I'm unfamiliar with versioneer, but I imagine the version should be updated to e.g. 0.10.0.

jacobtomlinson commented 3 years ago

Many thanks @jameskrach. I see this is your first time contributing here, welcome!

jameskrach commented 3 years ago

Thanks! Always a pleasure to help folks who build great tools. Appreciate the quick review

dpdrmj commented 1 year ago

is there any plan on releasing this with any of the distribution? Seeing errors after installing latest dask_yarn through pip while doing the import on 0.9.0 dask-yarn from dask_yarn import YarnCluster. Had to install it through the main branch to make it work.