Skip to content

Commit

Permalink
Merge pull request #429 from hmaarrfk/xarray_again_again
Browse files Browse the repository at this point in the history
More patching for xarray and pandas incompatibility
  • Loading branch information
ocefpaf authored Apr 6, 2023
2 parents cd1d754 + bc767ea commit 1d68ef2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions recipe/gen_patch_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -1612,10 +1612,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

0 comments on commit 1d68ef2

Please sign in to comment.