File: Swagger Codegen's underlying urllib3 dependency usage (often surfaces when the API Client or Rest Client initializes connection pools). Location: The error surfaces via AttributeError: module 'urllib3' has no attribute 'get_host'
Issue Description: The Upstox Python SDK (which is auto-generated by an older version of swagger-codegen) relies on the urllib3.get_host() utility function in its networking logic.
Why this is a bug: The urllib3.get_host function was officially deprecated and removed in urllib3 version 2.0.0. Because the Upstox SDK's setup.py does not strictly pin urllib3 < 2.0.0, any developer installing the SDK on a modern Python environment will likely pull urllib3 v2.x. The moment the SDK attempts to make an API call or parse a URL, it crashes instantly with an AttributeError.
Proposed Fix for the Maintainers:
Short-term fix: Update setup.py to strictly pin urllib3 >= 1.25.3, < 2.0.0.
Long-term fix: Re-generate the SDK using a modern OpenAPI Generator (which has replaced the deprecated swagger-codegen) that uses urllib3.util.parse_url(url) instead of the deprecated urllib3.get_host(url).
File: Swagger Codegen's underlying urllib3 dependency usage (often surfaces when the API Client or Rest Client initializes connection pools). Location: The error surfaces via AttributeError: module 'urllib3' has no attribute 'get_host'
Issue Description: The Upstox Python SDK (which is auto-generated by an older version of swagger-codegen) relies on the urllib3.get_host() utility function in its networking logic.
Why this is a bug: The urllib3.get_host function was officially deprecated and removed in urllib3 version 2.0.0. Because the Upstox SDK's setup.py does not strictly pin urllib3 < 2.0.0, any developer installing the SDK on a modern Python environment will likely pull urllib3 v2.x. The moment the SDK attempts to make an API call or parse a URL, it crashes instantly with an AttributeError.
Proposed Fix for the Maintainers:
Short-term fix: Update setup.py to strictly pin urllib3 >= 1.25.3, < 2.0.0.
Long-term fix: Re-generate the SDK using a modern OpenAPI Generator (which has replaced the deprecated swagger-codegen) that uses urllib3.util.parse_url(url) instead of the deprecated urllib3.get_host(url).