From aef8b7fef1e87012a86b3c85be20cdf4e02f1ecf Mon Sep 17 00:00:00 2001 From: RRosio Date: Tue, 1 Aug 2023 08:30:21 -0700 Subject: [PATCH 1/2] patch notebook < 7 dependencies for jupyter_client and pyzmq --- recipe/gen_patch_json.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/recipe/gen_patch_json.py b/recipe/gen_patch_json.py index 851136f17..1fa1d040f 100644 --- a/recipe/gen_patch_json.py +++ b/recipe/gen_patch_json.py @@ -1706,6 +1706,26 @@ def _gen_new_index_per_key(repodata, subdir, index_key): i = record["depends"].index("pyyaml") record["depends"][i] = "pyyaml >=6.0" + # Notebook 6.5.5 pins the versions of jupyter_client to < 8 + # and pyzmq>=25 as a temporary fix for issue + # https://github.com/jupyter/notebook/issues/4439 + # all versions of Notebook < 7 should at least pin to + # jupyter_client < 8 and pyzmq < 25 as in + # https://github.com/jupyter/notebook/pull/6749 + if record_name == "notebook" and int(record["version"].split(".", 1)[0]) < 7: + if "jupyter_client>=5.3.4" in record["depends"]: + i = record["depends"].index("jupyter_client>=5.3.4") + record["depends"][i] = "jupyter_client >=5.3.4,<8" + if "jupyter_client >=5.2.0" in record["depends"]: + i = record["depends"].index("jupyter_client >=5.2.0") + record["depends"][i] = "jupyter_client >=5.2.0,<8" + if "jupyter_client" in record["depends"]: + i = record["depends"].index("jupyter_client") + record["depends"][i] = "jupyter_client <8" + if "pyzmq >=17" in record["depends"]: + i = record["depends"].index("pyzmq >=17") + record["depends"][i] = "pyzmq >=17,<25" + # librmm 0.19 missed spdlog 1.7.0 in build 1 # due to spdlog 1.7.0 not having run_exports. # This hotfixes those packages From 21e60fd37f70fa7f88caf47fb2c1a0985452c000 Mon Sep 17 00:00:00 2001 From: RRosio Date: Thu, 3 Aug 2023 11:49:47 -0700 Subject: [PATCH 2/2] adding condition to look at packages built in past, as per review --- recipe/gen_patch_json.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipe/gen_patch_json.py b/recipe/gen_patch_json.py index 1fa1d040f..a7985d199 100644 --- a/recipe/gen_patch_json.py +++ b/recipe/gen_patch_json.py @@ -1712,7 +1712,11 @@ def _gen_new_index_per_key(repodata, subdir, index_key): # all versions of Notebook < 7 should at least pin to # jupyter_client < 8 and pyzmq < 25 as in # https://github.com/jupyter/notebook/pull/6749 - if record_name == "notebook" and int(record["version"].split(".", 1)[0]) < 7: + if ( + record_name == "notebook" + and int(record["version"].split(".", 1)[0]) < 7 + and record.get("timestamp", 0 < 1691084500000) + ): if "jupyter_client>=5.3.4" in record["depends"]: i = record["depends"].index("jupyter_client>=5.3.4") record["depends"][i] = "jupyter_client >=5.3.4,<8"