By default, jaraco.itertools.always_iterable treats a dictionary as a singleton, whereas more_itertools.always_iterable iterates over the dictionary's keys. This causes accessing Pod.subpods to error with ValueError: dictionary update sequence element #0 has length 1; 2 is required now, as when a subpod dictionary is passed to more_itertools.always_iterable, it will iterate over each of the keys, and when Subpod is initialized, it will attempt to cast each of those keys, rather than the entire subpod dictionary, to a dict.
It's so frustrating that although I contributed always_iterable to more_itertools, the implementation had to be tweaked to be less useful in situations like these.
25 is an issue with v4.1.0 rather than with the API.
https://github.com/jaraco/wolframalpha/commit/77bac9ad5bb730b9146a4cc09d1595c54fb6c678 changed https://github.com/jaraco/wolframalpha/blob/34f89546b2ae11766aebedad8560388e55421cf8/wolframalpha/__init__.py#L80 to use
more_itertools.always_iterable
rather thanjaraco.itertools.always_iterable
.By default,
jaraco.itertools.always_iterable
treats a dictionary as a singleton, whereasmore_itertools.always_iterable
iterates over the dictionary's keys. This causes accessingPod.subpods
to error withValueError: dictionary update sequence element #0 has length 1; 2 is required
now, as when a subpod dictionary is passed tomore_itertools.always_iterable
, it will iterate over each of the keys, and whenSubpod
is initialized, it will attempt to cast each of those keys, rather than the entire subpod dictionary, to adict
.