You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The change to if schema_url.startswith("http") needs to be carried over. It's necessary to "fix(custom_jsonref_jsonloader): Read from filesystem if schema_url is a file path", because lib-cove has already messed around with the uri value by this point (IIRC), and checking schema_url directly is the only way to know if the URL is a file path or not.
Edit: Indeed - uri is parsed, and then uri is set to uri = urljoin(schema_url, ...). So, if schema_url is a file path, then "http" in uri_info.scheme will be True, even though the subsequent GET request will use a value of uri that's prefixed with a file path (i.e. no scheme). So, it's necessary to check schema_url instead of uri. This is more correct, even if this particular test doesn't need it.
The text was updated successfully, but these errors were encountered:
@jpmckinney How important do you think it is to do this one? And is it for the purposes of making tests easier or does it affect normal running? I know the number of lines of code changed is tiny, but I would want to fully understand the code path and other things that use this so it may take a while to do.
For reference, change to libcove/lib/common.py, custom_jsonref_jsonloader func, inner jsonloader func:
Hmm, thanks to #136 I circumvent this issue entirely, so I don't need this fixed.
That said, I would keep the issue open, as it is a bug, and for my part, I've confirmed that the fix doesn't negatively affect any other code paths, etc.
The code paths are quite gnarly as this code is very much action-at-a-distance, so I understand that it would take time to re-validate.
From #137
The text was updated successfully, but these errors were encountered: