html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/6092#issuecomment-1002678841,https://api.github.com/repos/pydata/xarray/issues/6092,1002678841,IC_kwDOAMm_X847w6o5,5754163,2021-12-29T16:35:46Z,2021-12-29T16:35:46Z,NONE,This also happens in seaborn,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1085992113 https://github.com/pydata/xarray/issues/6092#issuecomment-999717645,https://api.github.com/repos/pydata/xarray/issues/6092,999717645,IC_kwDOAMm_X847lnsN,1828519,2021-12-22T16:44:32Z,2021-12-22T16:44:32Z,CONTRIBUTOR,"Yes, sorry, I meant `DuckArrayModule`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1085992113 https://github.com/pydata/xarray/issues/6092#issuecomment-999717002,https://api.github.com/repos/pydata/xarray/issues/6092,999717002,IC_kwDOAMm_X847lniK,10194086,2021-12-22T16:43:35Z,2021-12-22T16:43:35Z,MEMBER,"> I agree that .parse is the preferred method when you are taking a version string from an outside source. If you were using a static/constant string then it would probably be fine to use Version. True we could potentially use `version.parse(h5netcdf.core.h5py.__version__) >= version.Version(""3.0.0"")` in #6096. > I wasn't sure what the best approach would be for xarray given that LooseVersion is a public property on the duck array wrapper, right? I'm not sure if packaging's Version is backwards compatible and whether or not that matters inside xarray. Good point. It's not really backwards compatible. packagings Version cannot be compared to a string (while LooseVersion can). However, `DuckArrayModule` is probably not meant as a public interface - or were you referring to something else? https://github.com/pydata/xarray/blob/5e8de55321171f95ed9684c33aa47112bb2519ac/xarray/core/pycompat.py#L11-L13","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1085992113 https://github.com/pydata/xarray/issues/6092#issuecomment-999709747,https://api.github.com/repos/pydata/xarray/issues/6092,999709747,IC_kwDOAMm_X847llwz,1828519,2021-12-22T16:32:24Z,2021-12-22T16:32:24Z,CONTRIBUTOR,"@mathause I agree that `.parse` is the preferred method when you are taking a version string from an outside source. If you were using a static/constant string then it would probably be fine to use Version. I wasn't sure what the best approach would be for xarray given that LooseVersion is a public property on the duck array wrapper, right? I'm not sure if packaging's Version is backwards compatible and whether or not that matters inside xarray.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1085992113 https://github.com/pydata/xarray/issues/6092#issuecomment-999157464,https://api.github.com/repos/pydata/xarray/issues/6092,999157464,IC_kwDOAMm_X847je7Y,10194086,2021-12-21T23:16:17Z,2021-12-21T23:16:17Z,MEMBER,"We currently use `from distutils.version import LooseVersion` - any opinion if we should replace this by `version.parse` or by `version.Version`? ```python from distutils.version import LooseVersion from packaging import version LooseVersion(xr.__version__) version.parse(xr.__version__) version.Version(xr.__version__) # currently: if LooseVersion(mod.__version__) < LooseVersion(minversion): pass # options: if version.parse(mod.__version__) < version.parse(minversion): pass if version.Version(mod.__version__) < version.Version(minversion): pass if Version(mod.__version__) < Version(minversion): pass ``` See https://packaging.pypa.io/en/latest/version.html (I think `version.parse` either returns a `Version` or a `LegacyVersion`. A five minute search suggests this is the preferred method but probably someone has a more informed opinion.)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1085992113 https://github.com/pydata/xarray/issues/6092#issuecomment-999135386,https://api.github.com/repos/pydata/xarray/issues/6092,999135386,IC_kwDOAMm_X847jZia,14371165,2021-12-21T22:25:09Z,2021-12-21T22:25:09Z,MEMBER,"It's started to show up in the xarray CI as well now: https://github.com/pydata/xarray/runs/4600524127?check_suite_focus=true","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1085992113 https://github.com/pydata/xarray/issues/6092#issuecomment-999042101,https://api.github.com/repos/pydata/xarray/issues/6092,999042101,IC_kwDOAMm_X847jCw1,5635139,2021-12-21T19:36:14Z,2021-12-21T19:36:14Z,MEMBER,Thanks @djhoese . Looks like we can update `LooseVersion` to `packaging.version`...,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,1085992113