ID 480813 - list.sort() can no longer be used on a list of Nodes when sorting via Python

Follow

Problem summary
list.sort() can no longer be used on a list of Nodes when sorting via Python

Customer reported version
nuke.13.0v2

Customer reported platform
Windows 10

Steps to reproduce
1) Open Nuke

2) Create two Grade nodes

3) Run the following code in the Script Editor, it will error:

nodes = nuke.allNodes()
print(nodes)
nodes.sort()
print(nodes)

Expected behaviour
For the nodes to be sorted, and the new list to be printed

Actual behaviour
Nuke errors saying:
# Result: [<Grade2 at 0x0000028F9BE73B40>, <Grade1 at 0x0000028F9BE73BA0>, <Viewer1 at 0x0000028F9BE733C0>]
Traceback (most recent call last):
File "<string>", line 3, in <module>
TypeError: '<' not supported between instances of 'Node' and 'Node'

Workaround
Unknown.

Reproduced by support
This bug has been reproduced in:
Nuke 13.0v2 - Windows 10, CentOS 7.5, macOS 10.15
Nuke 13.0v1 - Windows 10, CentOS 7.5, macOS 10.15 - regression

Unable to reproduce bug in:
Nuke 12.2v7 - Windows 10, CentOS 7.5, macOS 10.15

Earliest version tested
Nuke 12.2v7 - This issue doesn't appear in this version and has regressed


    We're sorry to hear that

    Please tell us why