Skip to content
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

[WIP] Investigate if ST2 runs with python 3.10 #5843

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

amanda11
Copy link
Contributor

@amanda11 amanda11 commented Dec 8, 2022

No description provided.

@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines. Good size to review. label Dec 8, 2022
@amanda11 amanda11 marked this pull request as draft December 8, 2022 15:32
@amanda11
Copy link
Contributor Author

amanda11 commented Dec 8, 2022

Bumping eventlet will require gunicorn update - see #5257

@Kami
Copy link
Member

Kami commented Dec 8, 2022

While at it, it may also make sense to research / test if it works under Python 3.11 since there aren't that many differences between 3.10 and 3.11.

3.11 includes specializing adaptive interpreter (https://peps.python.org/pep-0659/) which operates on Python byte code level which offers nice performance in some situations on pure Python code.

Granted, StackStorm depends on a lot of libraries with C extensions, but there is still plenty of pure Python code and who knows, it may also bring nice performance improvements to StackStorm.

I've done some micro and end to end benchmarks on a similar Python project (majority is Python code, but also a lot of libraries with C extensions for performance critical code - scalyr/scalyr-agent-2) and we've seen some nice improvements in terms of performance and lower CPU usage (even in the places we haven't really expected it due to the code mostly calling library with C extension).

@pull-request-size pull-request-size bot added size/L PR that changes 100-499 lines. Requires some effort to review. and removed size/M PR that changes 30-99 lines. Good size to review. labels Dec 8, 2022
@amanda11
Copy link
Contributor Author

amanda11 commented Dec 8, 2022

We need to move away from nose which is not maintained and not py 3.10 compatible. It is cause of this error:

  File "/home/runner/work/st2/st2/virtualenv/lib/python3.10/site-packages/nose/suite.py", line 106, in _set_tests
    if isinstance(tests, collections.Callable) and not is_suite:
AttributeError: module 'collections' has no attribute 'Callable'

We are moving to using pytest as part of the pants work, so ignore the nose errors, as we will be moving tests to pytest..

@amanda11
Copy link
Contributor Author

amanda11 commented Dec 8, 2022

Also ignoring the fact that some of the libraries will break python 3.6. With pants we should be able to have different libraries for python 3.6 to python 3.10 -> so aim of PR is to see what we can use to get python 3.10 to work...

@amanda11
Copy link
Contributor Author

amanda11 commented Dec 8, 2022

Although the lint checks fail as say configgen hasn't been re-generated. The re-generated one it compares against is invalid, so need to fix the config generation first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L PR that changes 100-499 lines. Requires some effort to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants