Skip to content

Commit

Permalink
Patch jsonschema dependency for altair.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtilly committed Jan 16, 2023
1 parent 2b1ad54 commit a6cff54
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions recipe/gen_patch_json.py
Expand Up @@ -2365,6 +2365,25 @@ def _gen_new_index_per_key(repodata, subdir, index_key):
):
record["depends"].append("bottleneck")

# altair 4.2.0 and below are incompatible with jsonschema>=4.17 when certain
# other packages are installed; this was fixed in
# https://github.com/conda-forge/altair-feedstock/pull/41
if (
record_name == "altair"
and pkg_resources.parse_version(record["version"]).major == 4
and record.get("timestamp", 0) <= 1673569551000
):

if pkg_resources.parse_version(record["version"]) < pkg_resources.parse_version("4.2.0"):
_replace_pin("jsonschema", "jsonschema <4.17", record["depends"], record)

if pkg_resources.parse_version(record["version"]) == pkg_resources.parse_version("4.2.0"):
_replace_pin("jsonschema >=3.0", "jsonschema >=3.0,<4.17", record["depends"], record)

# this also applies the fix from https://github.com/conda-forge/altair-feedstock/pull/40
_replace_pin("jsonschema", "jsonschema >=3.0,<4.17", record["depends"], record)


return index


Expand Down

0 comments on commit a6cff54

Please sign in to comment.