Skip to content

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

Merged
m4dcoder merged 3 commits intoStackStorm:masterfrom
Nick011:chore/upgrade-networkx
Jun 3, 2021
Merged

upgrade to latest networkx to allow running on py 3.9#237
m4dcoder merged 3 commits intoStackStorm:masterfrom
Nick011:chore/upgrade-networkx

Conversation

@Nick011
Copy link
Copy Markdown
Contributor

@Nick011 Nick011 commented Jun 1, 2021

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.

@arm4b arm4b requested a review from m4dcoder June 1, 2021 21:06
m4dcoder added 2 commits June 2, 2021 23:53
Minor update to networkx in requirements.txt to allow for updates of minor
and patch releases to the networkx module.
Copy link
Copy Markdown
Collaborator

@m4dcoder m4dcoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Just a minor note here. StackStorm, where orquesta is used, currently supports python 3.6 and 3.8. The change here described in the title for python 3.9 didn't affect the unit tests for python 3.6 and 3.8. It's also a good idea to keep networkx up to date.

@m4dcoder m4dcoder merged commit b810993 into StackStorm:master Jun 3, 2021
@Nick011
Copy link
Copy Markdown
Contributor Author

Nick011 commented Jun 3, 2021

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
Copy link
Copy Markdown
Member

arm4b commented Jun 4, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants