Jsonargparse

Latest version: v4.34.0

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

Scan your dependencies

Page 1 of 18

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>`__).

4.33.1

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

Fixed
^^^^^
- Use ``jsonnet-sdist`` for python 3.13 to be allowed to push package to pypi
(`584 <https://github.com/omni-us/jsonargparse/pull/584>`__).

4.33.0

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

Added
^^^^^
- Support for Python 3.13 (`554
<https://github.com/omni-us/jsonargparse/pull/554>`__).
- Support for ``NotRequired`` and ``Required`` annotations for ``TypedDict``
keys (`571 <https://github.com/omni-us/jsonargparse/pull/571>`__).
- ``dataclass`` types now accept ``class_path`` and ``init_args`` as value
(`581 <https://github.com/omni-us/jsonargparse/pull/581>`__).

Fixed
^^^^^
- Callable type with subclass return not showing the ``--*.help`` option (`567
<https://github.com/omni-us/jsonargparse/pull/567>`__).
- Forward referenced types not compatible with ``Type`` typehint (`576
<https://github.com/omni-us/jsonargparse/pull/576/>`__).
- Subclass nested in ``Iterable`` makes help fail (`578
<https://github.com/omni-us/jsonargparse/pull/578>`__).
- ``Literal`` mixing enum values and strings failing to parse (`580
<https://github.com/omni-us/jsonargparse/pull/580/>`__).

Changed
^^^^^^^
- Removed shtab experimental warning (`561
<https://github.com/omni-us/jsonargparse/pull/561>`__).
- For consistency ``add_subclass_arguments`` now sets default ``None`` instead
of ``SUPPRESS`` (`568 <https://github.com/omni-us/jsonargparse/pull/568>`__).
- Removed support for python 3.7 (`583
<https://github.com/omni-us/jsonargparse/pull/583>`__).

4.32.1

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

Fixed
^^^^^
- ``dict`` types not correctly forwarding previous nested values when parsing
(`559 <https://github.com/omni-us/jsonargparse/pull/559>`__).
- ``List`` type incorrectly using defaults from previous item (`560
<https://github.com/omni-us/jsonargparse/pull/560>`__).
- ``--print_shtab`` not adding file completer for ``_ActionConfigLoad`` (`562
<https://github.com/omni-us/jsonargparse/pull/562>`__).
- ``parser_mode`` not inherited by nested parsers (`564
<https://github.com/omni-us/jsonargparse/pull/564>`__).

4.32.0

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

Added
^^^^^
- Support for ``MappingProxyType`` as a type and as default for mapping types
(`540 <https://github.com/omni-us/jsonargparse/pull/540>`__).
- Support for ``OrderedDict`` as a type (`545
<https://github.com/omni-us/jsonargparse/pull/545>`__).
- New function ``get_loader`` to get the current loader for a given parser mode
(`479 comment
<https://github.com/omni-us/jsonargparse/issues/479#issuecomment-2022596544>`__,
`536 comment
<https://github.com/omni-us/jsonargparse/issues/536#issuecomment-2186961644>`__).

Fixed
^^^^^
- ``dump`` failing when a link target requires serialization and
``skip_link_targets=False`` (`542
<https://github.com/omni-us/jsonargparse/pull/542>`__).
- ``default_config_files`` making parse fail for subcommands and nested subclass
types (`lightning-forums5963
<https://lightning.ai/forums/t/problem-lightningcli-with-default-config-files/5963>`__).
- Fixes related to transformers ``PreTrainedModel.from_pretrained``
(`lightning19863 comment
<https://github.com/Lightning-AI/pytorch-lightning/discussions/19863#discussioncomment-9821765>`__):

- Import path of inherited classmethod not resolving correctly (`548
<https://github.com/omni-us/jsonargparse/pull/548>`__).
- Resolved parameters leading to multiple values for keyword argument (`551
<https://github.com/omni-us/jsonargparse/pull/551>`__).
- Function with return type a class in ``class_path`` in some cases fails
with unexpected ``instantiate`` parameter error (`551
<https://github.com/omni-us/jsonargparse/pull/551>`__).
- Ignore incorrectly resolved ``config_file_name`` parameter for
transformers model ``from_pretrained``(`551
<https://github.com/omni-us/jsonargparse/pull/551>`__).

Page 1 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.