{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/48049","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/48049/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/48049/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/48049/events","html_url":"https://github.com/ansible/ansible/pull/48049","id":377092978,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MTQxMTU5","number":48049,"title":"Make the flatpak module work with Python 3.","user":{"login":"mfuchs","id":78114,"node_id":"MDQ6VXNlcjc4MTE0","avatar_url":"https://avatars3.githubusercontent.com/u/78114?v=4","gravatar_id":"","url":"https://api.github.com/users/mfuchs","html_url":"https://github.com/mfuchs","followers_url":"https://api.github.com/users/mfuchs/followers","following_url":"https://api.github.com/users/mfuchs/following{/other_user}","gists_url":"https://api.github.com/users/mfuchs/gists{/gist_id}","starred_url":"https://api.github.com/users/mfuchs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfuchs/subscriptions","organizations_url":"https://api.github.com/users/mfuchs/orgs","repos_url":"https://api.github.com/users/mfuchs/repos","events_url":"https://api.github.com/users/mfuchs/events{/privacy}","received_events_url":"https://api.github.com/users/mfuchs/received_events","type":"User","site_admin":false},"labels":[{"id":1043397454,"node_id":"MDU6TGFiZWwxMDQzMzk3NDU0","url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.8","name":"affects_2.8","color":"ededed","default":false},{"id":785271699,"node_id":"MDU6TGFiZWw3ODUyNzE2OTk=","url":"https://api.github.com/repos/ansible/ansible/labels/bug","name":"bug","color":"fbca04","default":true},{"id":501518759,"node_id":"MDU6TGFiZWw1MDE1MTg3NTk=","url":"https://api.github.com/repos/ansible/ansible/labels/community_review","name":"community_review","color":"f9d0c4","default":false},{"id":496359346,"node_id":"MDU6TGFiZWw0OTYzNTkzNDY=","url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":632871029,"node_id":"MDU6TGFiZWw2MzI4NzEwMjk=","url":"https://api.github.com/repos/ansible/ansible/labels/needs_maintainer","name":"needs_maintainer","color":"fef2c0","default":false},{"id":383076471,"node_id":"MDU6TGFiZWwzODMwNzY0NzE=","url":"https://api.github.com/repos/ansible/ansible/labels/python3","name":"python3","color":"fbca04","default":false},{"id":636327968,"node_id":"MDU6TGFiZWw2MzYzMjc5Njg=","url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-03T21:02:55Z","updated_at":"2018-12-20T12:13:15Z","closed_at":"2018-11-05T15:00:44Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ansible/ansible/pulls/48049","html_url":"https://github.com/ansible/ansible/pull/48049","diff_url":"https://github.com/ansible/ansible/pull/48049.diff","patch_url":"https://github.com/ansible/ansible/pull/48049.patch"},"body":"\r\n##### SUMMARY\r\nUses functions that work in both Python 2 and Python3, i.e. to_bytes and to_text, instead of their Python 2 functions.\r\n\r\nFixes #46994\r\nFixes #46995\r\n\r\n##### ISSUE TYPE\r\n- Bugfix Pull Request\r\n\r\n##### COMPONENT NAME\r\nflatpak\r\n\r\n##### ANSIBLE VERSION\r\n```paste below\r\nansible 2.7.1\r\n  config file = /etc/ansible/ansible.cfg\r\n  configured module search path = ['/home/matthias/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python3.7/site-packages/ansible\r\n  executable location = /usr/bin/ansible\r\n  python version = 3.7.1 (default, Oct 22 2018, 10:41:28) [GCC 8.2.1 20180831]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/448978021","html_url":"https://github.com/ansible/ansible/pull/48049#issuecomment-448978021","issue_url":"https://api.github.com/repos/ansible/ansible/issues/48049","id":448978021,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0ODk3ODAyMQ==","user":{"login":"zoliky","id":3882981,"node_id":"MDQ6VXNlcjM4ODI5ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/3882981?v=4","gravatar_id":"","url":"https://api.github.com/users/zoliky","html_url":"https://github.com/zoliky","followers_url":"https://api.github.com/users/zoliky/followers","following_url":"https://api.github.com/users/zoliky/following{/other_user}","gists_url":"https://api.github.com/users/zoliky/gists{/gist_id}","starred_url":"https://api.github.com/users/zoliky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoliky/subscriptions","organizations_url":"https://api.github.com/users/zoliky/orgs","repos_url":"https://api.github.com/users/zoliky/repos","events_url":"https://api.github.com/users/zoliky/events{/privacy}","received_events_url":"https://api.github.com/users/zoliky/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T12:13:15Z","updated_at":"2018-12-20T12:13:15Z","author_association":"NONE","body":"I have a similar issue. I was able to use the \"flatpak_remote\" module to add the flathub repo, however when I'm using the \"flatpak\" module to install indivisual flatpak apps from flathub it throws me this error:\r\n\r\n```- name: Install gedit\r\n  flatpak:\r\n    name: org.gnome.gedit\r\n    state: present\r\n    remote: gnome\r\n```\r\nand the error, which seems to be Python related.\r\nI'm running Fedora 29, updated to the latest with: sudo dnf update\r\n\r\n```\r\nTASK [flatpak : Install gedit] *************************************************\r\nfatal: [localhost]: FAILED! => {\"changed\": false, \"module_stderr\": \"/root/.ansible/tmp/ansible-tmp-1545307708.7603402-73036544916518/AnsiballZ_flatpak.py:17: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses\\n  import imp\\nTraceback (most recent call last):\\n  File \\\"/root/.ansible/tmp/ansible-tmp-1545307708.7603402-73036544916518/AnsiballZ_flatpak.py\\\", line 113, in <module>\\n    _ansiballz_main()\\n  File \\\"/root/.ansible/tmp/ansible-tmp-1545307708.7603402-73036544916518/AnsiballZ_flatpak.py\\\", line 105, in _ansiballz_main\\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\\n  File \\\"/root/.ansible/tmp/ansible-tmp-1545307708.7603402-73036544916518/AnsiballZ_flatpak.py\\\", line 48, in invoke_module\\n    imp.load_module('__main__', mod, module, MOD_DESC)\\n  File \\\"/usr/lib64/python3.7/imp.py\\\", line 234, in load_module\\n    return load_source(name, filename, file)\\n  File \\\"/usr/lib64/python3.7/imp.py\\\", line 169, in load_source\\n    module = _exec(spec, sys.modules[name])\\n  File \\\"<frozen importlib._bootstrap>\\\", line 630, in _exec\\n  File \\\"<frozen importlib._bootstrap_external>\\\", line 728, in exec_module\\n  File \\\"<frozen importlib._bootstrap>\\\", line 219, in _call_with_frames_removed\\n  File \\\"/tmp/ansible_flatpak_payload_57mzb2fq/__main__.py\\\", line 249, in <module>\\n  File \\\"/tmp/ansible_flatpak_payload_57mzb2fq/__main__.py\\\", line 240, in main\\n  File \\\"/tmp/ansible_flatpak_payload_57mzb2fq/__main__.py\\\", line 157, in flatpak_exists\\nTypeError: a bytes-like object is required, not 'str'\\n\", \"module_stdout\": \"\", \"msg\": \"MODULE FAILURE\\nSee stdout/stderr for the exact error\", \"rc\": 1}\r\n\tto retry, use: --limit @/home/zoliky/fedora-ansible/playbooks/workstation-leslie.retry\r\n```\r\nI'm a little furious for such things happening, if the \"flatpak\" module is unable to handle python3 better don't include it in ansible at all.\r\n"}}
{"actor":{"display_login":"zoliky"}}