)]}'
{"oslo_middleware/cors.py":[{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"65e8b0bb59e066cd5037f96a2ecbfe345a10176a","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def oslo_factory(application, conf):"},{"line_number":58,"context_line":"    # First, check the configuration and register global options."},{"line_number":59,"context_line":"    if not conf or not isinstance(conf, cfg.ConfigOpts):"},{"line_number":60,"context_line":"        raise ValueError(\"This middleware requires a configuration of\""},{"line_number":61,"context_line":"                         \" type oslo_config.ConfigOpts.\")"},{"line_number":62,"context_line":"    conf.register_opts(CORS_OPTS, \u0027cors\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_66fc9872","line":59,"updated":"2015-06-17 08:31:41.000000000","message":"Not really duck-typing compatible :)","commit_id":"d608e26f7395bba95aeb3b476c1df3af08d53b96"},{"author":{"_account_id":9717,"name":"Michael Krotscheck","email":"krotscheck@gmail.com","username":"krotscheck"},"change_message_id":"76316ac4024ac079cd9444ecfaea338453281915","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"def oslo_factory(application, conf):"},{"line_number":58,"context_line":"    # First, check the configuration and register global options."},{"line_number":59,"context_line":"    if not conf or not isinstance(conf, cfg.ConfigOpts):"},{"line_number":60,"context_line":"        raise ValueError(\"This middleware requires a configuration of\""},{"line_number":61,"context_line":"                         \" type oslo_config.ConfigOpts.\")"},{"line_number":62,"context_line":"    conf.register_opts(CORS_OPTS, \u0027cors\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_ee05c810","line":59,"in_reply_to":"fa32b979_66fc9872","updated":"2015-06-17 18:18:18.000000000","message":"Sadly, no. That\u0027s because of the list_all_sections() call in conf. I wonder if it\u0027s feasible to fix that in oslo_config though.","commit_id":"d608e26f7395bba95aeb3b476c1df3af08d53b96"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"321115cc76d196cc998eb2263467d2c9aac3feea","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            # Register with the preconstructed defaults"},{"line_number":87,"context_line":"            conf.register_opts(subgroup_opts, section)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            # Make sure that allowed_origin is available. Otherwise skip."},{"line_number":90,"context_line":"            app.add_origin(**conf[section])"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    return app"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_454c1842","line":89,"updated":"2015-06-22 22:58:13.000000000","message":"i\u0027m not sure this comment makes sense anymore... if you don\u0027t pass in allow_origin it won\u0027t skip, it will fail.","commit_id":"6df5d3a6583fc98e60ac280d77d03ef94e3eeaf0"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"321115cc76d196cc998eb2263467d2c9aac3feea","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    return app"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"def paste_filter_factory(global_conf, **local_conf):"},{"line_number":96,"context_line":"    \u0027\u0027\u0027Factory to support paste.deploy.\u0027\u0027\u0027"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def filter(app):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_65f59cc9","line":95,"updated":"2015-06-22 22:58:13.000000000","message":"can we drop paste_... just to be inline with other middleware","commit_id":"6df5d3a6583fc98e60ac280d77d03ef94e3eeaf0"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0755b3eb769644d5bb2c063d5e4fdff4e05c33eb","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def filter(app):"},{"line_number":97,"context_line":"        cors_app \u003d CORS(app)"},{"line_number":98,"context_line":"        cors_app.add_origin(**local_conf)"},{"line_number":99,"context_line":"        return cors_app"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    return filter"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_ede9ab1b","line":98,"updated":"2015-06-30 15:12:03.000000000","message":"Does paste report a useful error if an unexpected named argument is passed in or should we be more explicit here about the arguments we pass along?","commit_id":"65ece6c8ade81129050247a99e7461b6e5071617"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0755b3eb769644d5bb2c063d5e4fdff4e05c33eb","unresolved":false,"context_lines":[{"line_number":119,"context_line":"        \u0027Pragma\u0027"},{"line_number":120,"context_line":"    ]"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __init__(self, application):"},{"line_number":123,"context_line":"        super(CORS, self).__init__(application)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        self.allowed_origins \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_cd5aa72a","line":122,"updated":"2015-06-30 15:12:03.000000000","message":"This change is going to break existing users of the middleware. One way to address that is to deprecate the old class and make a new one that works with the factories in the way we want. You could also set conf\u003dNone by default and report a deprecation if a value is passed to it, but that might be more complicated and harder to figure out what\u0027s safe to delete during the next cycle.","commit_id":"65ece6c8ade81129050247a99e7461b6e5071617"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"0755b3eb769644d5bb2c063d5e4fdff4e05c33eb","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        if allowed_origin in self.allowed_origins:"},{"line_number":142,"context_line":"            LOG.warn(\u0027Allowed origin [%s] already exists, skipping\u0027 % ("},{"line_number":143,"context_line":"                allowed_origin,))"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        self.allowed_origins[allowed_origin] \u003d {"},{"line_number":146,"context_line":"            \u0027allow_credentials\u0027: allow_credentials,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_0d308f9d","line":143,"updated":"2015-06-30 15:12:03.000000000","message":"Should this return if it\u0027s \"skipping\" the entry? Or should the log message say that it is overriding or replacing the existing settings?","commit_id":"65ece6c8ade81129050247a99e7461b6e5071617"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"ff598dc73304b9d5a096f27fffa7e57659a55d02","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # Sanity check. Do we have an oslo.config? If so, load it. Else, assume"},{"line_number":93,"context_line":"        # that we\u0027ll use add_config."},{"line_number":94,"context_line":"        if not conf:"},{"line_number":95,"context_line":"            return"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        # First, check the configuration and register global options."}],"source_content_type":"text/x-python","patch_set":6,"id":"ba3cc151_dedd6b15","line":94,"updated":"2015-06-30 15:55:13.000000000","message":"I like the general approach you\u0027ve switched to. I\u0027m not sure I like the return in the middle of __init__ though. How about putting the rest of __init__ into a function, and doing a positive test for conf before calling it?\n\n  if conf:\n    self._init_from_config(conf)","commit_id":"df3f8e8d8b601eb60e87e0065ec72252ac99b71d"}]}
