Skip to content

Commit 8639dab

Browse files
authored
Merge pull request #4410 from StackStorm/update_deps_300
Update dependencies to latest stable versions
2 parents 6066b11 + 2ea60a4 commit 8639dab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+123
-115
lines changed

CHANGELOG.rst

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Changed
4848

4949
If user wants to retrieve and view all the attributes, they can use ``--attr all`` CLI command
5050
argument (same as before). (improvement) #4396
51+
* Update various internal dependencies to latest stable versions (greenlet, pymongo, pytz,
52+
stevedore, tooz). #4410
5153

5254
Fixed
5355
~~~~~

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ requirements: virtualenv .sdist-requirements install-runners
383383
$(VIRTUALENV_DIR)/bin/pip install "six==1.11.0"
384384

385385
# Fix for Travis CI caching issue
386-
$(VIRTUALENV_DIR)/bin/pip uninstall -y "pytz"
386+
$(VIRTUALENV_DIR)/bin/pip uninstall -y "pytz" || echo "not installed"
387+
$(VIRTUALENV_DIR)/bin/pip uninstall -y "python-dateutil" || echo "not installed"
387388

388389
# Install requirements
389390
#

contrib/runners/action_chain_runner/tests/unit/test_actionchain.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -702,8 +702,8 @@ def test_chain_task_passes_invalid_parameter_type_to_action(self, mock_request):
702702
chain_runner.pre_run()
703703

704704
action_parameters = {}
705-
expected_msg = ('Failed to cast value "stringnotanarray" \(type: str\) for parameter '
706-
'"arrtype" of type "array"')
705+
expected_msg = (r'Failed to cast value "stringnotanarray" \(type: str\) for parameter '
706+
r'"arrtype" of type "array"')
707707
self.assertRaisesRegexp(ValueError, expected_msg, chain_runner.run,
708708
action_parameters=action_parameters)
709709

contrib/runners/local_runner/local_runner/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ def _run(self, action):
182182

183183
# Detect if user provided an invalid sudo password or sudo is not configured for that user
184184
if self._sudo_password:
185-
if re.search('sudo: \d+ incorrect password attempts', stderr):
186-
match = re.search('\[sudo\] password for (.+?)\:', stderr)
185+
if re.search(r'sudo: \d+ incorrect password attempts', stderr):
186+
match = re.search(r'\[sudo\] password for (.+?)\:', stderr)
187187

188188
if match:
189189
username = match.groups()[0]

contrib/runners/orquesta_runner/tests/unit/test_error_handling.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ def test_fail_inspection(self):
111111
{
112112
'type': 'content',
113113
'message': 'The action "std.noop" is not registered in the database.',
114-
'schema_path': 'properties.tasks.patternProperties.^\w+$.properties.action',
114+
'schema_path': r'properties.tasks.patternProperties.^\w+$.properties.action',
115115
'spec_path': 'tasks.task3.action'
116116
},
117117
{
118118
'type': 'context',
119119
'language': 'yaql',
120120
'expression': '<% ctx().foobar %>',
121121
'message': 'Variable "foobar" is referenced before assignment.',
122-
'schema_path': 'properties.tasks.patternProperties.^\w+$.properties.input',
122+
'schema_path': r'properties.tasks.patternProperties.^\w+$.properties.input',
123123
'spec_path': 'tasks.task1.input',
124124
},
125125
{
@@ -131,7 +131,7 @@ def test_fail_inspection(self):
131131
'position 0 of expression \'<% succeeded()\''
132132
),
133133
'schema_path': (
134-
'properties.tasks.patternProperties.^\w+$.'
134+
r'properties.tasks.patternProperties.^\w+$.'
135135
'properties.next.items.properties.when'
136136
),
137137
'spec_path': 'tasks.task2.next[0].when'
@@ -142,7 +142,7 @@ def test_fail_inspection(self):
142142
'[{\'cmd\': \'echo <% ctx().macro %>\'}] is '
143143
'not valid under any of the given schemas'
144144
),
145-
'schema_path': 'properties.tasks.patternProperties.^\w+$.properties.input.oneOf',
145+
'schema_path': r'properties.tasks.patternProperties.^\w+$.properties.input.oneOf',
146146
'spec_path': 'tasks.task2.input'
147147
}
148148
]

contrib/runners/python_runner/tests/unit/test_pythonrunner.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ def test_action_returns_non_serializable_result(self):
104104

105105
if six.PY2:
106106
expected_result_re = (r"\[{'a': '1'}, {'h': 3, 'c': 2}, {'e': "
107-
"<non_simple_type.Test object at .*?>}\]")
107+
r"<non_simple_type.Test object at .*?>}\]")
108108
else:
109109
expected_result_re = (r"\[{'a': '1'}, {'c': 2, 'h': 3}, {'e': "
110-
"<non_simple_type.Test object at .*?>}\]")
110+
r"<non_simple_type.Test object at .*?>}\]")
111111

112112
match = re.match(expected_result_re, output['result'])
113113
self.assertTrue(match)
@@ -624,17 +624,17 @@ def test_python_action_wrapper_action_script_file_doesnt_exist_friendly_error(se
624624
wrapper = PythonActionWrapper(pack='dummy_pack_5', file_path=ACTION_1_PATH,
625625
user='joe')
626626

627-
expected_msg = ('Failed to load action class from file ".*?list_repos_doesnt_exist.py" '
628-
'\(action file most likely doesn\'t exist or contains invalid syntax\): '
629-
'\[Errno 2\] No such file or directory')
627+
expected_msg = (r'Failed to load action class from file ".*?list_repos_doesnt_exist.py" '
628+
r'\(action file most likely doesn\'t exist or contains invalid syntax\): '
629+
r'\[Errno 2\] No such file or directory')
630630
self.assertRaisesRegexp(Exception, expected_msg, wrapper._get_action_instance)
631631

632632
def test_python_action_wrapper_action_script_file_contains_invalid_syntax_friendly_error(self):
633633
wrapper = PythonActionWrapper(pack='dummy_pack_5', file_path=ACTION_2_PATH,
634634
user='joe')
635-
expected_msg = ('Failed to load action class from file ".*?invalid_syntax.py" '
636-
'\(action file most likely doesn\'t exist or contains invalid syntax\): '
637-
'No module named \'?invalid\'?')
635+
expected_msg = (r'Failed to load action class from file ".*?invalid_syntax.py" '
636+
r'\(action file most likely doesn\'t exist or contains invalid syntax\): '
637+
r'No module named \'?invalid\'?')
638638
self.assertRaisesRegexp(Exception, expected_msg, wrapper._get_action_instance)
639639

640640
def test_simple_action_log_messages_and_log_level_runner_param(self):

contrib/runners/windows_runner/tests/unit/test_windows_runners.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def test_get_winexe_command_args(self):
7272
[
7373
'winexe',
7474
'--interactive', '0',
75-
'-U', 'MyDomain\Administrator3%bar3',
75+
'-U', r'MyDomain\Administrator3%bar3',
7676
'//localhost',
7777
'dir'
7878
]
@@ -123,7 +123,7 @@ def test_get_smbclient_command_args(self):
123123
],
124124
[
125125
'smbclient',
126-
'-U', 'MyDomain\Administrator3%bar3',
126+
'-U', r'MyDomain\Administrator3%bar3',
127127
'//localhost/E$',
128128
'-c', 'dir'
129129
],

contrib/runners/windows_runner/windows_runner/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def _get_winexe_command_args(self, host, username, password, command, domain=Non
6262
args += ['--interactive', '0']
6363

6464
if domain:
65-
args += ['-U', '%s\%s%%%s' % (domain, username, password)]
65+
args += ['-U', r'%s\%s%%%s' % (domain, username, password)]
6666
else:
6767
args += ['-U', '%s%%%s' % (username, password)]
6868

@@ -84,7 +84,7 @@ def _get_smbclient_command_args(self, host, username, password, command, share='
8484

8585
values = {'domain': domain, 'username': username, 'password': password}
8686
if domain:
87-
auth_string = '%(domain)s\%(username)s%%%(password)s' % values
87+
auth_string = r'%(domain)s\%(username)s%%%(password)s' % values
8888
else:
8989
auth_string = '%(username)s%%%(password)s' % values
9090

contrib/runners/windows_runner/windows_runner/windows_script_runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def _parse_share_information(self, stdout):
314314

315315
for line in lines:
316316
line = line.strip()
317-
split = re.split('\s{3,}', line)
317+
split = re.split(r'\s{3,}', line)
318318

319319
if len(split) not in [1, 2]:
320320
# Invalid line, skip it

fixed-requirements.txt

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Packages versions fixed for the whole st2 stack
22
# Note: greenlet is used by eventlet
3-
greenlet==0.4.14
3+
greenlet==0.4.15
44
# Note: 0.20.0 removed select.poll() on which some of our code and libraries we
55
# depend on rely
66
eventlet==0.24.1
@@ -19,15 +19,15 @@ requests[security]<2.15,>=2.14.1
1919
apscheduler==3.5.3
2020
gitpython==2.1.11
2121
jsonschema==2.6.0
22-
pymongo==3.7.1
22+
pymongo==3.7.2
2323
passlib==1.7.1
2424
lockfile==0.12.2
2525
python-gnupg==0.4.3
2626
jsonpath-rw==1.4.0
2727
pyinotify==0.9.6
2828
semver==2.8.1
29-
pytz==2018.5
30-
stevedore==1.29.0
29+
pytz==2018.6
30+
stevedore==1.30.0
3131
paramiko==2.4.2
3232
networkx==1.11
3333
python-keyczar==0.716
@@ -38,7 +38,7 @@ virtualenv==15.1.0
3838
sseclient==0.0.19
3939
python-editor==1.0.3
4040
prompt-toolkit==1.0.15
41-
tooz==1.62.0
41+
tooz==1.63.1
4242
zake==0.2.2
4343
routes==2.4.1
4444
flex==6.13.2
@@ -53,3 +53,4 @@ python-statsd==2.1.0
5353
prometheus_client==0.1.1
5454
mock==2.0.0
5555
ujson==1.35
56+
python-dateutil==2.7.4

lint-configs/python/.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
22
max-line-length = 100
3-
ignore = E128,E402,E722
3+
ignore = E128,E402,E722,W504
44
exclude=*.egg/*

requirements.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ git+https://github.com/StackStorm/orquesta.git@142a19ddabbeea6a8d9d10341ba705851
1212
git+https://github.com/StackStorm/python-mistralclient.git#egg=python-mistralclient
1313
git+https://github.com/StackStorm/st2-auth-backend-flat-file.git@master#egg=st2-auth-backend-flat-file
1414
gitpython==2.1.11
15-
greenlet==0.4.14
15+
greenlet==0.4.15
1616
gunicorn==19.9.0
1717
ipaddr
1818
jinja2
@@ -34,14 +34,14 @@ prometheus_client==0.1.1
3434
prompt-toolkit==1.0.15
3535
psutil==5.4.7
3636
pyinotify==0.9.6
37-
pymongo==3.7.1
37+
pymongo==3.7.2
3838
pyrabbit
39-
python-dateutil
39+
python-dateutil==2.7.4
4040
python-editor==1.0.3
4141
python-gnupg==0.4.3
4242
python-json-logger
4343
python-statsd==2.1.0
44-
pytz==2018.5
44+
pytz==2018.6
4545
pywinrm==0.3.0
4646
pyyaml==3.13
4747
rednose
@@ -51,8 +51,8 @@ routes==2.4.1
5151
semver==2.8.1
5252
six==1.11.0
5353
sseclient==0.0.19
54-
stevedore==1.29.0
55-
tooz==1.62.0
54+
stevedore==1.30.0
55+
tooz==1.63.1
5656
ujson==1.35
5757
unittest2
5858
webob==1.8.2

scripts/travis/install-requirements.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
if [ "${TASK}" = 'compilepy3 ci-py3-unit' ] || [ "${TASK}" = 'ci-py3-integration' ]; then
4-
pip install "tox==3.1.3"
4+
pip install "tox==3.5.2"
55

66
# Install runners
77
. virtualenv/bin/activate

st2actions/tests/unit/policies/test_concurrency.py

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ def setUp(self):
9292
MockLiveActionPublisherNonBlocking.wait_all()
9393

9494
def tearDown(self):
95+
MockLiveActionPublisherNonBlocking.wait_all()
96+
9597
for liveaction in LiveAction.get_all():
9698
action_service.update_status(
9799
liveaction, action_constants.LIVEACTION_STATUS_CANCELED)

st2actions/tests/unit/policies/test_concurrency_by_attr.py

+2
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ def setUp(self):
9191
MockLiveActionPublisherNonBlocking.wait_all()
9292

9393
def tearDown(self):
94+
MockLiveActionPublisherNonBlocking.wait_all()
95+
9496
for liveaction in LiveAction.get_all():
9597
action_service.update_status(
9698
liveaction, action_constants.LIVEACTION_STATUS_CANCELED)

st2actions/tests/unit/test_actions_registrar.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ def test_pack_name_missing(self):
6666
content = yaml.safe_load(fd)
6767
action_name = str(content['name'])
6868
action_db = Action.get_by_name(action_name)
69-
self.assertEqual(action_db.pack, 'dummy', 'Content pack must be ' +
70-
'set to dummy')
69+
expected_msg = 'Content pack must be set to dummy'
70+
self.assertEqual(action_db.pack, 'dummy', expected_msg)
7171
Action.delete(action_db)
7272

7373
@mock.patch.object(action_validator, '_is_valid_pack', mock.MagicMock(return_value=True))
@@ -138,6 +138,6 @@ def test_action_update(self):
138138
content = yaml.safe_load(fd)
139139
action_name = str(content['name'])
140140
action_db = Action.get_by_name(action_name)
141-
self.assertEqual(action_db.pack, 'wolfpack', 'Content pack must be ' +
142-
'set to wolfpack')
141+
expected_msg = 'Content pack must be set to wolfpack'
142+
self.assertEqual(action_db.pack, 'wolfpack', expected_msg)
143143
Action.delete(action_db)

st2actions/tests/unit/test_notifier.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def test_notify_triggers(self):
110110
liveaction_db.notify = NotificationSchema(on_success=on_success,
111111
on_failure=on_failure)
112112
liveaction_db.start_timestamp = date_utils.get_datetime_utc_now()
113-
liveaction_db.end_timestamp = (liveaction_db.start_timestamp +
114-
datetime.timedelta(seconds=50))
113+
liveaction_db.end_timestamp = \
114+
(liveaction_db.start_timestamp + datetime.timedelta(seconds=50))
115115
LiveAction.add_or_update(liveaction_db)
116116

117117
execution = MOCK_EXECUTION
@@ -181,8 +181,8 @@ def test_notify_triggers_jinja_patterns(self, dispatch):
181181
data={'stdout': '{{action_results.stdout}}'})
182182
liveaction_db.notify = NotificationSchema(on_success=on_success)
183183
liveaction_db.start_timestamp = date_utils.get_datetime_utc_now()
184-
liveaction_db.end_timestamp = (liveaction_db.start_timestamp +
185-
datetime.timedelta(seconds=50))
184+
liveaction_db.end_timestamp = \
185+
(liveaction_db.start_timestamp + datetime.timedelta(seconds=50))
186186

187187
LiveAction.add_or_update(liveaction_db)
188188

st2api/st2api/controllers/resource.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def parameter_validation(validator, properties, instance, schema):
6666
"description": "Input parameters for the action.",
6767
"type": "object",
6868
"patternProperties": {
69-
"^\w+$": util_schema.get_action_parameters_schema()
69+
r"^\w+$": util_schema.get_action_parameters_schema()
7070
},
7171
'additionalProperties': False,
7272
"default": {}

st2api/tests/unit/controllers/v1/test_workflow_inspection.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ def test_inspection_return_errors(self):
7373
{
7474
'type': 'content',
7575
'message': 'The action "std.noop" is not registered in the database.',
76-
'schema_path': 'properties.tasks.patternProperties.^\w+$.properties.action',
76+
'schema_path': r'properties.tasks.patternProperties.^\w+$.properties.action',
7777
'spec_path': 'tasks.task3.action'
7878
},
7979
{
8080
'type': 'context',
8181
'language': 'yaql',
8282
'expression': '<% ctx().foobar %>',
8383
'message': 'Variable "foobar" is referenced before assignment.',
84-
'schema_path': 'properties.tasks.patternProperties.^\w+$.properties.input',
84+
'schema_path': r'properties.tasks.patternProperties.^\w+$.properties.input',
8585
'spec_path': 'tasks.task1.input',
8686
},
8787
{
@@ -93,7 +93,7 @@ def test_inspection_return_errors(self):
9393
'position 0 of expression \'<% succeeded()\''
9494
),
9595
'schema_path': (
96-
'properties.tasks.patternProperties.^\w+$.'
96+
r'properties.tasks.patternProperties.^\w+$.'
9797
'properties.next.items.properties.when'
9898
),
9999
'spec_path': 'tasks.task2.next[0].when'
@@ -104,7 +104,7 @@ def test_inspection_return_errors(self):
104104
'[{\'cmd\': \'echo <% ctx().macro %>\'}] is '
105105
'not valid under any of the given schemas'
106106
),
107-
'schema_path': 'properties.tasks.patternProperties.^\w+$.properties.input.oneOf',
107+
'schema_path': r'properties.tasks.patternProperties.^\w+$.properties.input.oneOf',
108108
'spec_path': 'tasks.task2.input'
109109
}
110110
]

st2client/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ jsonpath-rw==1.4.0
55
jsonschema==2.6.0
66
prettytable
77
prompt-toolkit==1.0.15
8-
python-dateutil
8+
python-dateutil==2.7.4
99
python-editor==1.0.3
10-
pytz==2018.5
10+
pytz==2018.6
1111
pyyaml==3.13
1212
requests[security]<2.15,>=2.14.1
1313
six==1.11.0

st2client/st2client/utils/jsutil.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# a..b
3434
# abc.
3535
# a(*
36-
SIMPLE_EXPRESSION_REGEX = "^([a-zA-Z0-9\-_]+\.)*([a-zA-Z0-9\-_]+)$"
36+
SIMPLE_EXPRESSION_REGEX = r"^([a-zA-Z0-9\-_]+\.)*([a-zA-Z0-9\-_]+)$"
3737
SIMPLE_EXPRESSION_REGEX_CMPL = re.compile(SIMPLE_EXPRESSION_REGEX)
3838

3939

0 commit comments

Comments
 (0)