Jsonargparse

Latest version: v4.34.0

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

Scan your dependencies

Page 5 of 18

4.23.1

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

Fixed
^^^^^
- ``save`` fails when a link target is a required parameter nested in a subclass
(`332 <https://github.com/omni-us/jsonargparse/issues/332>`__).
- ``typing.Literal`` types skipped when typing_extensions is installed
(`lightning18184 <https://github.com/Lightning-AI/lightning/pull/18184>`__).
- ``class_from_function`` failing when called on the same function multiple
times (`lightning18180
<https://github.com/Lightning-AI/lightning/issues/18180>`__).
- Prevent showing errors when running ``ps`` on windows.

4.23.0

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

Added
^^^^^
- Classes created with ``class_from_function`` now have a valid import path
(`309 <https://github.com/omni-us/jsonargparse/issues/309>`__).

Fixed
^^^^^
- Invalid environment variable names when ``env_prefix`` is derived from
a ``prog`` containing dashes.
- Pylance unable to resolve types from ``jsonargparse.typing``.
- Inconsistent ``ARG:`` and missing ``ENV:`` in help when ``default_env=True``.
- ``typing.Literal`` types skipped on python 3.9 when typing_extensions is
installed (`lightning18125 comment
<https://github.com/Lightning-AI/lightning/pull/18125#issuecomment-1644797707>`__).

Changed
^^^^^^^
- Subcommands main parser help changes:
- Set notation of subcommands choices now only included in usage.
- In subcommands section, now each subcommand is always shown separately,
including the name, and if available aliases and help.
- When ``default_env=True`` include subcommand environment variable name.

4.22.1

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

Fixed
^^^^^
- Parameter without default and type optional incorrectly added as a required
argument (`312 <https://github.com/omni-us/jsonargparse/issues/312>`__).
- ``class_from_function`` not failing when return annotation is missing.
- ``add_subclass_arguments`` with single base class and no docstring,
incorrectly shown as tuple in help.
- When all arguments of a group are derived from links, a config load option is
incorrectly shown in help.
- Printing help fails for parsers that have a link whose target is an argument
lacking type and help.

4.22.0

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

Added
^^^^^
- Parameters that receive a path now also accept ``os.PathLike`` type.
- ``class_from_function`` now supports ``func_return`` parameter to specify the
return type of the function (`lightning-flash1564 comment
<https://github.com/Lightning-Universe/lightning-flash/pull/1564#discussion_r1218147330>`__).
- Support for postponed evaluation of annotations PEP `563
<https://peps.python.org/pep-0563/>`__ ``from __future__ import annotations``
(`120 <https://github.com/omni-us/jsonargparse/issues/120>`__).
- Backport types in python<=3.9 to support PEP `585
<https://peps.python.org/pep-0585/>`__ and `604
<https://peps.python.org/pep-0604/>`__ for postponed evaluation of annotations
(`120 <https://github.com/omni-us/jsonargparse/issues/120>`__).
- Support for ``range`` as a type.

Fixed
^^^^^
- Regular expressions vulnerable to polynomial runtime due to backtracking.
- ``attrs`` fields with factory default causes parse to fail (`299
<https://github.com/omni-us/jsonargparse/issues/299>`__).
- Stop subclass dive if you hit bad import (`304
<https://github.com/omni-us/jsonargparse/issues/304>`__).

Changed
^^^^^^^
- Added ``_`` prefix to module names to be explicit about non-public API.

Deprecated
^^^^^^^^^^
- Importing from original non-public module paths (without ``_`` prefix) now
gives a ``DeprecationWarning``. From v5.0.0 these imports will fail.

4.21.2

Not secure
--------------------

Fixed
^^^^^
- Failure for nested argument in optional dataclass type (`289
<https://github.com/omni-us/jsonargparse/issues/289>`__).
- Argument links applied on parse silently ignored when the source validation
fails.

4.21.1

Not secure
--------------------

Fixed
^^^^^
- AST resolver not working for dict used in a method when the dict is created
using the curly braces syntax.
- Failure on multiple deep arguments linked on instantiation (`275
<https://github.com/omni-us/jsonargparse/issues/275>`__).

Page 5 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.