fix(deps): update dependency cyclopts to v4#204
Closed
dreadnode-renovate-bot[bot] wants to merge 1 commit into
Closed
fix(deps): update dependency cyclopts to v4#204dreadnode-renovate-bot[bot] wants to merge 1 commit into
dreadnode-renovate-bot[bot] wants to merge 1 commit into
Conversation
| datasource | package | from | to | | ---------- | -------- | ------ | ----- | | pypi | cyclopts | 3.24.0 | 4.0.0 |
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.22.2,<4.0.0->>=4.0.0,<4.1.0Release Notes
BrianPugh/cyclopts (cyclopts)
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 changed. By default, these methods do not return and now perform asys.exit. This ensures that scripts and installed applications have consistent exit code behavior. Previously, a script might have had a different exit code compared to an equivalent installed package. This behavior can be controlled via the new attributeApp.result_action.To replicate the old behavior, set
result_action="return_value"in your root app.New App-inheritance mechanism/priorities. For most users this will have no impact, but pay attention if you use Meta Apps.
app.metainherits fromapp.Dropped Python 3.9 support. Python 3.9 EOL is October 31, 2025.
On the help page, the root application name falls back to the script name (instead of the registered
@app.defaultcommand name).If a dataclass-like parameter is annotated with
Parameter(name="*"), and all of its attributes are optional, but the parameter itself is not optional, aValueErrorwill now be raised. The value in the function signature must have a default value likeNone. See discussion in #519.InvalidCommandErrorhas been renamedUnknownCommandErrorfor consistency.Errors are now printed to stderr instead of stdout. Uses the new
App.error_console.If you want the old behavior (printing errors to stdout), set
error_consoleto a console writing to stdout:All
Parameterarguments exceptname(the only positional parameter) are now keyword-only.If only nameless
Groups are assigned to aParameter, the default Argument/Parameter group is still also applied. This is most convenient when applying a validator without impacting the help page.Features
Pure "value added" features.
Lazy loading - Commands can now be registered using import paths (e.g.,
"myapp.commands.users:create"), which defers module imports until the command is executed. This dramatically improves CLI startup time for applications with many commands or heavy dependencies.Shell Completion (supports bash, zsh, fish). Enable with
app.register_install_completion_command(), then users can install viamyapp --install-completion.cyclopts runCLI command.Help page customization via
help_formatterparameter onAppandGroup.HelpFormatterprotocol.DefaultFormatter(Rich-based with colors/borders) andPlainFormatter(accessibility-focused plain text).New
cycloptsCLI tool.cyclopts run- Execute a python script with dynamic shell-completion.cyclopts generate-docs- Generates documentation in a variety of formats (markdown, restructuredtext, html).cyclopts generate-docs myscript.py -o docs.mdSphinx Extension for automatically generating CLI documentation from your Cyclopts App.
.. cyclopts:: mypackage.cli:appdirective in your RST files.New
Appattributes; many of these were available asApp.__call__parameters, but now they can also be directly set onAppand are inherited as expected:print_error- Whether Cyclopts should print the rich-formatted error when aCycloptsErroris encountered. True by default.exit_on_error- If there is an error parsing/coercing the CLI tokens, invokesys.exit(1). True by default.help_on_error- If there is an error parsing/coercing the CLI tokens, print out the help-page for the parsed application. False by default.verbose- PopulateCycloptsErrorexception strings with more information intended for developers. False by default.flatten subapp's subcommands if named
"*". by @BrianPugh in #611Add support for
enum.Flagandenum.IntFlag.Add support for
datetime.datetype by @PerchunPak in #601Add
cyclopts.config.Dictconfig class for in-memory configuration sources. Add new keyword argumentsourceto config objects. by @BrianPugh in #599App.consolenow always resolves to aconsoleand respects the app-hierarchy. If a console is explicitly assigned, that console will always be used. This makes it easier to access aconsoleobject within commands.Improved parsing of JSON strings from the CLI. Can now handle
list[CustomClass]if each element is supplied as a JSON string.Optimized "happy execution path" performance.
If
App.sort_keyorGroup.sort_keyare generators, Cyclopts automatically invokesnexton them immediately.This allows for streamlined lexical ordering of commands using
itertools.count:Bug Fixes
list[int]) whenconsume_multiple=True.help_flagsafterend_of_options_delimiterby @BrianPugh in #609Internal / Developer
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 this update again.
This PR has been generated by Renovate Bot.