{"action":"opened","issue":{"url":"https://api.github.com/repos/conan-io/conan/issues/1781","repository_url":"https://api.github.com/repos/conan-io/conan","labels_url":"https://api.github.com/repos/conan-io/conan/issues/1781/labels{/name}","comments_url":"https://api.github.com/repos/conan-io/conan/issues/1781/comments","events_url":"https://api.github.com/repos/conan-io/conan/issues/1781/events","html_url":"https://github.com/conan-io/conan/issues/1781","id":259505490,"number":1781,"title":"Why are user_info transformed and stored as string? ","user":{"login":"danieleTrimarchi","id":24756418,"avatar_url":"https://avatars3.githubusercontent.com/u/24756418?v=4","gravatar_id":"","url":"https://api.github.com/users/danieleTrimarchi","html_url":"https://github.com/danieleTrimarchi","followers_url":"https://api.github.com/users/danieleTrimarchi/followers","following_url":"https://api.github.com/users/danieleTrimarchi/following{/other_user}","gists_url":"https://api.github.com/users/danieleTrimarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/danieleTrimarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danieleTrimarchi/subscriptions","organizations_url":"https://api.github.com/users/danieleTrimarchi/orgs","repos_url":"https://api.github.com/users/danieleTrimarchi/repos","events_url":"https://api.github.com/users/danieleTrimarchi/events{/privacy}","received_events_url":"https://api.github.com/users/danieleTrimarchi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-21T13:57:05Z","updated_at":"2017-09-21T13:57:05Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\n\r\nWe have noticed that when we define values for UserInfo, their string representation is stored instead of the actual values. \r\n\r\nFor example, if we assign a list of JAR files for a Java package : \r\n`    self.user_info.jars = ['JAR1.jar','JAR2.jar','JAR3.jar']`\r\n\r\nthis gets transformed into a string in [user_info.py](https://github.com/conan-io/conan/blob/f96a816d83a12da4a54c838e6a65e4a064e08f3a/conans/model/user_info.py), in UserInfo::__setattr__ :\r\n`    l19:    self._values_[name] = str(value)`\r\n    \r\nin this case, when we retrieve the user info we get the string:\r\n ` >>> conanfile.deps_user_info.vars `\r\n `\"['JAR1.jar','JAR2.jar','JAR3.jar']\"`\r\n\r\n\r\nWhat is the reason for this? Wouldn't it be preferable to leave the object 'value' as is? \r\n\r\nWe are writing a custom generator and we would like to keep the list as is. \r\nWe can of course work around this by re-transforming the string to a list using ast.literal_eval.\r\n\r\nThanks, \r\n        Daniele\r\n\r\n        \r\n\r\n"}}
{"actor":{"display_login":"danieleTrimarchi"}}