-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: '>' not supported between instances of 'NoneType' and 'NoneType' #83
Labels
Comments
Somehow related (I think) when trying to show old upgradesteps from a package...
the upgradeSteps list looks like this:
but this has to be package related too, because other packages list old steps without error ... |
Peter Mathis wrote at 2019-8-5 04:51 -0700:
Somehow related (I think) when trying to show old upgradesteps from a package...
```
Traceback (innermost last):
...
Module Products.GenericSetup.tool, line 1002, in listUpgrades
Module Products.GenericSetup.upgrade, line 270, in listUpgradeSteps
TypeError: '<' not supported between instances of 'dict' and 'dict'
...
the upgradeSteps list looks like this:
```
(Pdb++) res
[((<Version('7')>, 0, True), {'id': '1354697375542359044', 'step': <Products.GenericSetup.upgrade.UpgradeDepends object at 0x10c95ba58>, 'title': 'New Target Collection registry value, Update Resources', 'source': ('7',), 'dest': ('8',), 'description': '', 'proposed': True, 'sortkey': 0}),
((<LegacyVersion('')>, 0, True), {'id': '1403960353036550788', 'step': <Products.GenericSetup.upgrade.UpgradeStep object at 0x10c95ba20>, 'title': 'Reapply profile to fix bundle registration', 'source': None, 'dest': ('8',), 'description': '', 'proposed': True, 'sortkey': 0}),
((<LegacyVersion('')>, 0, True), {'id': '2060881595769228994', 'step': <Products.GenericSetup.upgrade.UpgradeStep object at 0x10c913978>, 'title': 'Reapply profile to fix bundle registration', 'source': None, 'dest': ('7',), 'description': '', 'proposed': True, 'sortkey': 0}),
((<Version('8')>, 0, True), {'id': '2538933861421866518', 'step': <Products.GenericSetup.upgrade.UpgradeDepends object at 0x10c95bef0>, 'title': 'Update Resources', 'source': ('8',), 'dest': ('9',), 'description': '', 'proposed': True, 'sortkey': 0}),
((<Version('2')>, 0, True), [{'id': '8367781049433168419', 'step': <Products.GenericSetup.upgrade.UpgradeDepends object at 0x10c95b7f0>, 'title': 'Register bundle differently to avoid Select2 initialization error', 'source': ('2',), 'dest': ('3',), 'description': '', 'proposed': True, 'sortkey': 0}]),
((<Version('1')>, 0, True), {'id': '964901385060890629', 'step': <Products.GenericSetup.upgrade.UpgradeStep object at 0x10c913a20>, 'title': 'Portlet upgrade for new filter_type attribute', 'source': ('1',), 'dest': ('2',), 'description': '', 'proposed': True, 'sortkey': 0})]
```
but this has to be package related too, because other packages list old steps without error ...
`res` contains a list of tuples. Sorting it will perform
a lexicographic sort on those tuples where later tuple components
are only compared when the former components compared equal.
This will happen with `res` for the two tuples involving `LegacyVersion('')`.
The solution will be to use an appripriate `key` parameter
for the `sort` operation. I am unsure whether `lambda t: t[0]`
is already sufficient (effectively sorting only on the first tuple
component) or wether it must also contain parts of the second
component (maybe `sortkey`).
|
gogobd
added a commit
to gogobd/Products.GenericSetup
that referenced
this issue
Apr 9, 2021
Fixing zopefoundation#83 by being more careful
Closed
gogobd
added a commit
to gogobd/Products.GenericSetup
that referenced
this issue
Apr 9, 2021
gogobd
added a commit
that referenced
this issue
Jul 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Plone 5.2RC5, GS 2.0
The
version
parameter and thealready['version']
are bothNone
.Possibly a bad package configuration. However the error message is not directly helpful here.
The text was updated successfully, but these errors were encountered: