ansible/bin
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
..
ansible Handle downstream version additions (#22428) 2017-03-10 12:01:11 -08:00
ansible-connection Fix for persistent connection plugin on Python3 (#24431) 2017-05-12 09:13:51 -07:00
ansible-console draft 1st release of ansible-console 2016-03-07 20:25:21 -05:00
ansible-doc Making the switch to v2 2015-05-03 21:47:26 -05:00
ansible-galaxy Making the switch to v2 2015-05-03 21:47:26 -05:00
ansible-playbook Making the switch to v2 2015-05-03 21:47:26 -05:00
ansible-pull Making the switch to v2 2015-05-03 21:47:26 -05:00
ansible-vault Making the switch to v2 2015-05-03 21:47:26 -05:00