Jsonargparse

Latest version: v4.37.0

Safety actively analyzes 707375 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 19

4.37.0

--------------------

Added
^^^^^
- Experimental support for sub-classing ``ArgumentParser`` to customize
``add_argument`` (`661
<https://github.com/omni-us/jsonargparse/pull/661>`__).

Fixed
^^^^^
- Incorrect instantiation order when instantiation targets share a parent (`662
<https://github.com/omni-us/jsonargparse/pull/662>`__).
- Pydantic discriminated unions handled incorrectly (`667
<https://github.com/omni-us/jsonargparse/pull/667>`__).
- Failure when a link target has an undefined parent (`668
<https://github.com/omni-us/jsonargparse/pull/668>`__)
- Functions that create types now have ``TypeAlias`` return type to avoid mypy
errors (`671 <https://github.com/omni-us/jsonargparse/pull/671>`__).
- String parsing regressions (`673
<https://github.com/omni-us/jsonargparse/pull/673>`__, `#674
<https://github.com/omni-us/jsonargparse/pull/674>`__).
- Regression when using old ``CLI`` and inferring components from the local
context (`676 <https://github.com/omni-us/jsonargparse/pull/676>`__).

4.36.0

--------------------

Added
^^^^^
- Support without ``pyyaml``, though only an internal refactor prior to eventual
removal of ``pyyaml`` as a required dependency in v5.0.0 (`652
<https://github.com/omni-us/jsonargparse/pull/652>`__).
- Support for ``toml`` as config file format (`660
<https://github.com/omni-us/jsonargparse/pull/660>`__).

Changed
^^^^^^^
- ``jsonargparse.CLI`` renamed to ``jsonargparse.auto_cli`` to follow `PEP 8
<https://peps.python.org/pep-0008/#function-and-variable-names>`__ functions
naming convention (`640
<https://github.com/omni-us/jsonargparse/pull/640>`__).
- ``ArgumentParser.check_config`` renamed to ``validate`` and ``skip_check``
parameter of ``ArgumentParser.{dump, save, get_defaults}`` renamed to
``skip_validation`` (`639
<https://github.com/omni-us/jsonargparse/pull/639>`__).
- Fail when ``Namespace`` is used as a type to make it clear about being
unsupported (`656 <https://github.com/omni-us/jsonargparse/pull/656>`__).

Fixed
^^^^^
- Help for ``Protocol`` types not working correctly (`645
<https://github.com/omni-us/jsonargparse/pull/645>`__).
- Adding ``attrs.define`` dataclasses with nested dataclasses that are marked
with ``attrs.field`` (such as for a default factory) are not parsed correctly
(`643 <https://github.com/omni-us/jsonargparse/pull/643>`__).
- Nested dataclass with ``init=False`` not working correctly (`650
<https://github.com/omni-us/jsonargparse/pull/650>`__).

Deprecated
^^^^^^^^^^
- ``ArgumentParser.check_config`` and ``skip_check`` parameter of
``ArgumentParser.{dump, save, get_defaults}`` are deprecated and will be
removed in v5.0.0, instead use ``validate`` and ``skip_validation`` (`639
<https://github.com/omni-us/jsonargparse/pull/639>`__).

4.35.0

--------------------

Added
^^^^^
- Support for ``print config`` argument to reuse the name of the config argument
by using ``%s`` (`630 <https://github.com/omni-us/jsonargparse/pull/630>`__).

Changed
^^^^^^^
- Argument groups created from dataclass-like that have zero configurable
arguments no longer adds a config loader (`634
<https://github.com/omni-us/jsonargparse/pull/634>`__).
- The ``CLASS_PATH_OR_NAME`` for subclass help is now optional and if not given
the help of the base class is printed (`628
<https://github.com/omni-us/jsonargparse/pull/628>`__).

Fixed
^^^^^
- Account for change in ``ArgumentParser._parse_known_args`` since Python 3.12.8
and 3.13.1 (`644 <https://github.com/omni-us/jsonargparse/pull/644>`__).

Deprecated
^^^^^^^^^^
- ``add_dataclass_arguments`` is deprecated and will be removed in v5.0.0.
Instead use ``add_class_arguments`` (`634
<https://github.com/omni-us/jsonargparse/pull/634>`__).
- From v5.0.0 the print config argument will by default reuse the name of the
config argument as ``--print_%s`` instead of being always ``--print_config``
(`630 <https://github.com/omni-us/jsonargparse/pull/630>`__).

4.34.1

--------------------

Fixed
^^^^^
- List of dataclass with nested dataclass attribute fails to parse (`625
<https://github.com/omni-us/jsonargparse/pull/625>`__).
- ``NotRequired`` incorrectly having ``inspect._empty`` as default (`625
<https://github.com/omni-us/jsonargparse/pull/625>`__).
- Callable protocols failing to parse (`637
<https://github.com/omni-us/jsonargparse/pull/637>`__).
- Help incorrectly showing protocols in known subclasses (`638
<https://github.com/omni-us/jsonargparse/pull/638>`__).

4.34.0

--------------------

Added
^^^^^
- Support for PEP 692, i.e., ``Unpack[TypedDict]`` annotations for ``**kwargs``
(`586 <https://github.com/omni-us/jsonargparse/pull/586>`__).

Fixed
^^^^^
- Empty tuples are now parsed correctly instead of raising an error (`592
<https://github.com/omni-us/jsonargparse/pull/592>`__).
- Required and optional ``TypedDict`` keys are now correctly inferred when one
inherits one ``TypedDict`` from another with different totality (`597
<https://github.com/omni-us/jsonargparse/pull/597>`__).
- Callables that return class not considering previous values (`603
<https://github.com/omni-us/jsonargparse/pull/603>`__).
- Custom instantiators not working for nested dependency injection (`608
<https://github.com/omni-us/jsonargparse/pull/608>`__).
- Failure when resolving forward references from dataclass parameter types
(`611 <https://github.com/omni-us/jsonargparse/pull/611>`__).
- Fix callable protocol inheritance.
(`599 <https://github.com/omni-us/jsonargparse/pull/599>`__).

Changed
^^^^^^^
- Callables that return class with class default now normalizes the default to
a subclass spec with ``class_path`` (`603
<https://github.com/omni-us/jsonargparse/pull/603>`__).

4.33.2

--------------------

Fixed
^^^^^
- Fix `parse_argv_item` to address the behavior change in `argparse` since
Python 3.12.7 (`591 <https://github.com/omni-us/jsonargparse/pull/591>`__).

Page 1 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.