1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible/parsing
Marius Gedminas b95e3d18a7 Python 3: use the right PyYAML SafeRepresenter for unicode
PyYAML has a SafeRepresenter in lib/... that defines

    def represent_unicode(self, data):
        return self.represent_scalar(u'tag:yaml.org,2002:str', data)

and a different SafeRepresenter in lib3/... that defines

    def represent_str(self, data):
        return self.represent_scalar('tag:yaml.org,2002:str', data)

so the right thing to do on Python 3 is to use represent_str.

(AnsibleUnicode is a subclass of six.text_type, i.e. 'str' on Python 3.)
2015-09-10 08:57:53 +03:00
..
utils Making the switch to v2 2015-05-03 21:47:26 -05:00
vault Merge pull request #12112 from amenonsen/vault-stdio 2015-08-27 11:26:48 -07:00
yaml Python 3: use the right PyYAML SafeRepresenter for unicode 2015-09-10 08:57:53 +03:00
__init__.py Starting to add additional unit tests for VariableManager 2015-09-04 16:41:38 -04:00
mod_args.py changed local_action to alias to connection=local vs delegate_to=localhost 2015-08-18 18:31:29 -04:00
splitter.py Remove octal escapes from unicode escape handling 2015-07-25 16:30:11 -04:00