Update dependency jsonargparse to v4 #9
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
This PR contains the following updates:
==2.32.2->==4.42.0==3.11.2->==4.42.0Release Notes
omni-us/jsonargparse (jsonargparse)
v4.42.0Compare Source
Added
^^^^^
set_parsing_settingsnow supports settingallow_py_filesto enablestubs resolver searching in
.pyfiles in addition to.pyi(#​770 <https://github.com/omni-us/jsonargparse/pull/770>__).#​775 <https://github.com/omni-us/jsonargparse/pull/775>__).BaseModelsubclasses (#​781 <https://github.com/omni-us/jsonargparse/pull/781>__).Optional[Data],Union[Data1, Data2](#​783 <https://github.com/omni-us/jsonargparse/pull/783>__).set_parsing_settingsnow supportsomegaconf_absolute_to_relative_pathsto enable backward compatibility of
omegaconf+parser mode by convertingabsolute paths to relative in interpolations (
#​774 <https://github.com/omni-us/jsonargparse/pull/774>__).Fixed
^^^^^
#​770 <https://github.com/omni-us/jsonargparse/pull/770>__).dataclasswith default failing whenvalidate_defaults=True(#​771 <https://github.com/omni-us/jsonargparse/pull/771>__).(
#​772 <https://github.com/omni-us/jsonargparse/pull/772>__).omegaconf+parser mode failing when there areinf,-infornanvalues (
#​773 <https://github.com/omni-us/jsonargparse/pull/773>__).savewithmultifile=Truenot saving separate subconfigs for items in alist (
#​779 <https://github.com/omni-us/jsonargparse/pull/779>__).omegaconfparser mode failing on spawned processes (#​784 <https://github.com/omni-us/jsonargparse/pull/784>__).v4.41.0Compare Source
Added
^^^^^
#​753 <https://github.com/omni-us/jsonargparse/pull/753>__).#​758 <https://github.com/omni-us/jsonargparse/pull/758>__).ActionFailfor arguments that should fail parsing with a given errormessage (
#​759 <https://github.com/omni-us/jsonargparse/pull/759>__).omegaconf+parser mode that supports variable interpolationand resolving across configs and command line arguments. Depending on
community feedback, in v5.0.0 this new mode could replace the current
omegaconfmode, introducing a breaking change (#​765 <https://github.com/omni-us/jsonargparse/pull/765>__).Fixed
^^^^^
KEYWORD_ONLYparameters now correctly use--flagstyle (#​756 <https://github.com/omni-us/jsonargparse/pull/756>__).#​760 <https://github.com/omni-us/jsonargparse/pull/760>__).default_envis true (#​763 <https://github.com/omni-us/jsonargparse/pull/763>__).parse_objectnot parsing correctly configs (#​765 <https://github.com/omni-us/jsonargparse/pull/765>__).Changed
^^^^^^^
#​752 <https://github.com/omni-us/jsonargparse/pull/752>__).YAMLcomments feature is now implemented in a separate class to allowbetter support for custom help formatters without breaking the comments (
#​754 <https://github.com/omni-us/jsonargparse/pull/754>__).ruyamlwithruamel.yaml(
#​768 <https://github.com/omni-us/jsonargparse/pull/768>__).Deprecated
^^^^^^^^^^
DefaultHelpFormatter.*_yaml*_comment*methods are deprecated and will beremoved in v5.0.0. This logic has been moved to a new private class
YAMLCommentFormatter. If deemed necessary, this class might be made publicin the future (
#​754 <https://github.com/omni-us/jsonargparse/pull/754>__).ruyamloptional dependency is deprecated and will be removed inv5.0.0. Instead use the
ruameloptional dependency (#​768 <https://github.com/omni-us/jsonargparse/pull/768>__).v4.40.2Compare Source
Fixed
^^^^^
#​743 <https://github.com/omni-us/jsonargparse/pull/743>__).#​746 <https://github.com/omni-us/jsonargparse/pull/746>__).#​749 <https://github.com/omni-us/jsonargparse/pull/749>__).without-future-annotationstest not included in local coverage (#​751 <https://github.com/omni-us/jsonargparse/pull/751>__).v4.40.1Compare Source
Fixed
^^^^^
print_shtabincorrectly parsed from environment variable (#​726 <https://github.com/omni-us/jsonargparse/pull/726>__).adapt_class_typeused a locally definedpartial_instancewrapperfunction that is not pickleable (
#​728 <https://github.com/omni-us/jsonargparse/pull/728>__).#​736 <https://github.com/omni-us/jsonargparse/pull/736>__).typeshed-client(#​740 <https://github.com/omni-us/jsonargparse/pull/740>__).docstring-parserto avoid deprecation warnings(
#​741 <https://github.com/omni-us/jsonargparse/pull/741>__).v4.40.0Compare Source
Added
^^^^^
auto_parserfunction for convenience and more visibility of thecapture_parserfeature (#​721 <https://github.com/omni-us/jsonargparse/pull/721>__).Fixed
^^^^^
set_parsing_settings(validate_defaults=True)fails when the parser has aconfig action (
#​718 <https://github.com/omni-us/jsonargparse/pull/718>__).skip_link_targets=Trueandtarget being an entire required dataclass (
#​717 <https://github.com/omni-us/jsonargparse/pull/717>__).TypedDictvalues not validated when types are forward references (#​722 <https://github.com/omni-us/jsonargparse/pull/722>__).inspect.signatureavailableleading to missing parameter defaults (
#​724 <https://github.com/omni-us/jsonargparse/pull/724>__).Changed
^^^^^^^
(
#​682 <https://github.com/omni-us/jsonargparse/pull/682>__).Deprecated
^^^^^^^^^^
LoggerPropertyis deprecated and will be removed in v5.0.0. There is noreplacement since jsonargparse is not a logging library. A similar class can
be found in
reconplogger(#​719 <https://github.com/omni-us/jsonargparse/pull/719>__).namespace_to_dictis deprecated and will be removed in v5.0.0. Instead use.clone().as_dict()or.as_dict()(#​720 <https://github.com/omni-us/jsonargparse/pull/720>__).v4.39.0Compare Source
Added
^^^^^
shtabhint for positionals in bash now includes the argument name (#​699 <https://github.com/omni-us/jsonargparse/pull/699>__).shtabsupport for optionals parsed as positionals (#​700 <https://github.com/omni-us/jsonargparse/pull/700>__).auto_clinow supports class@property(#​701 <https://github.com/omni-us/jsonargparse/pull/701>__).inspect.signaturefails(
#​698 <https://github.com/omni-us/jsonargparse/pull/698>__).#​711 <https://github.com/omni-us/jsonargparse/pull/711>__).instantiation links (
#​716 <https://github.com/omni-us/jsonargparse/pull/716>__).Changed
^^^^^^^
Nonedefault no longer skipped whenfail_untyped=True(#​697 <https://github.com/omni-us/jsonargparse/pull/697>__).config_read_modeanddocstring_parseoptions can now be set usingset_parsing_settings(#​712 <https://github.com/omni-us/jsonargparse/pull/712>__).Fixed
^^^^^
ActionParsernot updatingdestof groups for instantiation (#​707 <https://github.com/omni-us/jsonargparse/pull/707>__).#​709 <https://github.com/omni-us/jsonargparse/pull/709>__).#​710 <https://github.com/omni-us/jsonargparse/pull/710>__).Deprecated
^^^^^^^^^^
get_config_read_mode,set_config_read_modeandset_docstring_parse_optionsare deprecated and will be removed in v5.0.0.Instead of
set_config_read_modeandset_docstring_parse_optionsuseset_parsing_settings. There will be no replacement forget_config_read_modesince this is considered internal (#​712 <https://github.com/omni-us/jsonargparse/pull/712>__).v4.38.0Compare Source
Added
^^^^^
shtabcompletion ofLiteraltypes (#​693 <https://github.com/omni-us/jsonargparse/pull/693>__).#​692 <https://github.com/omni-us/jsonargparse/pull/692>__).Changed
^^^^^^^
validatenow checks values before required so that errors related to wronglevel in a config are easier to understand (
#​681 <https://github.com/omni-us/jsonargparse/pull/681>__).add_argumentof a positional and providingdefaultnow raises an error(
#​694 <https://github.com/omni-us/jsonargparse/pull/694>__).Fixed
^^^^^
add_class_argumentswith dashes in thenested_keyfail to instantiate(
#​679 <https://github.com/omni-us/jsonargparse/pull/679>__).#​686 <https://github.com/omni-us/jsonargparse/pull/686>__).--print_shtab.add_argumentraises error when type is assigned withaction=None(
#​687 <https://github.com/omni-us/jsonargparse/pull/687>__).shtabfailing when parser has positional arguments (#​693 <https://github.com/omni-us/jsonargparse/pull/693>__).v4.37.0Compare Source
Added
^^^^^
ArgumentParserto customizeadd_argument(#​661 <https://github.com/omni-us/jsonargparse/pull/661>__).Fixed
^^^^^
#​662 <https://github.com/omni-us/jsonargparse/pull/662>__).#​667 <https://github.com/omni-us/jsonargparse/pull/667>__).#​668 <https://github.com/omni-us/jsonargparse/pull/668>__).TypeAliasreturn type to avoid mypyerrors (
#​671 <https://github.com/omni-us/jsonargparse/pull/671>__).#​673 <https://github.com/omni-us/jsonargparse/pull/673>,#​674 <https://github.com/omni-us/jsonargparse/pull/674>).CLIand inferring components from the localcontext (
#​676 <https://github.com/omni-us/jsonargparse/pull/676>__).v4.36.0Compare Source
Added
^^^^^
pyyaml, though only an internal refactor prior to eventualremoval of
pyyamlas a required dependency in v5.0.0 (#​652 <https://github.com/omni-us/jsonargparse/pull/652>__).tomlas config file format (#​660 <https://github.com/omni-us/jsonargparse/pull/660>__).Changed
^^^^^^^
jsonargparse.CLIrenamed tojsonargparse.auto_clito followPEP 8 <https://peps.python.org/pep-0008/#function-and-variable-names>__ functionsnaming convention (
#​640 <https://github.com/omni-us/jsonargparse/pull/640>__).ArgumentParser.check_configrenamed tovalidateandskip_checkparameter of
ArgumentParser.{dump, save, get_defaults}renamed toskip_validation(#​639 <https://github.com/omni-us/jsonargparse/pull/639>__).Namespaceis used as a type to make it clear about beingunsupported (
#​656 <https://github.com/omni-us/jsonargparse/pull/656>__).Fixed
^^^^^
Protocoltypes not working correctly (#​645 <https://github.com/omni-us/jsonargparse/pull/645>__).attrs.definedataclasses with nested dataclasses that are markedwith
attrs.field(such as for a default factory) are not parsed correctly(
#​643 <https://github.com/omni-us/jsonargparse/pull/643>__).init=Falsenot working correctly (#​650 <https://github.com/omni-us/jsonargparse/pull/650>__).Deprecated
^^^^^^^^^^
ArgumentParser.check_configandskip_checkparameter ofArgumentParser.{dump, save, get_defaults}are deprecated and will beremoved in v5.0.0, instead use
validateandskip_validation(#​639 <https://github.com/omni-us/jsonargparse/pull/639>__).v4.35.0Compare Source
Added
^^^^^
print configargument to reuse the name of the config argumentby using
%s(#​630 <https://github.com/omni-us/jsonargparse/pull/630>__).Changed
^^^^^^^
arguments no longer adds a config loader (
#​634 <https://github.com/omni-us/jsonargparse/pull/634>__).CLASS_PATH_OR_NAMEfor subclass help is now optional and if not giventhe help of the base class is printed (
#​628 <https://github.com/omni-us/jsonargparse/pull/628>__).Fixed
^^^^^
ArgumentParser._parse_known_argssince Python 3.12.8and 3.13.1 (
#​644 <https://github.com/omni-us/jsonargparse/pull/644>__).Deprecated
^^^^^^^^^^
add_dataclass_argumentsis deprecated and will be removed in v5.0.0.Instead use
add_class_arguments(#​634 <https://github.com/omni-us/jsonargparse/pull/634>__).config argument as
--print_%sinstead of being always--print_config(
#​630 <https://github.com/omni-us/jsonargparse/pull/630>__).v4.34.1Compare Source
Fixed
^^^^^
#​625 <https://github.com/omni-us/jsonargparse/pull/625>__).NotRequiredincorrectly havinginspect._emptyas default (#​625 <https://github.com/omni-us/jsonargparse/pull/625>__).#​637 <https://github.com/omni-us/jsonargparse/pull/637>__).#​638 <https://github.com/omni-us/jsonargparse/pull/638>__).v4.34.0Compare Source
Added
^^^^^
Unpack[TypedDict]annotations for**kwargs(
#​586 <https://github.com/omni-us/jsonargparse/pull/586>__).Fixed
^^^^^
#​592 <https://github.com/omni-us/jsonargparse/pull/592>__).TypedDictkeys are now correctly inferred when oneinherits one
TypedDictfrom another with different totality (#​597 <https://github.com/omni-us/jsonargparse/pull/597>__).#​603 <https://github.com/omni-us/jsonargparse/pull/603>__).#​608 <https://github.com/omni-us/jsonargparse/pull/608>__).(
#​611 <https://github.com/omni-us/jsonargparse/pull/611>__).(
#​599 <https://github.com/omni-us/jsonargparse/pull/599>__).Changed
^^^^^^^
a subclass spec with
class_path(#​603 <https://github.com/omni-us/jsonargparse/pull/603>__).v4.33.2Compare Source
Fixed
^^^^^
parse_argv_itemto address the behavior change inargparsesincePython 3.12.7 (
#​591 <https://github.com/omni-us/jsonargparse/pull/591>__).v4.33.1Compare Source
Fixed
^^^^^
jsonnet-sdistfor python 3.13 to be allowed to push package to pypi(
#​584 <https://github.com/omni-us/jsonargparse/pull/584>__).v4.32.1Compare Source
Fixed
^^^^^
dicttypes not correctly forwarding previous nested values when parsing(
#​559 <https://github.com/omni-us/jsonargparse/pull/559>__).Listtype incorrectly using defaults from previous item (#​560 <https://github.com/omni-us/jsonargparse/pull/560>__).--print_shtabnot adding file completer for_ActionConfigLoad(#​562 <https://github.com/omni-us/jsonargparse/pull/562>__).parser_modenot inherited by nested parsers (#​564 <https://github.com/omni-us/jsonargparse/pull/564>__).v4.32.0Compare Source
Added
^^^^^
MappingProxyTypeas a type and as default for mapping types(
#​540 <https://github.com/omni-us/jsonargparse/pull/540>__).OrderedDictas a type (#​545 <https://github.com/omni-us/jsonargparse/pull/545>__).get_loaderto 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
^^^^^
dumpfailing when a link target requires serialization andskip_link_targets=False(#​542 <https://github.com/omni-us/jsonargparse/pull/542>__).default_config_filesmaking parse fail for subcommands and nested subclasstypes (
lightning-forums#5963 <https://lightning.ai/forums/t/problem-lightningcli-with-default-config-files/5963>__).Fixes related to transformers
PreTrainedModel.from_pretrained(
lightning#19863 comment <https://github.com/Lightning-AI/pytorch-lightning/discussions/19863#discussioncomment-9821765>__):#​548 <https://github.com/omni-us/jsonargparse/pull/548>__).#​551 <https://github.com/omni-us/jsonargparse/pull/551>__).class_pathin some cases failswith unexpected
instantiateparameter error (#​551 <https://github.com/omni-us/jsonargparse/pull/551>__).config_file_nameparameter fortransformers model
from_pretrained(#​551 <https://github.com/omni-us/jsonargparse/pull/551>__).v4.31.0Compare Source
Added
^^^^^
CLI(#​531 <https://github.com/omni-us/jsonargparse/pull/531>__).Protocoltypes only accepting exact matching signature ofpublic methods (
#​526 <https://github.com/omni-us/jsonargparse/pull/526>__).Fixed
^^^^^
torchfunctions not working (#​535 <https://github.com/omni-us/jsonargparse/pull/535>__).--print_shtabcrashing on failure to get signature parameters from oneclass (
lightning#10858 comment <https://github.com/Lightning-AI/pytorch-lightning/discussions/10858#discussioncomment-9846252>__).Changed
^^^^^^^
--*.helpoutput shows options withoutinit_args(#​533 <https://github.com/omni-us/jsonargparse/pull/533>__).v4.30.0Compare Source
Added
^^^^^
action="config"avoiding need to importaction class (
#​512 <https://github.com/omni-us/jsonargparse/pull/512>__).class_path(
lightning#13613 <https://github.com/Lightning-AI/pytorch-lightning/discussions/13613>__).--print_shtaboption whenshtabis installed, providingcompletions for many type hints without the need to modify code (
#​528 <https://github.com/omni-us/jsonargparse/pull/528>__).Fixed
^^^^^
subclass, PathLike and string (
#​516 <https://github.com/omni-us/jsonargparse/issues/516>__).--print_configfailing in some cases (#​517 <https://github.com/omni-us/jsonargparse/issues/517>__).(
#​523 <https://github.com/omni-us/jsonargparse/pull/523>__).#​527 <https://github.com/omni-us/jsonargparse/pull/527>__).add_subclass_argumentsinpython>=3.11(#​522 <https://github.com/omni-us/jsonargparse/pull/522>__).__pydantic_private__error(
#​521 <https://github.com/omni-us/jsonargparse/issues/521>__).v4.29.0Compare Source
Added
^^^^^
TypedDict(#​457 <https://github.com/omni-us/jsonargparse/issues/457>__).or callable with class return now implicitly tries using the base class as
class_pathif not abstract (#​505 <https://github.com/omni-us/jsonargparse/pull/505>__).Fixed
^^^^^
Uniontypes (#​498 <https://github.com/omni-us/jsonargparse/pull/498>__).space (
#​499 <https://github.com/omni-us/jsonargparse/pull/499>__).format_usage()not working (#​501 <https://github.com/omni-us/jsonargparse/issues/501>__).(
#​504 <https://github.com/omni-us/jsonargparse/pull/504>__).subclass (
#​503 comment <https://github.com/omni-us/jsonargparse/issues/503#issuecomment-2119724341>__).parse (
#​507 <https://github.com/omni-us/jsonargparse/issues/507>__).Changed
^^^^^^^
messages for the cases of groups and subcommands (
#​506 <https://github.com/omni-us/jsonargparse/pull/506>__).v4.28.0Compare Source
Added
^^^^^
can ask to use standard input/output instead of file (
#​463 <https://github.com/omni-us/jsonargparse/issues/463>__).CLIto provide subcommands help when components given in a dict(
litgpt#996 comment <https://github.com/Lightning-AI/litgpt/issues/996#issuecomment-1996201548>__).TypeAliasTypesupport added (#​480 <https://github.com/omni-us/jsonargparse/issues/480>__).Fixed
^^^^^
argparse.ArgumentParser._parse_optionalaffecting python
>=3.11.9and>=3.12.3(#​484 <https://github.com/omni-us/jsonargparse/issues/484>__).lazy_instancenot working for callable classes (#​473 comment <https://github.com/omni-us/jsonargparse/issues/481#issuecomment-2030932435>__).Callabletype with class return and zero arguments not working(
lightning#19574 comment <https://github.com/lightning-AI/pytorch-lightning/issues/19574#issuecomment-2002932565>__).(
#​480 <https://github.com/omni-us/jsonargparse/issues/480>__).Fieldinitializersare not right (
#​480 <https://github.com/omni-us/jsonargparse/issues/480>__).Annotatedfields in dataclass-likes (eg FastAPI types) resolve incorrectly(
#​480 <https://github.com/omni-us/jsonargparse/issues/480>__).v4.27.7Compare Source
Fixed
^^^^^
14456c2 <https://github.com/omni-us/jsonargparse/commit/14456c21ff7a11ba420f010d2b21bcfdb14977a2>__that prevented
**kwargsparameter resolving when anOptional[Callable]type is used (
#​473 <https://github.com/omni-us/jsonargparse/issues/473>__).v4.27.6Compare Source
Fixed
^^^^^
class_from_functionfrom aclassmethodwithout parameter types (#​454 <https://github.com/omni-us/jsonargparse/issues/454>__).default_env=True(#​465 <https://github.com/omni-us/jsonargparse/issues/465>__).produces an invalid string default.
#​464 <https://github.com/omni-us/jsonargparse/issues/464>__).(
#​467 <https://github.com/omni-us/jsonargparse/issues/467>__).v4.27.5Compare Source
Fixed
^^^^^
#​446 <https://github.com/omni-us/jsonargparse/issues/446>__).lazy_instance.target of another link.
v4.27.4Compare Source
Fixed
^^^^^
argcompletenot working when type and choices given (#​442 <https://github.com/omni-us/jsonargparse/issues/442>__).CLIis used with a class that defines asubcommandmethod (#​430 comment <https://github.com/omni-us/jsonargparse/issues/430#issuecomment-1903974112>__).CLIcrashes when a method has aconfigparameter. Due to redundancy,--configargument should not be added.v4.27.3Compare Source
Fixed
^^^^^
init_argsin an optional list (#​433 <https://github.com/omni-us/jsonargparse/issues/433>__).instantiation and serialization (
lightning#19289 comment <https://github.com/Lightning-AI/pytorch-lightning/pull/19289#issuecomment-1902618722>__).v4.27.2Compare Source
Fixed
^^^^^
invalid (
lightning#19289 comment <https://github.com/Lightning-AI/pytorch-lightning/pull/19289#issuecomment-1894063743>__).v4.27.1Compare Source
Fixed
^^^^^
existing arguments.
sub_configs=Truenot working for callable types that return a class (#​419 <https://github.com/omni-us/jsonargparse/issues/419>__).v4.27.0Compare Source
Added
^^^^^
SecretStrtype.SecretStrtype injsonargparse.typingto provide secret supportwithout additional dependency.
Fixed
^^^^^
v4.26.2Compare Source
Fixed
^^^^^
target.
choicesworking incorrectly whennargsis+,*or number.#​297 <https://github.com/omni-us/jsonargparse/issues/297>__).v4.26.1Compare Source
Fixed
^^^^^
dict_keysobject and value non-hashable.v4.26.0Compare Source
Added
^^^^^
#​394 <https://github.com/omni-us/jsonargparse/issues/394>,lightning#18161 <https://github.com/Lightning-AI/lightning/issues/18161>).Fixed
^^^^^
(
#​160 <https://github.com/omni-us/jsonargparse/issues/160>__).#​404 <https://github.com/omni-us/jsonargparse/issues/404>__).Changed
^^^^^^^
(
lightning#18731 <https://github.com/Lightning-AI/lightning/issues/18731>__).JSONARGPARSE_DEBUGmust now have a non-empty value to enable debug mode.v4.25.0Compare Source
Added
^^^^^
#​366 <https://github.com/omni-us/jsonargparse/issues/366>__).extend_base_typefor easy creation and registering of customtypes that extend a base type (
#​195 <https://github.com/omni-us/jsonargparse/issue/195>__).Annotatedtypes either ignoring the metadata or using it forvalidation in case of
pydantic types <https://docs.pydantic.dev/latest/api/types/>__ (#​384 <https://github.com/omni-us/jsonargparse/issue/384>__).Fixed
^^^^^
--print_configfails when parser has shallow links.--print_configused and parserhas subcommands (
#​311 <https://github.com/omni-us/jsonargparse/issue/311>__).Callablewith multiple input arguments(
#​372 <https://github.com/omni-us/jsonargparse/issues/372>__).None(
lightning#18616 <https://github.com/Lightning-AI/lightning/issues/18616>__).pydantic>=2.0.0(#​361 <https://github.com/omni-us/jsonargparse/issue/361>__).Changed
^^^^^^^
and provide a subcommand when a subcommand is required but not
given (
#​371 <https://github.com/omni-us/jsonargparse/pull/371>__).compute_fnfails, the error message will saythis (
#​311 <https://github.com/omni-us/jsonargparse/issue/311>__).add_subclass_argumentsnow shows a better error message when an emptytuple is given (
lightning#18546 <https://github.com/Lightning-AI/lightning/issues/18546>__).#​195 <https://github.com/omni-us/jsonargparse/issue/195>__).Union[type(default), Any].v4.24.1Compare Source
Fixed
^^^^^
linked_targetsparameter from API Reference (#​317 <https://github.com/omni-us/jsonargparse/issues/317>__).#​357 <https://github.com/omni-us/jsonargparse/issues/357>__).kwargs.pop()with conflicting defaults not setting theconditional default (
#​362 <https://github.com/omni-us/jsonargparse/issues/362>__).ActionJsonSchemanot setting correctly defaults when schema usesoneOf.print_configsteps not working whendefault_config_filesused due to the config file initially being empty (
#​367 <https://github.com/omni-us/jsonargparse/issues/367>__).v4.24.0Compare Source
Added
^^^^^
dumpfor including link targets.decimal.Decimalas a type.CLInow accepts components as a dict, such that the keys define names ofthe subcommands (
#​334 <https://github.com/omni-us/jsonargparse/issues/334>__).TYPE_CHECKINGblocks (#​337 comment <https://github.com/omni-us/jsonargparse/issues/337#issuecomment-1665055459>__).ext_varsfor anActionJsonnetargument can now have a default.ArgumentParser.add_instantiatorthat enables developers toimplement custom instantiation (
#​170 <https://github.com/omni-us/jsonargparse/issues/170>__).Deprecated
^^^^^^^^^^
ActionJsonnetExtVarsis deprecated and will be removed in v5.0.0. Insteaduse
type=dict.v4.23.1Compare Source
Fixed
^^^^^
savefails when a link target is a required parameter nested in a subclass(
#​332 <https://github.com/omni-us/jsonargparse/issues/332>__).typing.Literaltypes skipped when typing_extensions is installed(
lightning#18184 <https://github.com/Lightning-AI/lightning/pull/18184>__).class_from_functionfailing when called on the same function multipletimes (
lightning#18180 <https://github.com/Lightning-AI/lightning/issues/18180>__).pson windows.v4.23.0Compare Source
Added
^^^^^
class_from_functionnow have a valid import path(
#​309 <https://github.com/omni-us/jsonargparse/issues/309>__).Fixed
^^^^^
env_prefixis derived froma
progcontaining dashes.jsonargparse.typing.ARG:and missingENV:in help whendefault_env=True.typing.Literaltypes skipped on python 3.9 when typing_extensions isinstalled (
lightning#18125 comment <https://github.com/Lightning-AI/lightning/pull/18125#issuecomment-1644797707>__).Changed
^^^^^^^
including the name, and if available aliases and help.
default_env=Trueinclude subcommand environment variable name.v4.22.1Compare Source
Fixed
^^^^^
argument (
#​312 <https://github.com/omni-us/jsonargparse/issues/312>__).class_from_functionnot failing when return annotation is missing.add_subclass_argumentswith single base class and no docstring,incorrectly shown as tuple in help.
incorrectly shown in help.
lacking type and help.
v4.22.0Compare Source
Added
^^^^^
os.PathLiketype.class_from_functionnow supportsfunc_returnparameter to specify thereturn type of the function (
lightning-flash#1564 comment <https://github.com/Lightning-Universe/lightning-flash/pull/1564#discussion_r1218147330>__).563 <https://peps.python.org/pep-0563/>__from __future__ import annotations(
#​120 <https://github.com/omni-us/jsonargparse/issues/120>__).585 <https://peps.python.org/pep-0585/>__ and604 <https://peps.python.org/pep-0604/>__ for postponed evaluation of annotations(
#​120 <https://github.com/omni-us/jsonargparse/issues/120>__).rangeas a type.Fixed
^^^^^
attrsfields with factory default causes parse to fail (#​299 <https://github.com/omni-us/jsonargparse/issues/299>__).#​304 <https://github.com/omni-us/jsonargparse/issues/304>__).Changed
^^^^^^^
_prefix to module names to be explicit about non-public API.Deprecated
^^^^^^^^^^
_prefix) nowgives a
DeprecationWarning. From v5.0.0 these imports will fail.v4.21.2Compare Source
Fixed
^^^^^
#​289 <https://github.com/omni-us/jsonargparse/issues/289>__).fails.
v4.21.1Compare Source
Fixed
^^^^^
using the curly braces syntax.
#​275 <https://github.com/omni-us/jsonargparse/issues/275>__).v4.21.0Compare Source
Added
^^^^^
#​243 <https://github.com/omni-us/jsonargparse/issues/243>__).models <https://docs.pydantic.dev/usage/models/>__ andattrs
define <https://www.attrs.org/en/stable/examples.html>__ similar todataclasses.
pydantic types <https://docs.pydantic.dev/usage/types/#pydantic-types>__.585 <https://peps.python.org/pep-0585/>__ and604 <https://peps.python.org/pep-0604/>__ syntax.Fixed
^^^^^
strparameter in subclass incorrectly parsed as dict with implicitnullvalue (
#​262 <https://github.com/omni-us/jsonargparse/issues/262>__).lightning#17254 <https://github.com/Lightning-AI/lightning/issues/17254>__).dataclassfrom pydantic not working (#​100 comment <https://github.com/omni-us/jsonargparse/issues/100#issuecomment-1408413796>__).add_dataclass_argumentsnot forwardingsub_configsparameter.lightning#17263 <https://github.com/Lightning-AI/lightning/issues/17263>__).Changed
^^^^^^^
setup.cfgtopyproject.tomlfor configuration.build_sphinxfromsetup.pyand documented how to build.(
lightning#17247 <https://github.com/Lightning-AI/lightning/issues/17247>__).signaturesextras now installs thetyping-extensionspackage onpython<=3.9.
CLInow when given a class without methods, the class instance isreturned.
Deprecated
^^^^^^^^^^
v4.20.1Compare Source
Fixed
^^^^^
(
lightning#15340 comment <https://github.com/Lightning-AI/lightning/issues/15340#issuecomment-1439203008>__).discard_init_args_on_class_path_changeto handle more nestedcontexts (
#​247 <https://github.com/omni-us/jsonargparse/issues/247>__).init=False(#​252 <https://github.com/omni-us/jsonargparse/issues/252>__)..init_args.is included in argument (#​251 <https://github.com/omni-us/jsonargparse/issues/251>__).v4.20.0Compare Source
Added
^^^^^
CLIsupport for callable class instances (#​238 <https://github.com/omni-us/jsonargparse/issues/238>__).add_dataclass_argumentsnow supports thefail_untypedparameter (#​241 <https://github.com/omni-us/jsonargparse/issues/241>__).Fixed
^^^^^
add_subcommandsfails when parser has required argument and default configavailable (
#​232 <https://github.com/omni-us/jsonargparse/issues/232>__).Changed
^^^^^^^
argparse.ArgumentErroris raised instead ofParserError.fail_untyped=True(#​137 <https://github.com/omni-us/jsonargparse/issues/137>__).CLIno longer uses the module's docstring as main parser description (#​245 <https://github.com/omni-us/jsonargparse/issues/245>__).Deprecated
^^^^^^^^^^
skip_checkparameter is deprecated and will be removed in v5.0.0.Instead use as type
stroros.PathLike.without a setter and two renamed:
rel_path -> relativeandabs_path -> absolute.ActionPathListis deprecated and will be removed in v5.0.0. Instead use astype
List[<path_type>]withenable_path=True.ArgumentParser.error_handleris deprecated and will be removed in v5.0.0.Instead use the new exit_on_error parameter from argparse.
v4.19.0Compare Source
Added
^^^^^
CLInow supports thefail_untypedandparser_classparameters.bytesandbytearrayregistered on first use and decodes from standardBase64.
random.randint.a previous parse link and vice versa (
#​208 <https://github.com/omni-us/jsonargparse/issues/208>__).*.pyi.openandrelative_path_context.os.PathLikeprotocol.ccto not require the parent directory to exists but that itcan be created.
#​171 <https://github.com/omni-us/jsonargparse/issues/171>__).Fixed
^^^^^
PyLaia#48 <https://github.com/jpuigcerver/PyLaia/issues/48>__).init_argsafterclass_pathchange causes error (#​205 <https://github.com/omni-us/jsonargparse/issues/205>__).fail_untyped=Falsenot propagated to subclass--*.helpactions.Pathis cast tostrandrel_pathwas changed.#​208 <https://github.com/omni-us/jsonargparse/issues/208>__).Changed
^^^^^^^
target key does not have
init_args(lightning#16032 <https://github.com/Lightning-AI/lightning/issues/16032>__).signaturesextras now installs thetypeshed-clientpackage.validatorspackage is no longer a dependency.str.init_argswarning changed to log at debug level.v4.18.0Compare Source
Added
^^^^^
class instance.
Fixed
^^^^^
boolvalues should not be accepted byintorfloattypes.parse_stringraisesAttributeErrorwhen given a simple string.return_parserdeprecation warning whenCLIhassubcommands.
#​196 <https://github.com/omni-us/jsonargparse/issues/196>__).default_config_filesset in a subcommandsubparser (
lightning#15256 <https://github.com/Lightning-AI/lightning/issues/15256>__).Callablewith class return type.init_argsnot discarded for nested subclasses provided through commandline (
lightning#15796 <https://github.com/Lightning-AI/lightning/issues/15796>__).Namespacewhen key is the same as a methodname.
Changed
^^^^^^^
CLIno longer adds--configand--print_configif no argumentsadded to subcommand.
CLInow uses the component's docstring short description for subparserdescriptions.
redundancy for
Uniontypes.v4.17.0Compare Source
Added
^^^^^
(
#​187 <https://github.com/omni-us/jsonargparse/issues/187>__).**kwargsuse in multiple calls (#​187 comment <https://github.com/omni-us/jsonargparse/issues/187#issuecomment-1295141338>__).Fixed
^^^^^
strtype fails to parse value when pyyaml raisesConstructorError(
#​189 <https://github.com/omni-us/jsonargparse/issues/189>__).Namespaceclone should not deepcopy leaf values (#​187 <https://github.com/omni-us/jsonargparse/issues/187>__)._ActionHelpClassPathactions fail to instantiate when base class uses newunion type syntax.
Changed
^^^^^^^
--print_config.pathlib.Pathtypes so that they are not shown as subclasstypes.
v4.16.0Compare Source
Added
^^^^^
Anynow parses and instantiates classes when given dict that followssubclass specification (
lightning#15115 <https://github.com/Lightning-AI/lightning/issues/15115>__).produces a callable that returns an instance of the class.
Fixed
^^^^^
#​178 <https://github.com/omni-us/jsonargparse/issues/178>__).#​183 <https://github.com/omni-us/jsonargparse/issues/183>__).Changed
^^^^^^^
set_defaultson a config argument raises error and suggests to usedefault_config_files(lightning#15174 <https://github.com/Lightning-AI/lightning/issues/15174>__).(
#​169 <https://github.com/omni-us/jsonargparse/issues/169>__).v4.15.2Compare Source
Fixed
^^^^^
6e7ae6d <https://github.com/omni-us/jsonargparse/commit/6e7ae6dca41d2bdf081731c042bba9d08b6f228f>__that produced cryptic error message when an invalid argument given (
#​172 <https://github.com/omni-us/jsonargparse/issues/172>__).default_envnot forwarded to subcommand parsers, causing environmentvariable names to not be shown in subcommand help (
lightning#12790 <https://github.com/Lightning-AI/lightning/issues/12790>__).init_argswithout passing theclass_path(
#​174 <https://github.com/omni-us/jsonargparse/issues/174>__).Unionnot being considered.strtype fails to parse values of the form^\w+: *.parse_objectdoes not consider given namespace for previousclass_pathvalues.
v4.15.1Compare Source
Fixed
^^^^^
compute_fnof an argument link applied on parse not given subclass defaultinit_argswhen loading from config.--*.helpoption not available when type is aUnionmixed withnot subclass types.
dict_kwargsitems from command line not working.init_argsgiven through command line not beingconsidered (
lightning#15007 <https://github.com/Lightning-AI/lightning/pull/15007>__).Uniontypes required all subtypes to be supported when expected to be atleast one subtype supported (
#​168 <https://github.com/omni-us/jsonargparse/issues/168>__).v4.15.0[Compare Source](https://redirect.github.c
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.