)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"e688c2b97b94d372b7664f9622799317db6e30e3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"316be89d_e0ce980a","updated":"2023-11-08 10:19:23.000000000","message":"Abandoning as we don\u0027t have a reproducer and this is in merge conflict.","commit_id":"4d82792894940a5e25451075b5d6fb97bb383943"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"bdb1762f61b57854d30ff6169b7e5767a489bab0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"f4d611a7_89a54e4e","updated":"2022-08-27 09:22:07.000000000","message":"I\u0027ve always considered this implicit conditional usage of stdin worrying. How about at least deprecating it and requiring an explicit option? Not sure if \"--file -\" could be used or a new option \"--input-from-stdin\", open for better naming suggestions.\n\nBut that\u0027s likely optional, fixing the issue at hand is not necessarily connected, just some further comments inline.","commit_id":"4d82792894940a5e25451075b5d6fb97bb383943"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"a7cd533922f1d377e80e7527c0c6d866e0c6ac9d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"12429e28_84fd1830","in_reply_to":"f4d611a7_89a54e4e","updated":"2022-08-30 09:06:15.000000000","message":"Thanks for the comments, some good suggestions there. I guess my preference would be for `--file -` as there is a strong convention around this in unix utilities. Sounds like a separate change though.","commit_id":"4d82792894940a5e25451075b5d6fb97bb383943"}],"openstackclient/image/v2/image.py":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"bdb1762f61b57854d30ff6169b7e5767a489bab0","unresolved":true,"context_lines":[{"line_number":145,"context_line":"        #    openstack ... \u003c /tmp/file"},{"line_number":146,"context_line":"        # (3) no image data provided"},{"line_number":147,"context_line":"        #    openstack ..."},{"line_number":148,"context_line":"        def stdin_valid():"},{"line_number":149,"context_line":"          if not sys.stdin:"},{"line_number":150,"context_line":"             # This seems to be the case in python3"},{"line_number":151,"context_line":"             return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"b269629c_7fa79426","line":148,"updated":"2022-08-27 09:22:07.000000000","message":"Make this a static helper function? Maybe called \"_is_stdin_valid\"?","commit_id":"4d82792894940a5e25451075b5d6fb97bb383943"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"bdb1762f61b57854d30ff6169b7e5767a489bab0","unresolved":true,"context_lines":[{"line_number":147,"context_line":"        #    openstack ..."},{"line_number":148,"context_line":"        def stdin_valid():"},{"line_number":149,"context_line":"          if not sys.stdin:"},{"line_number":150,"context_line":"             # This seems to be the case in python3"},{"line_number":151,"context_line":"             return False"},{"line_number":152,"context_line":"          try:"},{"line_number":153,"context_line":"             # Legacy method for compatability"}],"source_content_type":"text/x-python","patch_set":1,"id":"7bdbc154_39c854f5","line":150,"updated":"2022-08-27 09:22:07.000000000","message":"\"seems to be tha case\" sounds a bit vague, how can we be more certain here?\n\nAlso we require python\u003e\u003d3.8, so if the block below is only meant for python2, we can better drop it.","commit_id":"4d82792894940a5e25451075b5d6fb97bb383943"},{"author":{"_account_id":28048,"name":"Will Szumski","email":"will@stackhpc.com","username":"jovial"},"change_message_id":"a7cd533922f1d377e80e7527c0c6d866e0c6ac9d","unresolved":true,"context_lines":[{"line_number":147,"context_line":"        #    openstack ..."},{"line_number":148,"context_line":"        def stdin_valid():"},{"line_number":149,"context_line":"          if not sys.stdin:"},{"line_number":150,"context_line":"             # This seems to be the case in python3"},{"line_number":151,"context_line":"             return False"},{"line_number":152,"context_line":"          try:"},{"line_number":153,"context_line":"             # Legacy method for compatability"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ff007db_3f9ceb38","line":150,"in_reply_to":"7bdbc154_39c854f5","updated":"2022-08-30 09:06:15.000000000","message":"I\u0027m not quite sure if this is documented behaviour. Running from an interactive shell, `os.fstat(0)` is raising: `OSError: [Errno 9] Bad file descriptor` on both python2 and python3. When running via ansible, I see os.fstat not raising an error, but sys.stdin is None. That causes the `\u0027NoneType\u0027 object has no attribute \u0027isatty\u0027\n` from the second conditional block. I will do some more investigation.","commit_id":"4d82792894940a5e25451075b5d6fb97bb383943"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"81313ea7042dc5ee214c3e0f3fe1b96a0508970b","unresolved":true,"context_lines":[{"line_number":147,"context_line":"        #    openstack ..."},{"line_number":148,"context_line":"        def stdin_valid():"},{"line_number":149,"context_line":"          if not sys.stdin:"},{"line_number":150,"context_line":"             # This seems to be the case in python3"},{"line_number":151,"context_line":"             return False"},{"line_number":152,"context_line":"          try:"},{"line_number":153,"context_line":"             # Legacy method for compatability"}],"source_content_type":"text/x-python","patch_set":1,"id":"e1ee43e0_2194e952","line":150,"in_reply_to":"9ff007db_3f9ceb38","updated":"2023-11-08 10:19:03.000000000","message":"FYI I wasn\u0027t able to reproduce this on a Fedora 38 host using either the `script` module or `shell` module:\n\n`example.py`\n\n```\n#!/usr/bin/env python3\n\nimport os\n\ntry:\n    print(os.fstat(0))\n    print(\u0027done\u0027)\nexcept OSError:\n    print(\u0027caught error\u0027)\n```\n\n`playbook.yml` (`script`)\n\n```\n- hosts: 127.0.0.1\n  connection: local\n  tasks:\n  - name: Run script\n    ansible.builtin.script:\n      cmd: example.py\n      executable: /usr/bin/python3\n    register: result\n  - debug:\n      msg: \"{{ result }}\"\n```\n\n`playbook.yml` (`shell`)\n\n```\n- hosts: 127.0.0.1\n  connection: local\n  tasks:\n  - name: Run script\n    ansible.builtin.shell:\n      cmd: ./example.py\n    register: result\n  - debug:\n      msg: \"{{ result }}\"\n```\n\nSo I\u0027m not sure what\u0027s going on here.","commit_id":"4d82792894940a5e25451075b5d6fb97bb383943"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"bdb1762f61b57854d30ff6169b7e5767a489bab0","unresolved":true,"context_lines":[{"line_number":150,"context_line":"             # This seems to be the case in python3"},{"line_number":151,"context_line":"             return False"},{"line_number":152,"context_line":"          try:"},{"line_number":153,"context_line":"             # Legacy method for compatability"},{"line_number":154,"context_line":"            os.fstat(0)"},{"line_number":155,"context_line":"          except OSError:"},{"line_number":156,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":1,"id":"69ab5d2b_1714ea50","line":153,"range":{"start_line":153,"start_character":33,"end_line":153,"end_character":46},"updated":"2022-08-27 09:22:07.000000000","message":"compatibility","commit_id":"4d82792894940a5e25451075b5d6fb97bb383943"}]}
