mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
2b73002044
Two things changed in Python 3.4: - 'basestring' is no longer defined, so use six.string_types - True/False are now special AST node types (NamedConstant) rather than just names (Good thing we had tests, or I wouldn't have noticed the 2nd thing!) I found only one place where safe_eval() is called inside the ansible codebase: in lib/template/__init__.py. The call to safe_eval(result, ...) is protected by result.startswith('...'), which means result cannot possibly be a byte string on Python 3 (or startswith() would raise, so six.string_types (which excludes byte strings on Python 3) is fine here. |
||
---|---|---|
.. | ||
ansible |