add warning about unsupported libraries in python client generator (#7981)

This commit is contained in:
William Cheng
2020-11-20 11:54:16 +08:00
committed by GitHub
parent 5e02a5bd45
commit c02fc812fe

View File

@@ -150,6 +150,11 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
attrNoneIfUnset = Boolean.valueOf(additionalProperties.get(CodegenConstants.PYTHON_ATTR_NONE_IF_UNSET).toString());
}
additionalProperties.put("attrNoneIfUnset", attrNoneIfUnset);
// check library option to ensure only urllib3 is supported
if (!DEFAULT_LIBRARY.equals(getLibrary())) {
throw new RuntimeException("Only the `urllib3` library is supported in the refactored `python` client generator at the moment. Please fall back to `python-legacy` client generator for the time being. We welcome contributions to add back `asyncio`, `tornado` support to the `pyhton` client generator.");
}
}
/**