Toshio Kuratomi
4ed88512e4
Move uses of to_bytes, to_text, to_native to use the module_utils version ( #17423 )
...
We couldn't copy to_unicode, to_bytes, to_str into module_utils because
of licensing. So once created it we had two sets of functions that did
the same things but had different implementations. To remedy that, this
change removes the ansible.utils.unicode versions of those functions.
2016-09-06 22:54:17 -07:00
James Cammarata
63c47fb271
Fixing up performance
2015-11-05 16:22:37 -05:00
Toshio Kuratomi
99e7bb35c1
Simplify UnsafeProxy as we don't need to use it for byte strings, only text
2015-10-20 10:57:23 -07:00
Toshio Kuratomi
f34b55ac2b
Add python3-compat boilerplate to all .py files in lib/ansible
2015-10-19 18:36:19 -07:00
Marius Gedminas
e511d6d458
Make UnsafeProxy work on Python 3
...
Instead of str and unicode we have to deal with bytes and str.
2015-10-13 09:41:08 +03:00
Marius Gedminas
af6a316d9b
Remove unused import
...
Fixes ImportError: No module named '__builtin__' on Python 3.
2015-10-13 09:37:48 +03:00
James Cammarata
cd2cb178ae
Totally rework the way UnsafeProxy does things
2015-10-12 18:13:09 -04:00
James Cammarata
bb1101498d
Clean up typo from cdc6c52
2015-09-25 16:58:27 -04:00
James Cammarata
cdc6c5208e
Clean string data run through the template engine
...
Also strip UnsafeProxy off of low level srings and objects to ensure
they don't cause issues later down the road
Fixes #12513
2015-09-25 16:49:31 -04:00
James Cammarata
95a58d1178
Properly serialize UnsafeProxy objects
...
Required as part of fix for #12123
2015-09-10 14:01:02 -04:00
James Cammarata
30399edada
Use UnsafeProxy for lookup results too
...
Also fixes a couple of bugs that popped up when using the proxy class
2015-09-08 12:19:39 -04:00
Victor Costan
bd405169fb
Fix #12258 : don't wrap None in UnsafeProxy.
2015-09-08 04:02:04 -04:00
James Cammarata
87f75a50ad
Use proxy class to mark variables unsafe for templating
...
Fixes #12191
2015-09-04 16:38:06 -04:00