Adding aliases for field attributes and renaming async attribute (#33141)

* Adding aliases for field attributes and renaming async attribute

As of Python 3.7, the use of async raises an error, whereas before the use
of the reserved word was ignored. This adds an alias field for field attrs
so that both async and async_val (interally) work. This allows us to be
backwards-compatible with 3rd party plugins that may still reference Task.async,
but for the core engine to work on Py3.7+.

* Remove files fixed for 'async' usage from the python 3.7 skip list
This commit is contained in:
James Cammarata 2017-11-22 14:35:58 -06:00 committed by Matt Clay
parent 23f8833e87
commit d8ae4dfbf2
14 changed files with 43 additions and 36 deletions

View file

@ -39,7 +39,7 @@ class ActionModule(ActionBase):
del results['invocation']['module_args']
# FUTURE: better to let _execute_module calculate this internally?
wrap_async = self._task.async and not self._connection.has_native_async
wrap_async = self._task.async_val and not self._connection.has_native_async
# do work!
results = merge_hash(results, self._execute_module(tmp=tmp, task_vars=task_vars, wrap_async=wrap_async))