Update dependency cyclopts to v4 - #13
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
>=3.24,<4→>=4.24,<5Release Notes
BrianPugh/cyclopts (cyclopts)
v4.24.0Compare Source
Features
Parameter.choicesby @BrianPugh in #921Configsources by @BrianPugh in #918"sys_exit_if_non_zero_else_return"result action and document result_action modes by @BrianPugh in #907Bug Fixes
validate_by_nameis set by @xyf5432 in #909Docs
New Contributors
Full Changelog: BrianPugh/cyclopts@v4.23.3...v4.24.0
v4.23.3Compare Source
Bug Fixes
New Contributors
Full Changelog: BrianPugh/cyclopts@v4.23.2...v4.23.3
v4.23.2Compare Source
What's Changed
copymethods by @Ichunjo in #899New Contributors
Full Changelog: BrianPugh/cyclopts@v4.23.1...v4.23.2
v4.23.1Compare Source
Bug Fixes
Number,Path, andSlicevalidators silently skippingset,frozenset, anddictelements by @BrianPugh in #891Full Changelog: BrianPugh/cyclopts@v4.23.0...v4.23.1
v4.23.0Compare Source
Performing this as a minor release as it may break setups who rely on strict snapshot testing.
Bug Fixes
Full Changelog: BrianPugh/cyclopts@v4.22.5...v4.23.0
v4.22.5Compare Source
Bug Fixes
Various fixes around abstract collection types:
TypeErrorwhen an abstract collection parameter is given no values by @BrianPugh in #881Collection,Container, andReversibletype hints by @BrianPugh in #882--empty-*flags for abstract collection hints by @BrianPugh in #883Full Changelog: BrianPugh/cyclopts@v4.22.4...v4.22.5
v4.22.4Compare Source
Bug Fixes
ConsumeMultipleErrornoun when the count is 1 by @BrianPugh in #879Full Changelog: BrianPugh/cyclopts@v4.22.3...v4.22.4
v4.22.3Compare Source
Bug Fixes
Enumtypes with__init__defined. by @BrianPugh in #877Full Changelog: BrianPugh/cyclopts@v4.22.2...v4.22.3
v4.22.2Compare Source
Bug Fixes
MissingArgumentErrorfor explicitly-supplied empty mappings by @BrianPugh in #871=valueonParameter.count=Trueflags instead of silently dropping it by @BrianPugh in #872Full Changelog: BrianPugh/cyclopts@v4.22.1...v4.22.2
v4.22.1Compare Source
Bug Fixes
Parameter(env_var=...)values viaenv_var_splitby @chuenchen309 in #866=valueby @chuenchen309 in #865Full Changelog: BrianPugh/cyclopts@v4.22.0...v4.22.1
v4.22.0Compare Source
Bug Fixes
search_parents=Falsestill walking parent directories by @chuenchen309 in #864timedeltastrings instead of silently ignoring garbage by @chuenchen309 in #863-0xFF,+0o17) by @chuenchen309 in #862Full Changelog: BrianPugh/cyclopts@v4.21.2...v4.22.0
v4.21.2Compare Source
Bug Fixes
--delimiter leaking into an "Unknown option" error by @chuenchen309 in #861New Contributors
Full Changelog: BrianPugh/cyclopts@v4.21.1...v4.21.2
v4.21.1Compare Source
Bug Fixes
New Contributors
Full Changelog: BrianPugh/cyclopts@v4.21.0...v4.21.1
v4.21.0Compare Source
Feature
Parameter.negative_aliasto append extra names to a flag's negative form (e.g. a short-d) without dropping the generated--no-*/--empty-*names. Mirrorsname/alias. By @BrianPugh in #859Bug Fixes
#857: a dataclass command with adefault_factoryfield could raise a spurious "Input should be a valid list" validation error simply becausepydanticwas imported anywhere in the program. Factory defaults are now invoked during introspection, so the produced value (rather than the<factory>sentinel) is used as the default and shown in help text — consistent across dataclass, attrs, and pydantic. By @BrianPugh in #858Full Changelog: BrianPugh/cyclopts@v4.20.0...v4.21.0
v4.20.0Compare Source
Features
cyclopts treecommand andApp.command_tree()by @BrianPugh in #845Bug Fixes
consume_multipleto nested structured-type fields by @BrianPugh in #846New Contributors
Full Changelog: BrianPugh/cyclopts@v4.19.0...v4.20.0
v4.19.0Compare Source
Features
Parameter.short_aliasto automatically generate short aliases for parameters. by @mgielda in #831ArgumentCollection.filter_by(missing=...)for required/conditionally-required fields. by @BrianPugh in #840New Contributors
Full Changelog: BrianPugh/cyclopts@v4.18.0...v4.19.0
v4.18.0Compare Source
Features
slicesupport by @BrianPugh in #835slicetype-hints are now properly handled.cyclopts.validators.Slicecyclopts.types.NonEmptySliceconvenience type.Bug Fixes
Parametermetadata in nested Annotated/Optional/NewType types by @BrianPugh in #838Full Changelog: BrianPugh/cyclopts@v4.17.0...v4.18.0
v4.17.0Compare Source
Features & Bug Fixes
Parameter.show_defaultto be a string to display. by @BrianPugh in #833Publishing
New Contributors
Full Changelog: BrianPugh/cyclopts@v4.16.1...v4.17.0
v4.16.1Compare Source
Bug Fixes
prog_namematches a builtin helper by @BrianPugh in #825Misc
New Contributors
Full Changelog: BrianPugh/cyclopts@v4.16.0...v4.16.1
v4.16.0Compare Source
Features
__cyclopts_returncode__method, which is honored by all built-inresult_actionhandlers. Customresult_actioncallables can opt in via the newcyclopts.resolve_returncodehelper. By @BrianPugh in #818**kwargsis annotated asUnpack[SomeTypedDict], the TypedDict's fields are promoted to top-level CLI options instead of the generic--[KEYWORD]catch-all. Per-fieldRequired/NotRequiredmarkers are respected independently of the parent kwargs argument. By @BrianPugh in #819CycloptsError.msgnow accepts arich.Textinstance. Cyclopts' error-message style palette is exposed ascyclopts.exceptions.STYLE_OFFENDING_VALUE,STYLE_NAME,STYLE_VALID_CHOICE,STYLE_SUGGESTION, andSTYLE_SOURCE. By @BrianPugh in #814Full Changelog: BrianPugh/cyclopts@v4.15.0...v4.16.0
v4.15.0Compare Source
Features
App.synonym, which declares alternate command name(s) that trigger a "Did you mean..." suggestion without registering the command under those names. Useful when a user types a semantically-equivalent word (e.g.removevsuninstall) that the built-in fuzzy matcher would miss because the words aren't spelled similarly. Accepts a singlestror an iterable of strings. Synonyms are not runnable and are hidden from--help.Did you mean "uninstall" or "purge"?).By @BrianPugh in #815
Full Changelog: BrianPugh/cyclopts@v4.14.1...v4.15.0
v4.14.1Compare Source
What's Changed
Full Changelog: BrianPugh/cyclopts@v4.14.0...v4.14.1
v4.14.0Compare Source
What's Changed
<2.0.0to<3.0.0by @germa89 in #810New Contributors
Full Changelog: BrianPugh/cyclopts@v4.13.0...v4.14.0
v4.13.0Compare Source
Features
CycloptsErrorprinting. by @BrianPugh in #808Full Changelog: BrianPugh/cyclopts@v4.12.0...v4.13.0
v4.12.0Compare Source
Features
Full Changelog: BrianPugh/cyclopts@v4.11.2...v4.12.0
v4.11.2Compare Source
Bug Fixes
_should_attempt_json_listfor detectinglist[str] | Noneand Annotated annotations by @BrianPugh in #800Full Changelog: BrianPugh/cyclopts@v4.11.1...v4.11.2
v4.11.1Compare Source
Bug Fixes
Full Changelog: BrianPugh/cyclopts@v4.11.0...v4.11.1
v4.11.0Compare Source
Features
usage_nameoverride for configuring docs creation by @BrianPugh in #791dict[str, dataclass-like]params by @wrongbad in #787Bug Fixes
Misc Internal
is_annotatedover get_origin by @BrianPugh in #792New Contributors
Full Changelog: BrianPugh/cyclopts@v4.10.2...v4.11.0
v4.10.2Compare Source
Features
NormFloat- A float in the range[0, 1]SignedNormFloat- A float in the range[-1, 1]PercentInt- An int in the range[0, 100]Bug Fixes
Full Changelog: BrianPugh/cyclopts@v4.10.1...v4.10.2
v4.10.1Compare Source
Bug Fixes
ValueErrorwhen parsing pre-release Pydantic versions by @BrianPugh in #775Full Changelog: BrianPugh/cyclopts@v4.10.0...v4.10.1
v4.10.0Compare Source
Features
New
App.error_formatterfield to control outCycloptsErrorare displayed. The formatter receives aCycloptsErrorand returns anyrich-printable object, replacing the defaultCycloptsPanel. Can be set at app creation or passed as a runtime override toparse_args/__call__/run_async. by @BrianPugh in #771By default (without
error_formatter), errors are displayed in a Rich panel:With a custom formatter, you can simplify or restyle the output:
Full Changelog: BrianPugh/cyclopts@v4.9.0...v4.10.0
v4.9.0Compare Source
Features
Parameter.consume_multiplenow acceptsintortuple[int, int]for min/max element bounds.intsets a minimum (e.g.consume_multiple=2requires at least 2 values).consume_multiple=(1, 3)requires 1–3 values).ConsumeMultipleError.By @BrianPugh in #764
New field
Parameter.allow_repeatingcontrols whether an option can be specified multiple times.FalseraisesRepeatArgumentErroron repeat (useful withconsume_multiple).Trueallows repeats for any type; scalars use last-wins semantics.None(default) preserves existing behavior: lists accumulate, scalars error.By @BrianPugh in #768
New field
App.help_prologuedisplays text before the "Usage" line in help output.Inherited by subcommands; override per-command or set to
""to disable.By @tahv in #769
Bug Fixes
a b --bar 8 dnow correctly errors instead of silently assigningdto the positional list. By @BrianPugh in #766Other
New Contributors
Full Changelog: BrianPugh/cyclopts@v4.8.0...v4.9.0
v4.8.0Compare Source
Features
Lazy Loading
--helpimprovements.Previously, running
--helpon a parent command would import and resolve all lazy child commands, negating much of the startup-time benefits. Now, parent--helpdisplays lazy commands without triggering any imports.To show descriptions for lazy commands in
--helpoutput, providehelp=at registration time:Other metadata (
group=,show=,sort_key=) can also be provided at registration time and will be used for help display without resolving the command.Lazy commands are now only resolved when:
--helpis requested (e.g.,myapp deploy --help)app["command_name"]Thanks to @zzstoatzz for the initial contribution in #757.
Full Changelog: BrianPugh/cyclopts@v4.7.0...v4.8.0
v4.7.0Compare Source
Features
Bug Fixes
list[ExistingFile]). by @BrianPugh in #760Full Changelog: BrianPugh/cyclopts@v4.6.0...v4.7.0
v4.6.0Compare Source
Features
Parameter.requires_equals. When enabled, values for keywords must be provided by an=. For example,--foo=bar.--foo barwould raise an error telling the user to use a=. Defaults toFalse(same behavior as before). by @BrianPugh in #751Full Changelog: BrianPugh/cyclopts@v4.5.4...v4.6.0
v4.5.4Compare Source
Bug Fixes
-nand-N), only-nwould be displayed on the help page. Does not impact actual value parsing. By @BrianPugh in #748Docs
Full Changelog: BrianPugh/cyclopts@v4.5.3...v4.5.4
v4.5.3Compare Source
Bug Fixes
Enumparam by @joelostblom in #745New Contributors
Full Changelog: BrianPugh/cyclopts@v4.5.2...v4.5.3
v4.5.2Compare Source
Bug Fixes
Full Changelog: BrianPugh/cyclopts@v4.5.1...v4.5.2
v4.5.1Compare Source
Bug Fixes
Parameterresolution when Optional by @BrianPugh in #741Full Changelog: BrianPugh/cyclopts@v4.5.0...v4.5.1
v4.5.0Compare Source
Features
cyclopts.types.StdioPath. This type subclassespathlib.Path. If the special string-is supplied, then the object will read/write to stdin/stdout. Only available on python >=3.12 by @BrianPugh in #737Full Changelog: BrianPugh/cyclopts@v4.4.6...v4.5.0
v4.4.6Compare Source
What's Changed
__cyclopts__(from using@Parameterdecorator on a class) after unwrappingAnnotatedby @BrianPugh in #736Full Changelog: BrianPugh/cyclopts@v4.4.5...v4.4.6
v4.4.5Compare Source
Bug Fixes
parse=Falseparameters for did-you-mean. by @BrianPugh in #733Full Changelog: BrianPugh/cyclopts@v4.4.4...v4.4.5
v4.4.4Compare Source
Bug Fixes
pydantic.BaseModelcontainers by @BrianPugh in #729Special Thanks to @AntoninRousset for very clear and organized bug reporting with minimal-working examples!
Full Changelog: BrianPugh/cyclopts@v4.4.3...v4.4.4
v4.4.3Compare Source
Bug Fixes
Place positive short flags after positive options, place negative short flags after negative options. By @BrianPugh in #721
Example python code:
Before:
After:
Full Changelog: BrianPugh/cyclopts@v4.4.2...v4.4.3
v4.4.2Compare Source
Bug Fixes
Full Changelog: BrianPugh/cyclopts@v4.4.1...v4.4.2
v4.4.1Compare Source
Bug Fixes
:in command names for shell completion by @BrianPugh in #716Full Changelog: BrianPugh/cyclopts@v4.4.0...v4.4.1
v4.4.0Compare Source
Features
Parameter.parsenow accepts regex strings to filter which parameters are parsed. (#705)Parameter(parse="^(?!_)")— ignore "private" parameters starting with_UI Improvements
greet (g, greet-alias)instead ofgreet g greet-aliasBug Fixes
Groupobjects. (#710)Full Changelog: BrianPugh/cyclopts@v4.3.0...v4.4.0
v4.3.0Compare Source
Features
Paramter.n_tokensto control number of tokens consumed/provided to custom converters. by @BrianPugh in #695@Parameter(...).Parameter.convertercan now be a string indicating a forward-reference to a classmethod in the class.Bug Fixes
collections.abc.Setby @BrianPugh in #703Full Changelog: BrianPugh/cyclopts@v4.2.5...v4.3.0
v4.2.5Compare Source
Bug Fixes
Full Changelog: BrianPugh/cyclopts@v4.2.4...v4.2.5
v4.2.4Compare Source
Features
ArgumentCollection.__contains__that allows for string-lookup of arguments. by @BrianPugh in #689Bug Fixes
Full Changelog: BrianPugh/cyclopts@v4.2.3...v4.2.4
v4.2.3Compare Source
Bug Fixes
datetimeconverter to usedatetime.fromisoformatby @BrianPugh in #6872025-11-11T13Z(no minute, second or fractional second).Full Changelog: BrianPugh/cyclopts@v4.2.2...v4.2.3
v4.2.2Compare Source
Bug Fixes
@app.meta.meta)App.result_actiontype hint. by @BrianPugh in #681Docs
Full Changelog: BrianPugh/cyclopts@v4.2.1...v4.2.2
v4.2.1Compare Source
Bug Fixes
TypeAliasType(python >=3.12). by @BrianPugh in #670Full Changelog: BrianPugh/cyclopts@v4.2.0...v4.2.1
v4.2.0Compare Source
Features
App.result_action(composable) by @BrianPugh in #663"call_if_callable"App.result_actionby @BrianPugh in #667dataclasses.field's new "doc" field by @BrianPugh in #664Bug Fixes
list[Path](and similar) shell completions by @BrianPugh in #661App.default_parameter) during completion generation. by @BrianPugh in #662Internal
Full Changelog: BrianPugh/cyclopts@v4.1.0...v4.2.0
v4.1.0Compare Source
Features
Support
pydanticSecret-types (SecretStr,SecretBytes, etc) by @BrianPugh in #620Parameter.countforintcounting-flags (e.g., verbosity-vvv). by @BrianPugh in #622Add
App.help_epilogue, which prints a message at the bottom of the app's help-page. by @BrianPugh in #628Add help from dataclass/attrs metadata to the resolution hierarchy. by @BrianPugh in #642
Add GNU-style combined short options support by @BrianPugh in #639
More powerful
ArgumentCollection.__getitem__to support looking up by parameter name by @isoschiz in #635Bug Fixes
App.versionvalue instead of root-app version value. by @BrianPugh in #632MutuallyExclusivegroup validator accurately report the user-specified option name instead of the first positive name. by @BrianPugh in #634MissingArgumentErroraccurately report the user-specified option name instead of the first positive name. by @BrianPugh in #638Optional[bool]in the help-page. by @BrianPugh in #633--helpand--versionare passed to a subcommand.--helptakes precedence. by @BrianPugh in #650cyclopts.__version__not being updated (due to uv migration). by @BrianPugh in #657parse=FalsetoApp.version_printhandlers. by @BrianPugh in #656Special thanks to @isoschiz for thorough testing and bug reporting!
Documentation
New Contributors
Full Changelog: BrianPugh/cyclopts@v4.0.0...v4.1.0
v4.0.0Compare Source
Cyclopts v4 represents a big feature update that makes it a no-compromise CLI python framework.
While Cyclopts v4 has a few breaking changes that generally make applications cleaner/terser/more intuitive, most shouldn't severely impact applications in the wild. This section lists the changes from most impactful to least.
Breaking Features / Breaking Changes / Migration
The default help/version formatting has been changed from RestructuredText to Markdown.
App(help_format="restructuredtext").Default behavior of
App.__call__andApp.run_asyncreturn value has changedConfiguration
📅 Schedule: (UTC)
🚦 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 this update again.
This PR was generated by Mend Renovate. View the repository job log.