Skip to content

Commit c02fc81

Browse files
authored
add warning about unsupported libraries in python client generator (#7981)
1 parent 5e02a5b commit c02fc81

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonClientCodegen.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ public void processOpts() {
150150
attrNoneIfUnset = Boolean.valueOf(additionalProperties.get(CodegenConstants.PYTHON_ATTR_NONE_IF_UNSET).toString());
151151
}
152152
additionalProperties.put("attrNoneIfUnset", attrNoneIfUnset);
153+
154+
// check library option to ensure only urllib3 is supported
155+
if (!DEFAULT_LIBRARY.equals(getLibrary())) {
156+
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.");
157+
}
153158
}
154159

155160
/**

0 commit comments

Comments
 (0)