ansible/lib/ansible
Toshio Kuratomi d834412ead Fix for persistent connection plugin on Python3 (#24431)
Fix for persistent connection plugin on Python3.  Note that fixes are also needed to each terminal plugin.  This PR only fixes the ios terminal (as proof that this approach is workable.)  Future PRs can address the other terminal types.

* On Python3, pickle needs to work with byte strings, not text strings.
* Set the pickle protocol version to 0 because we're using a pty to feed data to the connection plugin.  A pty can't have control characters.  So we have to send ascii only.  That means
only using protocol=0 for pickling the data.
* ansible-connection isn't being used with py3 in the bug but it needs
several changes to work with python3.
* In python3, closing the pty too early causes no data to be sent.  So
leave stdin open until after we finish with the ansible-connection
process.
* Fix typo using traceback.format_exc()
* Cleanup unnecessary StringIO, BytesIO, and to_bytes calls
* Modify the network_cli and terminal plugins for py3 compat.  Lots of mixing of text and byte strings that needs to be straightened out to be compatible with python3
* Documentation for the bytes<=>text strategy for terminal plugins
* Update unittests for more bytes-oriented internals

Fixes #24355
2017-05-12 09:13:51 -07:00
..
cli ansible-doc snippet format changes 2017-05-04 09:08:19 -07:00
compat
config
errors moved to exceptions for basic skip/fails 2017-04-25 14:48:56 -04:00
executor deal with null/none connections 2017-05-11 15:46:14 -04:00
galaxy fix ansible galaxy file mangling (#23703) 2017-04-19 14:15:20 -04:00
inventory
module_utils [GCE] [GCP] UrlMap module (#24422) 2017-05-11 13:02:32 -04:00
modules removing folded style formatting for synopsis (#22746) 2017-05-12 10:00:19 -06:00
parsing Fix vaulted vars templating (#24312) 2017-05-05 11:07:50 -04:00
playbook Avoid default serialization of classes in dump_attrs 2017-05-11 16:28:07 -05:00
plugins Fix for persistent connection plugin on Python3 (#24431) 2017-05-12 09:13:51 -07:00
template Fixing security issue with lookup returns not tainting the jinja2 environment 2017-05-08 12:43:46 -05:00
utils Fortios file only mode + integration tests (#23275) 2017-05-09 13:51:19 +01:00
vars Fix circular import with unsafe_proxy, template, and vars 2017-04-28 15:35:30 -07:00
__init__.py
constants.py Fixing security issue with lookup returns not tainting the jinja2 environment 2017-05-08 12:43:46 -05:00
release.py