--------------------
Added
^^^^^
- Support for dataclasses nested in a type (`243
<https://github.com/omni-us/jsonargparse/issues/243>`__).
- Support for pydantic `models <https://docs.pydantic.dev/usage/models/>`__ and
attrs `define <https://www.attrs.org/en/stable/examples.html>`__ similar to
dataclasses.
- Support for `pydantic types
<https://docs.pydantic.dev/usage/types/#pydantic-types>`__.
- Backport type stubs in python<=3.9 to support PEP `585
<https://peps.python.org/pep-0585/>`__ and `604
<https://peps.python.org/pep-0604/>`__ syntax.
Fixed
^^^^^
- `str` parameter in subclass incorrectly parsed as dict with implicit `null`
value (`262 <https://github.com/omni-us/jsonargparse/issues/262>`__).
- Wrong error indentation for subclass in union (`lightning17254
<https://github.com/Lightning-AI/lightning/issues/17254>`__).
- ``dataclass`` from pydantic not working (`100 comment
<https://github.com/omni-us/jsonargparse/issues/100#issuecomment-1408413796>`__).
- ``add_dataclass_arguments`` not forwarding ``sub_configs`` parameter.
- Failure to instantiate nested class group without arguments (`lightning17263
<https://github.com/Lightning-AI/lightning/issues/17263>`__).
Changed
^^^^^^^
- Switched from ``setup.cfg`` to ``pyproject.toml`` for configuration.
- Removed ``build_sphinx`` from ``setup.py`` and documented how to build.
- Include enum members in error when invalid value is given
(`lightning17247
<https://github.com/Lightning-AI/lightning/issues/17247>`__).
- The ``signatures`` extras now installs the ``typing-extensions`` package on
python<=3.9.
- ``CLI`` now when given a class without methods, the class instance is
returned.
Deprecated
^^^^^^^^^^
- Support for python 3.6 will be removed in v5.0.0. New features added in
>=4.21.0 releases are not guaranteed to work in python 3.6.