)]}'
{"anchor/app.py":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"c8695d2c69a6b8c2b324d7f20edac08d48c574f3","unresolved":false,"context_lines":[{"line_number":190,"context_line":"        os.environ[\u0027HOME\u0027], \u0027.config\u0027, \u0027anchor\u0027, \u0027config.json\u0027)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    try:"},{"line_number":193,"context_line":"        prefix \u003d os.environ[\u0027VIRTUAL_ENV\u0027]"},{"line_number":194,"context_line":"    except KeyError:"},{"line_number":195,"context_line":"        prefix \u003d \u0027\u0027"},{"line_number":196,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_84990cd3","line":193,"updated":"2015-09-09 00:09:44.000000000","message":"prefix \u003d os.environ.get(\u0027VIRTUAL_ENV\u0027, \u0027\u0027)","commit_id":"3d0ae5ff6114b0e90d6712d5a520ca4af1080e96"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"c8695d2c69a6b8c2b324d7f20edac08d48c574f3","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    except KeyError:"},{"line_number":195,"context_line":"        prefix \u003d \u0027\u0027"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    sys_config_path \u003d os.path.join(os.sep, prefix,"},{"line_number":198,"context_line":"                                   \u0027etc\u0027, \u0027anchor\u0027, \u0027config.json\u0027)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"    if \u0027registration_authority\u0027 not in jsonloader.conf.config:"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_c48e2479","line":197,"updated":"2015-09-09 00:09:44.000000000","message":"Can we remove the os.sep and just use \"/\" as the default prefix? VIRTUAL_ENV is going to be absolute too.","commit_id":"3d0ae5ff6114b0e90d6712d5a520ca4af1080e96"}],"anchor/config.py":[{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"2ba1876fb9af1366215969cff41e9c6e94896d85","unresolved":false,"context_lines":[{"line_number":1,"context_line":"server \u003d {"},{"line_number":2,"context_line":"    \u0027port\u0027: \u00275016\u0027,"},{"line_number":3,"context_line":"    \u0027host\u0027: \u00270.0.0.0\u0027"},{"line_number":4,"context_line":"}"},{"line_number":5,"context_line":""},{"line_number":6,"context_line":"# Pecan Application Configurations"}],"source_content_type":"text/x-python","patch_set":9,"id":"1ac06dbe_899fddb3","line":3,"range":{"start_line":3,"start_character":12,"end_line":3,"end_character":21},"updated":"2016-08-19 10:35:16.000000000","message":"Bandit is flagging this now.","commit_id":"bb4c0abba7b3297800e6e0fbdac0d5cf94b46da1"}],"bin/anchor":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"c8695d2c69a6b8c2b324d7f20edac08d48c574f3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/bin/sh"},{"line_number":2,"context_line":"PKG_PATH\u003d$(python -c \"from distutils.sysconfig import get_python_lib; print(get_python_lib())\")"},{"line_number":3,"context_line":"if [ -z \"$VAR\" ]; then"},{"line_number":4,"context_line":"  \"${VIRTUAL_ENV}/bin/uwsgi\" --http-socket :5000 --venv \"${VIRTUAL_ENV}\" --pecan ${PKG_PATH}/anchor/config.py -p 4"},{"line_number":5,"context_line":"else"}],"source_content_type":"application/x-shellscript","patch_set":4,"id":"da20952f_84358ca9","line":2,"updated":"2015-09-09 00:09:44.000000000","message":"I\u0027m not sure if that works well in environments where pecan is using different python than python. For example, what happens if pecan uses python3 and python is python2? Or the other way around?","commit_id":"3d0ae5ff6114b0e90d6712d5a520ca4af1080e96"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"1c13445c325ec7a8390edbbec1fb3da14879070f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"7af24918_d95142da","updated":"2016-03-02 21:01:04.000000000","message":"The setup.cfg states Anchor supports Mac OS X, but this script is Linux specific. So one or the other needs to change.","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"aa7ffc55a28783b8edf03930705272ad113a78c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"7af24918_aa756433","in_reply_to":"7af24918_02020ab4","updated":"2016-03-04 22:41:13.000000000","message":"Think I\u0027m confused.  My bad.","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"4ecb431084127734de3c7bc55f6f0e93315f7d1e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"7af24918_02020ab4","in_reply_to":"7af24918_d95142da","updated":"2016-03-02 22:53:05.000000000","message":"Which part do you mean specifically? If this is a comment about /bin/sh line, macs have it.","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"9886eaefc4895d6bc515bd89022eca30fc50eaac","unresolved":false,"context_lines":[{"line_number":3,"context_line":"STR\u003d\"from distutils.sysconfig import get_python_lib; print(get_python_lib())\""},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"if [ -z \"$VIRTUAL_ENV\" ]; then"},{"line_number":6,"context_line":"  PKG_PATH\u003d$(python -c \"$STR\")"},{"line_number":7,"context_line":"  \"/usr/bin/uwsgi\" --http-socket :5000 --pecan \\"},{"line_number":8,"context_line":"    ${PKG_PATH}/anchor/config.py -p 4"},{"line_number":9,"context_line":"else"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"7af24918_5ce39d05","line":6,"updated":"2016-03-02 06:22:16.000000000","message":"This only works for default python version, I\u0027m not sure how to fix it though... I\u0027ll think about it some more.","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"9886eaefc4895d6bc515bd89022eca30fc50eaac","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"if [ -z \"$VIRTUAL_ENV\" ]; then"},{"line_number":6,"context_line":"  PKG_PATH\u003d$(python -c \"$STR\")"},{"line_number":7,"context_line":"  \"/usr/bin/uwsgi\" --http-socket :5000 --pecan \\"},{"line_number":8,"context_line":"    ${PKG_PATH}/anchor/config.py -p 4"},{"line_number":9,"context_line":"else"},{"line_number":10,"context_line":"  PY_BIN\u003d\"${VIRTUAL_ENV}/bin/python\""}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"7af24918_dcbdedd8","line":7,"updated":"2016-03-02 06:22:16.000000000","message":"The default port has been changed. (5016)","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"4ecb431084127734de3c7bc55f6f0e93315f7d1e","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"if [ -z \"$VIRTUAL_ENV\" ]; then"},{"line_number":6,"context_line":"  PKG_PATH\u003d$(python -c \"$STR\")"},{"line_number":7,"context_line":"  \"/usr/bin/uwsgi\" --http-socket :5000 --pecan \\"},{"line_number":8,"context_line":"    ${PKG_PATH}/anchor/config.py -p 4"},{"line_number":9,"context_line":"else"},{"line_number":10,"context_line":"  PY_BIN\u003d\"${VIRTUAL_ENV}/bin/python\""}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"7af24918_62e02efb","line":7,"range":{"start_line":7,"start_character":2,"end_line":7,"end_character":18},"updated":"2016-03-02 22:53:05.000000000","message":"uwsgi doesn\u0027t necessarily have to live in \"/usr/bin\" - how about using just \"uwsgi\" without a path?","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"4ecb431084127734de3c7bc55f6f0e93315f7d1e","unresolved":false,"context_lines":[{"line_number":5,"context_line":"if [ -z \"$VIRTUAL_ENV\" ]; then"},{"line_number":6,"context_line":"  PKG_PATH\u003d$(python -c \"$STR\")"},{"line_number":7,"context_line":"  \"/usr/bin/uwsgi\" --http-socket :5000 --pecan \\"},{"line_number":8,"context_line":"    ${PKG_PATH}/anchor/config.py -p 4"},{"line_number":9,"context_line":"else"},{"line_number":10,"context_line":"  PY_BIN\u003d\"${VIRTUAL_ENV}/bin/python\""},{"line_number":11,"context_line":"  PKG_PATH\u003d$($PY_BIN -c \"$STR\")"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"7af24918_a2e6b612","line":8,"range":{"start_line":8,"start_character":4,"end_line":8,"end_character":32},"updated":"2016-03-02 22:53:05.000000000","message":"this should be quoted just in case","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"9886eaefc4895d6bc515bd89022eca30fc50eaac","unresolved":false,"context_lines":[{"line_number":9,"context_line":"else"},{"line_number":10,"context_line":"  PY_BIN\u003d\"${VIRTUAL_ENV}/bin/python\""},{"line_number":11,"context_line":"  PKG_PATH\u003d$($PY_BIN -c \"$STR\")"},{"line_number":12,"context_line":"  \"${VIRTUAL_ENV}/bin/uwsgi\" --http-socket :5000 \\"},{"line_number":13,"context_line":"    --venv \"${VIRTUAL_ENV}\" \\"},{"line_number":14,"context_line":"    --pecan ${PKG_PATH}/anchor/config.py \\"},{"line_number":15,"context_line":"    -p 4"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"7af24918_9c724548","line":12,"range":{"start_line":12,"start_character":43,"end_line":12,"end_character":48},"updated":"2016-03-02 06:22:16.000000000","message":"same - different port.","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"4ecb431084127734de3c7bc55f6f0e93315f7d1e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"  PKG_PATH\u003d$($PY_BIN -c \"$STR\")"},{"line_number":12,"context_line":"  \"${VIRTUAL_ENV}/bin/uwsgi\" --http-socket :5000 \\"},{"line_number":13,"context_line":"    --venv \"${VIRTUAL_ENV}\" \\"},{"line_number":14,"context_line":"    --pecan ${PKG_PATH}/anchor/config.py \\"},{"line_number":15,"context_line":"    -p 4"},{"line_number":16,"context_line":"fi"}],"source_content_type":"application/x-shellscript","patch_set":7,"id":"7af24918_02c7aa64","line":14,"range":{"start_line":14,"start_character":12,"end_line":14,"end_character":40},"updated":"2016-03-02 22:53:05.000000000","message":"also could use quoting","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"},{"author":{"_account_id":8119,"name":"Eric Brown","email":"eric_wade_brown@yahoo.com","username":"ericwb"},"change_message_id":"c1c11ae050be7e0226193569e3a6efef7f6c588a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3afc51ec_b72ca8ac","updated":"2016-03-11 16:43:04.000000000","message":"I would prefer Python over shell script.","commit_id":"bb4c0abba7b3297800e6e0fbdac0d5cf94b46da1"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"060878c95b594760140f1550f60d7799b8670d5c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"3afc51ec_fa6d6533","in_reply_to":"3afc51ec_b72ca8ac","updated":"2016-03-12 00:27:46.000000000","message":"I think it would be very dirty that way... If it gets more parameters, it will make sense, but currently, whether it\u0027s in python or sh, it has to shell out to \"which\", \"python\" (it may not be the same python that will run anchor), \"uwsgi\".\n\nWhat do you think python will gain us here?","commit_id":"bb4c0abba7b3297800e6e0fbdac0d5cf94b46da1"}],"setup.py":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"c8695d2c69a6b8c2b324d7f20edac08d48c574f3","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    pass"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"setuptools.setup("},{"line_number":28,"context_line":"    setup_requires\u003d[\u0027pbr\u0027],"},{"line_number":29,"context_line":"    pbr\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_443f7487","line":28,"updated":"2015-09-09 00:09:44.000000000","message":"this was added / will be reverted by the global requirements","commit_id":"3d0ae5ff6114b0e90d6712d5a520ca4af1080e96"}],"tests/controllers/test_app.py":[{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"c8695d2c69a6b8c2b324d7f20edac08d48c574f3","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    @mock.patch(\u0027anchor.jsonloader.conf.load_file_data\u0027)"},{"line_number":248,"context_line":"    def test_config_paths_system_venv(self, conf):"},{"line_number":249,"context_line":"        path \u003d os.path.join(os.sep, os.environ[\u0027VIRTUAL_ENV\u0027],"},{"line_number":250,"context_line":"                            \u0027etc\u0027, \u0027anchor\u0027, \u0027config.json\u0027)"},{"line_number":251,"context_line":"        ret \u003d lambda x: True if x \u003d\u003d path else False"},{"line_number":252,"context_line":"        with mock.patch(\u0027os.path.isfile\u0027, ret):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_041f3c0a","line":249,"updated":"2015-09-09 00:09:44.000000000","message":"Tests can be run directly from setup.py - we can\u0027t rely on VIRTUAL_ENV being set. Also, the same as in the other file - can we strip the os.sep from the beginning?","commit_id":"3d0ae5ff6114b0e90d6712d5a520ca4af1080e96"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"c8695d2c69a6b8c2b324d7f20edac08d48c574f3","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    def test_config_paths_system_venv(self, conf):"},{"line_number":249,"context_line":"        path \u003d os.path.join(os.sep, os.environ[\u0027VIRTUAL_ENV\u0027],"},{"line_number":250,"context_line":"                            \u0027etc\u0027, \u0027anchor\u0027, \u0027config.json\u0027)"},{"line_number":251,"context_line":"        ret \u003d lambda x: True if x \u003d\u003d path else False"},{"line_number":252,"context_line":"        with mock.patch(\u0027os.path.isfile\u0027, ret):"},{"line_number":253,"context_line":"            app.load_config()"},{"line_number":254,"context_line":"            conf.assert_called_with(path)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_04f89cc3","line":251,"updated":"2015-09-09 00:09:44.000000000","message":"can we clean this up to simply:\n\n    x \u003d lambda x: x \u003d\u003d path","commit_id":"3d0ae5ff6114b0e90d6712d5a520ca4af1080e96"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"c8695d2c69a6b8c2b324d7f20edac08d48c574f3","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        with mock.patch.dict(\u0027os.environ\u0027):"},{"line_number":259,"context_line":"            del os.environ[\u0027VIRTUAL_ENV\u0027]"},{"line_number":260,"context_line":"            path \u003d \u0027/etc/anchor/config.json\u0027"},{"line_number":261,"context_line":"            ret \u003d lambda x: True if x \u003d\u003d path else False"},{"line_number":262,"context_line":"            with mock.patch(\u0027os.path.isfile\u0027, ret):"},{"line_number":263,"context_line":"                app.load_config()"},{"line_number":264,"context_line":"                conf.assert_called_with(path)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_84d10c32","line":261,"updated":"2015-09-09 00:09:44.000000000","message":"ret \u003d lambda x: x\u003d\u003dpath","commit_id":"3d0ae5ff6114b0e90d6712d5a520ca4af1080e96"},{"author":{"_account_id":1528,"name":"Stanislaw Pitucha","email":"viraptor@gmail.com","username":"stanislaw-pitucha"},"change_message_id":"9886eaefc4895d6bc515bd89022eca30fc50eaac","unresolved":false,"context_lines":[{"line_number":250,"context_line":"    def test_config_paths_system(self, conf):"},{"line_number":251,"context_line":"        path \u003d os.path.join(os.environ.get(\u0027VIRTUAL_ENV\u0027, os.sep),"},{"line_number":252,"context_line":"                            \u0027etc/anchor/config.json\u0027)"},{"line_number":253,"context_line":"        ret \u003d lambda x: True if x \u003d\u003d path else False"},{"line_number":254,"context_line":"        with mock.patch(\u0027os.path.isfile\u0027, ret):"},{"line_number":255,"context_line":"            app.load_config()"},{"line_number":256,"context_line":"            conf.assert_called_with(path)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7af24918_9cd7e5ec","line":253,"updated":"2016-03-02 06:22:16.000000000","message":"this is just: lambda x: x\u003d\u003dpath","commit_id":"583303478510c7d19834ef22ca427c88bf4fc59b"}]}
