Addresses an error that occurs when trying to reach the versioned API endpoints instance:login and projects:import. Since these look like schemes, the function urljoin assumes they are the absolute URI. An additional, and not ideal, change has been made to still accommodate making requests with full URIs, so long as they have the same protocol (http, https, etc.) as is configured for the client instance.
💻 Examples
from tamr_unify_client import client
TAMR = client.Client(...)
TAMR.post("projects:import", json={...})
Before this PR, the underlying request would try to hit projects:import and fail with a requests.exceptions.InvalidSchema exception. With this PR the request will succeed.
An alternative to this PR is to provide the guidance that the API endpoints of the format abc:xyz must be worked around by formatting with a ./-prefix (./abc:xyz) or hit with and absolute URI.
↪️ Pull Request
Addresses an error that occurs when trying to reach the versioned API endpoints
instance:login
andprojects:import
. Since these look like schemes, the functionurljoin
assumes they are the absolute URI. An additional, and not ideal, change has been made to still accommodate making requests with full URIs, so long as they have the same protocol (http
,https
, etc.) as is configured for the client instance.💻 Examples
Before this PR, the underlying request would try to hit
projects:import
and fail with arequests.exceptions.InvalidSchema
exception. With this PR the request will succeed.An alternative to this PR is to provide the guidance that the API endpoints of the format
abc:xyz
must be worked around by formatting with a./
-prefix (./abc:xyz
) or hit with and absolute URI.✔️ PR Todo