StackStorm / orquesta

Orquesta is a graph based workflow engine for StackStorm. Questions? https://github.com/StackStorm/st2/discussions
https://docs.stackstorm.com/orquesta/
Apache License 2.0
98 stars 39 forks source link

upgrade to latest networkx to allow running on py 3.9 #237

Closed Nick011 closed 3 years ago

Nick011 commented 3 years ago

Summary

Orquesta won't run on python 3.9+ because it currently has a dependency on networkx version 1.11. It doesn't look like the 1.x version of networkx has received any updates in quite a while. In Python 3.9, the gcd function used by networkx was moved from functions to math package in the standard lib as described here. This PR updates orquesta to use the latest version of networkx which is currently 2.5.1.

The code has been modified where necessary and all tests are passing on my machine with Python 3.9.5. Let me know if there is anything else necessary. Thanks.

Nick011 commented 3 years ago

Sorry, I should have mentioned that I'm using orquesta outside of stackstorm. I haven't tested this change with stackstorm. If there are functions in stackstorm that are receiving a graph object and calling the node attribute it will break with this upgrade.

[EDIT] Like here for example: https://github.com/StackStorm/st2/blob/55b92b4cf64d88d43c8be7b9401d502a660845ec/st2common/st2common/util/param.py#L159-L160

arm4b commented 3 years ago

@Nick011 Using Orquestra outside of StackStorm is really great to hear and I believe is a compliment to @m4dcoder who built it!

Can you briefly describe how you're using Orquesta? That would be interesting to hear.