@@ -683,7 +683,9 @@ async def rpc(self, msg: dict[str, _RichJson]) -> _Json:
683683 @classmethod
684684 def from_json (cls , data : Type | str | dict [str , Any ] | list [Any ]) -> Self | None :
685685 def _parse_nested_list_entry (expr , result_dict ):
686+ # FIXME if no client uses this data, can we drop this?
686687 if isinstance (expr , str ):
688+ # FIXME no top-level use
687689 raise Exception (f"Ouch { expr = } " )
688690 if ">" in expr or ">=" in expr :
689691 # something like juju >= 2.9.31
@@ -695,11 +697,15 @@ def _parse_nested_list_entry(expr, result_dict):
695697 # this is a simple entry
696698 result_dict [expr ] = ""
697699 elif isinstance (expr , dict ):
700+ # FIXME no top-level use
698701 raise Exception (f"Ouch { expr = } " )
699702 for v in expr .values ():
700703 _parse_nested_list_entry (v , result_dict )
701704 elif isinstance (expr , list ):
702- raise Exception (f"Ouch { expr = } " )
705+ # FIXME test vectors from quarantined integration tests
706+ # expr=['juju', {'any-of': [{'all-of': ['juju >= 2.9.49', 'juju < 3']}, {'all-of': ['juju >= 3.4.3', 'juju < 3.5']}, {'all-of': ['juju >= 3.5.1', 'juju < 4']}]}]
707+ # expr=['juju', {'any-of': [{'all-of': ['juju >= 2.9.44', 'juju < 3']}, {'all-of': ['juju >= 3.4.3', 'juju < 4']}]}]
708+ # expr=['juju', {'any-of': [{'all-of': ['juju >= 2.9.44', 'juju < 3']}, {'all-of': ['juju >= 3.4.3', 'juju < 4']}]}]
703709 for v in expr :
704710 _parse_nested_list_entry (v , result_dict )
705711 else :
0 commit comments