On 14-10-20 05:55 PM, Curtis Hovey wrote:
> The "versions" keys are arbitrary names :(. juju metadata will
> name it something like "20141020". We only get 1 key in versions,
> but the specification allows many. We don't care if there is 1 or
> many of these versions we only want to get the the next level,
> "items". The goal is to say all items on old are the same as the
> items in new, except we know that we sometimes add items and we
> have one removed items, once published without items, and on a few
> occasions change items.
>
> In Xpath, this is products/versions/*/items. I could change the
> test for items to be if isinstance(version, dict) and "items" in
> versions:
Okay, the code is fine as it stands, then.
>> + # needs a version to install to make streams, even when
>> it + # intends to remove something. + for n, t in
>> old_expected.items(): + if t['version'] == retracted:
>> + expected_differences.update([(n, t)])
>
> The goal was to state the expected differences to create a common
> set of old and new tools that must match in name a content.
Deleting entries from old_expected is perfectly sane. But why are
updating expected_differences? You don't use it anywhere, except the
"added" clause. And in the "added" clause, it can only cause a bug,
by falsely preventing the "missing.append(added)".
> So expected_differences was just a way to remove what we know to
> be different to prove nothing else is changed.
No, it doesn't do anything like that. All it does is prevent
"missing.append(added)", so that this version is not considered missing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 14-10-20 05:55 PM, Curtis Hovey wrote: versions/ */items. I could change the
> The "versions" keys are arbitrary names :(. juju metadata will
> name it something like "20141020". We only get 1 key in versions,
> but the specification allows many. We don't care if there is 1 or
> many of these versions we only want to get the the next level,
> "items". The goal is to say all items on old are the same as the
> items in new, except we know that we sometimes add items and we
> have one removed items, once published without items, and on a few
> occasions change items.
>
> In Xpath, this is products/
> test for items to be if isinstance(version, dict) and "items" in
> versions:
Okay, the code is fine as it stands, then.
>> + # needs a version to install to make streams, even when items() : + if t['version'] == retracted: differences. update( [(n, t)])
>> it + # intends to remove something. + for n, t in
>> old_expected.
>> + expected_
>
> The goal was to state the expected differences to create a common
> set of old and new tools that must match in name a content.
Deleting entries from old_expected is perfectly sane. But why are differences? You don't use it anywhere, except the append( added)" .
updating expected_
"added" clause. And in the "added" clause, it can only cause a bug,
by falsely preventing the "missing.
> So expected_ differences was just a way to remove what we know to
> be different to prove nothing else is changed.
No, it doesn't do anything like that. All it does is prevent append( added)" , so that this version is not considered missing.
"missing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQEcBAEBAgAGBQJ URnGpAAoJEK84cM Ocf+9hwDkIAJmJO GytVsStF5De6Mij LpV5 ShM38KIhT39CZ83 pJV4DY7yO3ajIi0 3/359j1rufRug4C xukxPGwq FRVqmpsCe1kaKX4 WC8gInLm2JLgFoM r/zXDWAL9jnZ8TM mEa7 3q9t4hMEoaNohaA aWj3vxbNWdm/ gasmtApMiqtLltH D1SNEm8czau +TTjROmo5uJqOR0 jPBOe1MoYdzzUY4 F/1QgqWlCEo6TEV TseU t+S8/GcBuqGOjT5 DIjHDIt1LYVPa4x ZYuBkHuP6loJmEy OZ4=
4G6YNYWhzp+
ByQO+/SuyvKZYpH
V0a9T/jNit/
py1qmtidjNd4R4q
rSuaU1aVG0ks63E
=GrUS
-----END PGP SIGNATURE-----