-
-
Notifications
You must be signed in to change notification settings - Fork 751
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
Various Python 3 related fixes and changes #4424
Conversation
script. This way user can also use Python 3 virtualenv for launchdev.
options are not set.
each BlockingScheduler class constructor.
registered as common options inside st2common.
advertised. We advertise "timersengine" section as new and preferred way of configuring timers engine service and "timer" config options are deprecated. Because of the way how the code was structured[1], even if user would specify only "timersengine" section in st2.conf, those options would not be used, but default options from config.py for "timer" section would be used. This pull request fixes that to work as advertised / inteded - "timer" section should only be used if explicitly specified in st2.conf and timersengine should have precedence over it. [1]: https://github.com/StackStorm/st2/blob/0245a18198babafe2ab0abde31791cf526435234/st2reactor/st2reactor/cmd/timersengine.py#L59
And for people who want to test Python 3 stuff locally, they can now do this: make requirements
source virtualenv/bin/activate # this is needed to ensure latest version of virtualenv binary is used by Python 3 aka Python 2 virtual environment needs to exist already
PYTHON_VERSION=python3.6 VIRTUALENV_DIR=virtualenv-py3 make requirements
source virtualenv-py3/bin/activate
VIRTUALENV=virtualenv-py3 ./tools/launchdev.sh start This will create a new virtual environment using Python 3.6 binary and start all the services using this new virtual environment. Keep in mind that this command requires Python 3.6, python3-virtualenv, etc. be installed on the system. |
@@ -13,7 +13,7 @@ else | |||
VIRTUALENV_ST2CLIENT_DIR ?= virtualenv-st2client | |||
endif | |||
|
|||
PYTHON_VERSION = python2.7 | |||
PYTHON_VERSION ?= python2.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. Things you learn :)
# NOTE: "timer" section will be removed in v3.1 | ||
timer_opts = [ | ||
cfg.StrOpt( | ||
'local_timezone', default=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the original code and default=True for both timers and timersengine was pretty dumb on my part. I now get what you mean. Good catch.
I uncovered some more Python 3 related issues while working on Bionic pacakges.
This pull request includes the following changes / fixes:
st2garbagecollector
service to launchdev scriptVIRTUALENV
environment variable - this allows people to use it with a Python 3 virtual environmentst2-pack-install
so it works under Python 3timezone
kwarg toBlockingScheduler
class constructor