There are examples of porting code in the 4.0 release notes.
Old
ditherGroup.outputs.new("NodeSocketColor", "Color")
New
ditherGroup.interface.new_socket("Color", in_out='OUTPUT', socket_type="NodeSocketColor")
There are examples of porting code in the 4.0 release notes.
Old
ditherGroup.outputs.new("NodeSocketColor", "Color")
New
ditherGroup.interface.new_socket("Color", in_out='OUTPUT', socket_type="NodeSocketColor")