* Add `ca_cert_data` parameter to Python client.
This lets a client validate a server's CA certificate chain using a
variable/constant containing PEM (`str`) or DER (`bytes`) data, rather than
needing to reference a file on disk.
* python: Fix `ca_cert_data` on Python 3.8
* python: adjust basic typing information
This is an initial pass to fix and adjust the typing information for the
generated client. This is enough to have mypy runnning without complains
on all the (modern) generated clients (Pydantic v1 code is not checked
for instance)
mypy is also now run directly in the CI, so further changes will also be
checked and thus, will need to be compliant with good typing
information.
Note that this doesn't *fully* type all the code: mypy is not run in
"strict" mode and there are still many functions/methods/attributes
which are still not fully typed, but it's a first good step in that
direction.
* ApiResponse's raw_data can't be None
* Fix indentation
* Revert test changes
* run mypy on tests/ directory
* don't forcefully convert the client response headers to dict
* override petstore ApiResponse model
* adjust type of 'any/one_of_schemas' fields
This was removed in #16802, but using a higher value than 1,
or at least making this configurable makes complete sense.
Without this, we get a lot of these log messages:
[ WARNING] Connection pool is full, discarding connection:
* python: several typing and style improvements
The generated (python) code fails with several standard validation tools,
including `flake8`, `mypy`, and `autoflake`. While fixing every possible
violation -- especially wrto typing -- woudl be a project, some of the
changes are fairly easy.
- The `autoflake` tool picks up on unused imports. These can just be removed.
- The `mypy` tool picks up on numerious typing violations, especially if set
to its strictest mode. As a starting point, all functions ought to annotate
a return type, including constructors, even if the return type is `None`
because otherwise the functions are omitted from type checking and it's
impossible to make incremental progress towards adding types.
- The `flake8` tool mostly finds whitespace and line-length issues; while
line-length standards very, the source already includes several flake8
ignores, so it seems safe to add a few more.
* Add generated files
* Restore imports used by `AbstractPythonCodegen.java`
* Update generated files