-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix min_deps_check; revert to support numpy=1.14 and pandas=0.24 #4178
Conversation
Fixes the issue noticed in: pydata#4175 (comment)
xarray/core/nputils.py
Outdated
@@ -14,6 +13,17 @@ | |||
_USE_BOTTLENECK = False | |||
|
|||
|
|||
def normalize_axis_index(data, axis): |
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 added this because I noticed it when manually reverting the quantile change from https://github.com/pydata/xarray/pull/3713/files
policy_major = req_major | ||
policy_minor = req_minor | ||
policy_published_actual = req_published | ||
for (major, minor), published in reversed(sorted(versions.items())): | ||
if published < policy_published: | ||
break |
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'm not entirely sure why this was broken, but the new logic is significantly simpler so I'm more confident it's correct. In particular, it determines the policy versions without using the currently required versions as defaults.
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.
An alternative implement of the original policy that is possibly clearer:
policy_major = req_major | |
policy_minor = req_minor | |
policy_published_actual = req_published | |
for (major, minor), published in reversed(sorted(versions.items())): | |
if published < policy_published: | |
break | |
# "the minor version (X.Y) initially published no more than N months ago" | |
policy_major, policy_minor = min( | |
(version for version, date in versions.items() if date > policy_published), | |
default=(req_major, req_minor), | |
) |
Marking this as a draft -- as noted in #4175 (comment), I just misread our current policy. |
With the three releases (v0.16.0, v0.16.1, v0.16.2) since this PR, is this PR still relevant? |
I think we still want the updates to |
Fixes the issue noticed in:
#4175 (comment)
Let's see if this passes CI...
isort -rc . && black . && mypy . && flake8