)]}'
{"id":"openstack%2Fpython-openstackclient~343035","triplet_id":"openstack%2Fpython-openstackclient~master~I779d260744728eae8455ff9dedb6e5c09c165559","project":"openstack/python-openstackclient","branch":"master","topic":"bug/1603494","hashtags":[],"change_id":"I779d260744728eae8455ff9dedb6e5c09c165559","subject":"arguments are not locale decoded into Unicode","status":"MERGED","created":"2016-07-15 19:01:58.000000000","updated":"2016-08-31 17:06:06.000000000","submitted":"2016-08-01 17:37:00.000000000","submitter":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"total_comment_count":0,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"386d0155951b14a9e2b26059dc5be02f37dc9233","_number":343035,"virtual_id_number":343035,"owner":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"all":[{"value":0,"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},{"value":2,"date":"2016-08-01 17:36:59.000000000","_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"date":"2016-08-01 20:13:34.000000000","post_submit":true,"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},{"value":0,"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},{"value":0,"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},{"value":0,"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"all":[{"value":2,"date":"2016-07-31 14:16:53.000000000","_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},{"value":0,"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},{"value":2,"date":"2016-08-01 16:10:47.000000000","_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},{"value":2,"date":"2016-08-01 16:24:32.000000000","_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"all":[{"value":0,"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},{"value":0,"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},{"value":0,"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},{"value":1,"date":"2016-08-01 16:24:32.000000000","_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2016-07-17 19:44:28.000000000","updated_by":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"reviewer":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"state":"REVIEWER"},{"updated":"2016-07-31 14:16:53.000000000","updated_by":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"reviewer":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"state":"REVIEWER"},{"updated":"2016-08-01 16:10:47.000000000","updated_by":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"reviewer":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"state":"REVIEWER"},{"updated":"2016-08-01 16:24:32.000000000","updated_by":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"reviewer":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"state":"REVIEWER"},{"updated":"2016-08-01 17:36:59.000000000","updated_by":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"reviewer":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"state":"REVIEWER"}],"messages":[{"id":"2fd475f648a5f5eca9725c9e334cfe65ee7a5aa9","author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"date":"2016-07-15 19:01:58.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"442bf34623c82ad307b0685a1d38c65660501a2e","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-07-15 19:21:36.000000000","message":"Patch Set 1: Verified-1\n\nBuild failed (check pipeline).  For information on how to proceed, see http://docs.openstack.org/infra/manual/developers.html#automated-testing\n\n- gate-python-openstackclient-docs http://docs-draft.openstack.org/35/343035/1/check/gate-python-openstackclient-docs/21fe46f//doc/build/html/ : SUCCESS in 5m 24s\n- gate-python-openstackclient-pep8 http://logs.openstack.org/35/343035/1/check/gate-python-openstackclient-pep8/5c992a5/ : SUCCESS in 5m 26s\n- gate-python-openstackclient-python27 http://logs.openstack.org/35/343035/1/check/gate-python-openstackclient-python27/f1e4af9/ : SUCCESS in 3m 58s\n- gate-python-openstackclient-python34 http://logs.openstack.org/35/343035/1/check/gate-python-openstackclient-python34/eae4d16/ : SUCCESS in 5m 47s\n- gate-python-openstackclient-python35-nv http://logs.openstack.org/35/343035/1/check/gate-python-openstackclient-python35-nv/07d5769/ : SUCCESS in 4m 39s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-openstackclient http://logs.openstack.org/35/343035/1/check/gate-tempest-dsvm-neutron-src-python-openstackclient/8711b35/ : FAILURE in 14m 16s\n- check-osc-plugins http://logs.openstack.org/35/343035/1/check/check-osc-plugins/0c34252/ : SUCCESS in 6m 23s\n- gate-osc-dsvm-functional http://logs.openstack.org/35/343035/1/check/gate-osc-dsvm-functional/92dd169/ : FAILURE in 15m 57s","accounts_in_message":[],"_revision_number":1},{"id":"542541606dc99cd28e984ab04818763f55f1e010","author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"date":"2016-07-17 19:44:50.000000000","message":"Patch Set 1: Code-Review-1\n\ngave this a whirl and got the same error as in the dsvm job:\n\n  openstack: \u0027/opt/stack/unicode_osc/bin/openstack\u0027 is not an openstack command. See \u0027openstack --help\u0027.","accounts_in_message":[],"_revision_number":1},{"id":"237f2717fe756c87341ea6c0e6d32bdde9b1ad32","author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"date":"2016-07-18 15:48:54.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"a95d5ce49decbc0d552ec6763f1031e6754159a1","author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"date":"2016-07-18 16:14:45.000000000","message":"Patch Set 2: Code-Review-1\n\nis there something else I should be doing, i pulled this and the cliff patch down and still getting an error (a differing one)\n\n(unicode_osc) stevemar@ubuntu:/opt/stack/python-openstackclient$ openstack user create ñewgg\nTraceback (most recent call last):\n  File \"/opt/stack/unicode_osc/bin/openstack\", line 10, in \u003cmodule\u003e\n    sys.exit(main())\n  File \"/opt/stack/python-openstackclient/openstackclient/shell.py\", line 489, in main\n    argv \u003d map(lambda arg: arg.decode(encoding), argv)\n  File \"/opt/stack/python-openstackclient/openstackclient/shell.py\", line 489, in \u003clambda\u003e\n    argv \u003d map(lambda arg: arg.decode(encoding), argv)\nUnicodeDecodeError: \u0027ascii\u0027 codec can\u0027t decode byte 0xc3 in position 0: ordinal not in range(128)","accounts_in_message":[],"_revision_number":2},{"id":"5e210b6c596228f8648751d408d305fecba8a5bf","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-07-18 16:50:50.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-openstackclient-docs http://docs-draft.openstack.org/35/343035/2/check/gate-python-openstackclient-docs/d134be4//doc/build/html/ : SUCCESS in 8m 44s\n- gate-python-openstackclient-pep8 http://logs.openstack.org/35/343035/2/check/gate-python-openstackclient-pep8/99bf917/ : SUCCESS in 5m 06s\n- gate-python-openstackclient-python27 http://logs.openstack.org/35/343035/2/check/gate-python-openstackclient-python27/b23bcc8/ : SUCCESS in 9m 00s\n- gate-python-openstackclient-python34 http://logs.openstack.org/35/343035/2/check/gate-python-openstackclient-python34/6c9b7c9/ : SUCCESS in 6m 07s\n- gate-python-openstackclient-python35-nv http://logs.openstack.org/35/343035/2/check/gate-python-openstackclient-python35-nv/f4db396/ : SUCCESS in 8m 47s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-openstackclient http://logs.openstack.org/35/343035/2/check/gate-tempest-dsvm-neutron-src-python-openstackclient/1fc6205/ : SUCCESS in 57m 54s\n- check-osc-plugins http://logs.openstack.org/35/343035/2/check/check-osc-plugins/ddb5cbf/ : SUCCESS in 3m 08s\n- gate-osc-dsvm-functional http://logs.openstack.org/35/343035/2/check/gate-osc-dsvm-functional/5e2b25a/ : SUCCESS in 25m 09s","accounts_in_message":[],"_revision_number":2},{"id":"c14e381f737882418568ceb221d5fcb73f55f7d8","author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"date":"2016-07-18 17:00:10.000000000","message":"Patch Set 2:\n\nHi Steve:\n\nIt appears as if preferred encoding is ASCII for some reason. Please check what /usr/bin/locale returns in your terminal. What is the value of LANG? The LANG environment variable is composed of 3 parts, a language code followed by an underscore and then the country code followed by a dot followed by an encoding. In my environment I\u0027ve got this:\n\nLANG\u003den_US.UTF-8\n\nen is the language code\nUS is the country code\nand UTF-8 is the encoding.\n\nI believe (not 100% sure) the country code and encoding fields are optional. \n\nBy any chance is the encoding absent in your locale? I think that might explain why Python appears to substitute a default of ASCII\n\nAnother thing you can do is try this in a Python \"shell\"\n\n# python\nPython 2.7.5 (default, Oct 11 2015, 17:47:16) \n[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import locale\n\u003e\u003e\u003e print locale.getpreferredencoding()\n\nWhat value is returned?","accounts_in_message":[],"_revision_number":2},{"id":"4f048a5a497e1566d305a04a47651225c5b32658","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-07-22 20:38:31.000000000","message":"Patch Set 2: Verified-1\n\nMerge Failed.\n\nThis change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset.","accounts_in_message":[],"_revision_number":2},{"id":"f2cd9b14e8fd8a4de76ddb7d3f57e583c9253799","author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"date":"2016-07-26 22:10:47.000000000","message":"Uploaded patch set 3: Patch Set 2 was rebased.","accounts_in_message":[],"_revision_number":3},{"id":"cfdf381b08d2a65d2439add8f672f8198e483b1b","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-07-27 01:49:02.000000000","message":"Patch Set 3: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-openstackclient-docs-ubuntu-xenial http://docs-draft.openstack.org/35/343035/3/check/gate-python-openstackclient-docs-ubuntu-xenial/2126ca9//doc/build/html/ : SUCCESS in 7m 09s\n- gate-python-openstackclient-pep8-ubuntu-xenial http://logs.openstack.org/35/343035/3/check/gate-python-openstackclient-pep8-ubuntu-xenial/053a1f6/ : SUCCESS in 6m 10s\n- gate-python-openstackclient-python27-ubuntu-xenial http://logs.openstack.org/35/343035/3/check/gate-python-openstackclient-python27-ubuntu-xenial/64be52b/ : SUCCESS in 6m 45s\n- gate-python-openstackclient-python34 http://logs.openstack.org/35/343035/3/check/gate-python-openstackclient-python34/9857d58/ : SUCCESS in 3m 02s\n- gate-python-openstackclient-python35-nv http://logs.openstack.org/35/343035/3/check/gate-python-openstackclient-python35-nv/0744837/ : SUCCESS in 3m 49s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-openstackclient http://logs.openstack.org/35/343035/3/check/gate-tempest-dsvm-neutron-src-python-openstackclient/07f6144/ : SUCCESS in 1h 28m 26s\n- check-osc-plugins http://logs.openstack.org/35/343035/3/check/check-osc-plugins/c86207f/ : SUCCESS in 5m 08s\n- gate-osc-dsvm-functional http://logs.openstack.org/35/343035/3/check/gate-osc-dsvm-functional/8fabd1c/ : SUCCESS in 1h 01m 25s","accounts_in_message":[],"_revision_number":3},{"id":"1160ea79199962d6707701318b740df27544ff3f","author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"date":"2016-07-31 13:14:45.000000000","message":"Patch Set 3:\n\nhey John, anyway you could add documentation for this in this section? http://docs.openstack.org/developer/python-openstackclient/#user-documentation\n\nMaybe a quick \"here\u0027s what you should double check\" if you\u0027re using double byte characters, and list off the environment variables. i realize OSC is just another app, and folks should be setting this for all other applications, but we keep getting questions about it and it\u0027ll be useful to have docs for us to point to instead of diagnosing each one individually.","accounts_in_message":[],"_revision_number":3},{"id":"6b64d8bf8b06747896152dfb065d2841c52e6846","author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"date":"2016-07-31 14:16:53.000000000","message":"Patch Set 3: Code-Review+2\n\nOK, i narrowed down why it wasn\u0027t working for me. every time i sourced the openrc file from devstack, it would remove any of the language environment variables I had, resulting in my python default locale to be ANSI_... and no LANG specified.\n\nI played around with this and am super happy with it:\n\nstevemar@ubuntu:/opt/stack/cliff$ openstack project create test字 --os-cloud devstack-admin\n+-------------+----------------------------------+\n| Field       | Value                            |\n+-------------+----------------------------------+\n| description |                                  |\n| domain_id   | default                          |\n| enabled     | True                             |\n| id          | 4187b7cf4b0244c9a9ba29d07dc76f17 |\n| is_domain   | False                            |\n| name        | test字                           |\n| parent_id   | default                          |\n+-------------+----------------------------------+\n\nstevemar@ubuntu:/opt/stack/cliff$ openstack project list --os-cloud devstack-admin\n+----------------------------------+------------------------------+\n| ID                               | Name                         |\n+----------------------------------+------------------------------+\n| 03d53ac4432f4a9dbf9baf9b88f6780b | admin                        |\n| 188145ef2fde41eebcddf135633f1974 | demo                         |\n| 1e1f97047efa413d99ff9e2c5af474fe | alt_demo                     |\n| 3897c5bc87414ba1995757f1b90aee4e | service                      |\n| 4187b7cf4b0244c9a9ba29d07dc76f17 | test字                       |\n| 6660cc5aa9294db398b5887a27f94092 | invisible_to_admin           |\n| 94348444bfb64f5fbaf1dbff6e0894c9 | testä                        |\n+----------------------------------+------------------------------+\n\nI would love to find out why sourcing the openrc file in devstack nuked my settings.","accounts_in_message":[],"_revision_number":3},{"id":"69bf2aead2a8837f99d51c35eeb3a63570359828","author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"date":"2016-07-31 14:18:55.000000000","message":"Patch Set 3:\n\nquick n dirty example of what i was referring to with openrc: http://paste.openstack.org/show/544705/","accounts_in_message":[],"_revision_number":3},{"id":"2e58fc8537e448cd95a21d723f22dc30e670ba9e","author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"date":"2016-07-31 15:17:42.000000000","message":"Patch Set 3:\n\nadded docs: https://review.openstack.org/#/c/349276/1","accounts_in_message":[],"_revision_number":3},{"id":"5027387e76b4e4b86ec3ac86a2153fe906033330","author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"date":"2016-08-01 16:10:47.000000000","message":"Patch Set 3: Code-Review+2\n\nlgtm","accounts_in_message":[],"_revision_number":3},{"id":"b3a853ddc38681cc4af39bfa43a2a8e71a20eb27","author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"date":"2016-08-01 16:24:32.000000000","message":"Patch Set 3: Code-Review+2 Workflow+1\n\nI really want a test for this, it\u0027s one of those things that is just obscure enough (for people like me anyway) to not get right more than once, or not know when we break it...","accounts_in_message":[],"_revision_number":3},{"id":"1ff69927bbd1b15b13a36a7f55268cc5a00ab14d","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-08-01 16:25:08.000000000","message":"Patch Set 3: -Verified\n\nStarting gate jobs.\nhttp://status.openstack.org/zuul/","accounts_in_message":[],"_revision_number":3},{"id":"c0a156bcf3dd5af2568358833a3d06469fc22ba2","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-08-01 17:36:59.000000000","message":"Patch Set 3: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- gate-python-openstackclient-docs-ubuntu-xenial http://docs-draft.openstack.org/35/343035/3/gate/gate-python-openstackclient-docs-ubuntu-xenial/739d4cf//doc/build/html/ : SUCCESS in 5m 11s\n- gate-python-openstackclient-pep8-ubuntu-xenial http://logs.openstack.org/35/343035/3/gate/gate-python-openstackclient-pep8-ubuntu-xenial/9f40ded/ : SUCCESS in 3m 46s\n- gate-python-openstackclient-python27-ubuntu-xenial http://logs.openstack.org/35/343035/3/gate/gate-python-openstackclient-python27-ubuntu-xenial/0e43339/ : SUCCESS in 4m 25s\n- gate-python-openstackclient-python34 http://logs.openstack.org/35/343035/3/gate/gate-python-openstackclient-python34/782e316/ : SUCCESS in 6m 17s\n- gate-tempest-dsvm-neutron-src-python-openstackclient http://logs.openstack.org/35/343035/3/gate/gate-tempest-dsvm-neutron-src-python-openstackclient/8733855/ : SUCCESS in 1h 11m 24s\n- check-osc-plugins http://logs.openstack.org/35/343035/3/gate/check-osc-plugins/d2cda87/ : SUCCESS in 7m 57s\n- gate-osc-dsvm-functional http://logs.openstack.org/35/343035/3/gate/gate-osc-dsvm-functional/104f862/ : SUCCESS in 48m 13s","accounts_in_message":[],"_revision_number":3},{"id":"5bd4135a2d5f30847250dec5b4feed00c67526cf","date":"2016-08-01 17:37:00.000000000","message":"Change has been successfully merged into the git repository by Jenkins","accounts_in_message":[],"_revision_number":3},{"id":"f4ea6ad3f105c2313a8c39a49609bff82c76d16c","author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"date":"2016-08-01 20:13:34.000000000","message":"Patch Set 3:\n\nSteve: the reason why openrc screws up your LANG env is because it sources stacrc which has these lines:\n\n# Sanitize language settings to avoid commands bailing out\n# with \"unsupported locale setting\" errors.\nunset LANG\nunset LANGUAGE\nLC_ALL\u003dC\nexport LC_ALL\n\nwhich was added in commit f327b1e1 to fix bug 1499296, but the fix is incorrect and the original bug report is either user error or some other script incorrectly setting LANG to UTF-8. It appears as if the LANG env variable was set to UTF-8, but that is syntactically invalid. The expected string for LANG or LANGUAGE is lc_cc.encoding. I will open a new bug report for devstack and try to get this fixed","accounts_in_message":[],"_revision_number":3},{"id":"8f23be0867de5fd0efbcb96199acb8b6f6980598","author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"date":"2016-08-01 20:17:50.000000000","message":"Patch Set 3:\n\nJohn, I actually dug into all that and completely forgot to update this post (grrr). Yeah, I noticed there was an issue once upon a time, with rejoining stacks. It would be nice if we could get devstack to not nuke things :)\n\nI was going to submit a patch to devstack but got sidetracked. let me know if you end up submitting one.","accounts_in_message":[],"_revision_number":3},{"id":"e3cc96b504b2dd68abd1445484b6297ec0ce542d","author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"date":"2016-08-01 21:20:46.000000000","message":"Patch Set 3:\n\nNo problem Steve, I created this new bug 1608687 concerning devstack nuking users LANG setting.","accounts_in_message":[],"_revision_number":3},{"id":"f25b405e43a26f9ddb13c313c68fc38696d0e7e4","author":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"date":"2016-08-31 17:06:06.000000000","message":"Patch Set 3: Cherry Picked\n\nThis patchset was cherry picked to branch stable/liberty as commit 402a6e44518d3f21be8e8c40ebf073711015bbef","accounts_in_message":[],"_revision_number":3}],"current_revision_number":3,"current_revision":"756d2fac67b4128312e1d779648e62f1458b4ffc","revisions":{"2e979725955ee1111634483b252a9547cec2d566":{"kind":"REWORK","_number":1,"created":"2016-07-15 19:01:58.000000000","uploader":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"ref":"refs/changes/35/343035/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-openstackclient","ref":"refs/changes/35/343035/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/1"}}},"commit":{"parents":[{"commit":"1821f20c424c5e2530e165ad2e2246a8af14a06a","subject":"Merge \"Add python-neutronclient to OSC plugins\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/1821f20c424c5e2530e165ad2e2246a8af14a06a"}]}],"author":{"name":"John Dennis","email":"jdennis@redhat.com","date":"2016-07-15 18:46:29.000000000","tz":-240},"committer":{"name":"John Dennis","email":"jdennis@redhat.com","date":"2016-07-15 19:01:56.000000000","tz":-240},"subject":"arguments are not locale decoded into Unicode","message":"arguments are not locale decoded into Unicode\n\nWhen the openstackclient in Python2 passes command line arguments to a\nsubcommand it fails to pass the arguments as text\n(e.g. Unicode). Instead it passes the arguments as binary data encoded\nusing the current locales encoding.\n\nAn easy way to see this is trying to pass a username with a non-ASCII\ncharacter.\n\n% openstack user delete ñew\nNo user with a name or ID of \u0027ñew\u0027 exists.\n\nWhat occurs internally is when the user data is retrieved it\u0027s it\nproperly represented in a Unicode object. However the username pased\nfrom the command line is still a str object encoded in the locales\nencoding (typically UTF-8). A string comparison is attempted between\nthe encoded data from the command line and the Unicode text found in\nthe user representation. This seldom ends well, either the comparison\nfails to match or a codec error is raised.\n\nThere is a hard and fast rule, all text data must be stored in Unicode\nobjects and the conversion from binary encoded text to Unicode must\noccur as close to the I/O boundary as possible. Python3 enforces this\nbehavior automatically but in Python2 it is the programmers job to do\nso.\n\nIn the past there have been attempts to fix problems deep inside\ninternal code by attempting to decode from UTF-8. There are two\nproblems with this approach. First, internal code has no way to\naccurately know what encoding was used to encode the binary data. This\nis way it needs to be decoded as close to the I/O source as possible\nbecause that is the best place to know the actual encoding. Guessing\nUTF-8 is at best a heuristic. Second, there must be a canonical\nrepresentation for data \"inside\" the program, you don\u0027t want dozens of\nindividual modules, classes, methods, etc. performing conversions,\ninstead they should be able to make the assumption in what format text\nis represented in, the format for text data must be Unicode. This is\nanother reason to decode as close to the I/O as possible.\n\nIn Python3 the argv strings are decoded from the locales encoding by\nthe interpreter. By the time any Python3 code sees the argv strings\nthey will be Unicode. However in Python2 there must be explicit code\nadded to decode the argv strings into Unicode.\n\nThe conversion of sys.argv into Unicode only occurs when argv is not\npassed to OpenStackShell.run(). If a caller of OpenStackShell.run()\nsupplies their own arg it is their responsiblity to assure they are\npassing actual text objects. Consider this a requirement of the API.\n\nNote: This patch does not contain a unittest to exercise the behavior\nbecause it is difficult to construct a test that depends on command\ninvocation from a shell. The general structure of the unit tests is to\npass fake argv into OpenStackShell.run() as if it came from a\nshell. Because the new code only operates when argv is not passed and\ndefaults to sys.argv it conflicts with the unittest design.\n\nChange-Id: I779d260744728eae8455ff9dedb6e5c09c165559\nCloses-Bug: 1603494\nSigned-off-by: John Dennis \u003cjdennis@redhat.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/2e979725955ee1111634483b252a9547cec2d566"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/2e979725955ee1111634483b252a9547cec2d566"}]},"branch":"refs/heads/master"},"16a87d13f0d889b189fba44f7d29faa39ca6b3c7":{"kind":"REWORK","_number":2,"created":"2016-07-18 15:48:54.000000000","uploader":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"ref":"refs/changes/35/343035/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-openstackclient","ref":"refs/changes/35/343035/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/2"}}},"commit":{"parents":[{"commit":"1821f20c424c5e2530e165ad2e2246a8af14a06a","subject":"Merge \"Add python-neutronclient to OSC plugins\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/1821f20c424c5e2530e165ad2e2246a8af14a06a"}]}],"author":{"name":"John Dennis","email":"jdennis@redhat.com","date":"2016-07-15 18:46:29.000000000","tz":-240},"committer":{"name":"John Dennis","email":"jdennis@redhat.com","date":"2016-07-18 15:48:21.000000000","tz":-240},"subject":"arguments are not locale decoded into Unicode","message":"arguments are not locale decoded into Unicode\n\nWhen the openstackclient in Python2 passes command line arguments to a\nsubcommand it fails to pass the arguments as text\n(e.g. Unicode). Instead it passes the arguments as binary data encoded\nusing the current locales encoding.\n\nAn easy way to see this is trying to pass a username with a non-ASCII\ncharacter.\n\n% openstack user delete ñew\nNo user with a name or ID of \u0027ñew\u0027 exists.\n\nWhat occurs internally is when the user data is retrieved it\u0027s it\nproperly represented in a Unicode object. However the username pased\nfrom the command line is still a str object encoded in the locales\nencoding (typically UTF-8). A string comparison is attempted between\nthe encoded data from the command line and the Unicode text found in\nthe user representation. This seldom ends well, either the comparison\nfails to match or a codec error is raised.\n\nThere is a hard and fast rule, all text data must be stored in Unicode\nobjects and the conversion from binary encoded text to Unicode must\noccur as close to the I/O boundary as possible. Python3 enforces this\nbehavior automatically but in Python2 it is the programmers job to do\nso.\n\nIn the past there have been attempts to fix problems deep inside\ninternal code by attempting to decode from UTF-8. There are two\nproblems with this approach. First, internal code has no way to\naccurately know what encoding was used to encode the binary data. This\nis way it needs to be decoded as close to the I/O source as possible\nbecause that is the best place to know the actual encoding. Guessing\nUTF-8 is at best a heuristic. Second, there must be a canonical\nrepresentation for data \"inside\" the program, you don\u0027t want dozens of\nindividual modules, classes, methods, etc. performing conversions,\ninstead they should be able to make the assumption in what format text\nis represented in, the format for text data must be Unicode. This is\nanother reason to decode as close to the I/O as possible.\n\nIn Python3 the argv strings are decoded from the locales encoding by\nthe interpreter. By the time any Python3 code sees the argv strings\nthey will be Unicode. However in Python2 there must be explicit code\nadded to decode the argv strings into Unicode.\n\nThe conversion of sys.argv into Unicode only occurs when argv is not\npassed to OpenStackShell.run(). If a caller of OpenStackShell.run()\nsupplies their own arg it is their responsiblity to assure they are\npassing actual text objects. Consider this a requirement of the API.\n\nNote: This patch does not contain a unittest to exercise the behavior\nbecause it is difficult to construct a test that depends on command\ninvocation from a shell. The general structure of the unit tests is to\npass fake argv into OpenStackShell.run() as if it came from a\nshell. Because the new code only operates when argv is not passed and\ndefaults to sys.argv it conflicts with the unittest design.\n\nChange-Id: I779d260744728eae8455ff9dedb6e5c09c165559\nCloses-Bug: 1603494\nSigned-off-by: John Dennis \u003cjdennis@redhat.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/16a87d13f0d889b189fba44f7d29faa39ca6b3c7"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/16a87d13f0d889b189fba44f7d29faa39ca6b3c7"}]},"branch":"refs/heads/master"},"756d2fac67b4128312e1d779648e62f1458b4ffc":{"kind":"TRIVIAL_REBASE","_number":3,"created":"2016-07-26 22:10:47.000000000","uploader":{"_account_id":8116,"name":"John Dennis","email":"jdennis@redhat.com","username":"jdennis"},"ref":"refs/changes/35/343035/3","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-openstackclient","ref":"refs/changes/35/343035/3","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-openstackclient refs/changes/35/343035/3"}}},"commit":{"parents":[{"commit":"7a667d700f97dda386c3db3bffc8138182fbeccb","subject":"Merge \"Use identity fake classes instead of old unit tests data\"","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/7a667d700f97dda386c3db3bffc8138182fbeccb"}]}],"author":{"name":"John Dennis","email":"jdennis@redhat.com","date":"2016-07-15 18:46:29.000000000","tz":-240},"committer":{"name":"John Dennis","email":"jdennis@redhat.com","date":"2016-07-26 22:09:20.000000000","tz":-240},"subject":"arguments are not locale decoded into Unicode","message":"arguments are not locale decoded into Unicode\n\nWhen the openstackclient in Python2 passes command line arguments to a\nsubcommand it fails to pass the arguments as text\n(e.g. Unicode). Instead it passes the arguments as binary data encoded\nusing the current locales encoding.\n\nAn easy way to see this is trying to pass a username with a non-ASCII\ncharacter.\n\n% openstack user delete ñew\nNo user with a name or ID of \u0027ñew\u0027 exists.\n\nWhat occurs internally is when the user data is retrieved it\u0027s it\nproperly represented in a Unicode object. However the username pased\nfrom the command line is still a str object encoded in the locales\nencoding (typically UTF-8). A string comparison is attempted between\nthe encoded data from the command line and the Unicode text found in\nthe user representation. This seldom ends well, either the comparison\nfails to match or a codec error is raised.\n\nThere is a hard and fast rule, all text data must be stored in Unicode\nobjects and the conversion from binary encoded text to Unicode must\noccur as close to the I/O boundary as possible. Python3 enforces this\nbehavior automatically but in Python2 it is the programmers job to do\nso.\n\nIn the past there have been attempts to fix problems deep inside\ninternal code by attempting to decode from UTF-8. There are two\nproblems with this approach. First, internal code has no way to\naccurately know what encoding was used to encode the binary data. This\nis way it needs to be decoded as close to the I/O source as possible\nbecause that is the best place to know the actual encoding. Guessing\nUTF-8 is at best a heuristic. Second, there must be a canonical\nrepresentation for data \"inside\" the program, you don\u0027t want dozens of\nindividual modules, classes, methods, etc. performing conversions,\ninstead they should be able to make the assumption in what format text\nis represented in, the format for text data must be Unicode. This is\nanother reason to decode as close to the I/O as possible.\n\nIn Python3 the argv strings are decoded from the locales encoding by\nthe interpreter. By the time any Python3 code sees the argv strings\nthey will be Unicode. However in Python2 there must be explicit code\nadded to decode the argv strings into Unicode.\n\nThe conversion of sys.argv into Unicode only occurs when argv is not\npassed to OpenStackShell.run(). If a caller of OpenStackShell.run()\nsupplies their own arg it is their responsiblity to assure they are\npassing actual text objects. Consider this a requirement of the API.\n\nNote: This patch does not contain a unittest to exercise the behavior\nbecause it is difficult to construct a test that depends on command\ninvocation from a shell. The general structure of the unit tests is to\npass fake argv into OpenStackShell.run() as if it came from a\nshell. Because the new code only operates when argv is not passed and\ndefaults to sys.argv it conflicts with the unittest design.\n\nChange-Id: I779d260744728eae8455ff9dedb6e5c09c165559\nCloses-Bug: 1603494\nSigned-off-by: John Dennis \u003cjdennis@redhat.com\u003e\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/756d2fac67b4128312e1d779648e62f1458b4ffc"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-openstackclient/commit/756d2fac67b4128312e1d779648e62f1458b4ffc"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
