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

More patching for xarray and pandas incompatibility #429

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions recipe/gen_patch_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -1602,10 +1602,14 @@ def _gen_new_index_per_key(repodata, subdir, index_key):
and packaging.version.Version(record["version"]) <= packaging.version.Version("2023.1.0")
and record.get("timestamp", 0) < 1680700334000
):
_replace_pin("pandas >=1.0", "pandas >=1.0,<2a0", deps, record)
_replace_pin("pandas >=1.1", "pandas >=1.1,<2a0", deps, record)
_replace_pin("pandas >=1.2", "pandas >=1.2,<2a0", deps, record)
_replace_pin("pandas >=1.3", "pandas >=1.3,<2a0", deps, record)
for d in deps:
# really old version of xarray e.g. 0.8 didn't specify any lower bound
if d == "pandas":
_replace_pin("pandas", "pandas <2.0a", deps, record)
break
elif d in ["pandas >=1.3", "pandas >=1.2", "pandas >=1.1", "pandas >=1.0", "pandas >=0.25", "pandas >=0.24", "pandas >=0.18", "pandas >=0.19.2"]:
_replace_pin(d, d + ",<2a0", deps, record)
break

if record_name == "xarray" and packaging.version.Version(record["version"]) == packaging.version.Version("2023.2.0"):
_replace_pin("pandas >=1.4", "pandas >=1.4,<2a0", deps, record)
Expand Down