Jsonargparse

Latest version: v4.28.0

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

Scan your dependencies

Page 1 of 17

4.28.0

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

Added
^^^^^
- Support for "-" as value for Path class initialization so that user
can ask to use standard input/output instead of file (`463
<https://github.com/omni-us/jsonargparse/issues/463>`__).
- Option in ``CLI`` to provide subcommands help when components given in a dict
(`litgpt996 comment
<https://github.com/Lightning-AI/litgpt/issues/996#issuecomment-1996201548>`__).
- `TypeAliasType` support added (`480
<https://github.com/omni-us/jsonargparse/issues/480>`__).

Fixed
^^^^^
- Account for breaking change in ``argparse.ArgumentParser._parse_optional``
affecting python ``>=3.11.9`` and ``>=3.12.3`` (`484
<https://github.com/omni-us/jsonargparse/issues/484>`__).
- ``lazy_instance`` not working for callable classes (`473 comment
<https://github.com/omni-us/jsonargparse/issues/481#issuecomment-2030932435>`__).
- ``Callable`` type with class return and zero arguments not working
(`lightning19574 comment
<https://github.com/lightning-AI/pytorch-lightning/issues/19574#issuecomment-2002932565>`__).
- Attrs and Pydantic 2 dataclasses with non-init fields fail to instantiate
(`480 <https://github.com/omni-us/jsonargparse/issues/480>`__).
- Default values/factories for Pydantic 2 dataclasses with `Field` initializers
are not right (`480 <https://github.com/omni-us/jsonargparse/issues/480>`__).
- `Annotated` fields in dataclass-likes (eg FastAPI types) resolve incorrectly
(`480 <https://github.com/omni-us/jsonargparse/issues/480>`__).

4.27.7

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

Fixed
^^^^^
- Regression from `14456c2
<https://github.com/omni-us/jsonargparse/commit/14456c21ff7a11ba420f010d2b21bcfdb14977a2>`__
that prevented ``**kwargs`` parameter resolving when an ``Optional[Callable]``
type is used (`473
<https://github.com/omni-us/jsonargparse/issues/473>`__).

4.27.6

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

Fixed
^^^^^
- Failure when getting parameters from a class created with
``class_from_function`` from a ``classmethod`` without parameter types (`454
<https://github.com/omni-us/jsonargparse/issues/454>`__).
- Subsubcommand parse failing when ``default_env=True`` (`465
<https://github.com/omni-us/jsonargparse/issues/465>`__).
- Optional callable that returns a class instance with a lambda default,
produces an invalid string default.
- dataclass single parameter change incorrectly resetting previous values (`464
<https://github.com/omni-us/jsonargparse/issues/464>`__).
- Add function signature failing when conditionally calling different functions
(`467 <https://github.com/omni-us/jsonargparse/issues/467>`__).

4.27.5

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

Fixed
^^^^^
- Importable class instances fail to parse and serialize (`446
<https://github.com/omni-us/jsonargparse/issues/446>`__).
- Failure when trying to pickle instances created with ``lazy_instance``.
- Confusing error message when creating a link with a target that is already a
target of another link.

4.27.4

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

Fixed
^^^^^
- ``argcomplete`` not working when type and choices given (`442
<https://github.com/omni-us/jsonargparse/issues/442>`__).
- Confusing error message when ``CLI`` is used with a class that defines a
``subcommand`` method (`430 comment
<https://github.com/omni-us/jsonargparse/issues/430#issuecomment-1903974112>`__).
- ``CLI`` crashes when a method has a ``config`` parameter. Due to redundancy,
``--config`` argument should not be added.

4.27.3

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

Fixed
^^^^^
- Argument links not working for target ``init_args`` in an optional list (`433
<https://github.com/omni-us/jsonargparse/issues/433>`__).
- Signature parameter default that doesn't match its type failing on
instantiation and serialization (`lightning19289 comment
<https://github.com/Lightning-AI/pytorch-lightning/pull/19289#issuecomment-1902618722>`__).

Page 1 of 17

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.