forked from homedepot/flow
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEUTRAL] Update dependency argh to v0.31.3 #7
Open
mend-for-github.aaakk.us.kg
wants to merge
1
commit into
master
Choose a base branch
from
whitesource-remediate/argh-0.x
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
September 4, 2023 07:24
12e1864
to
a18391b
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.28.1
Update dependency argh to v0.29.3
Sep 4, 2023
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
September 24, 2023 05:18
a18391b
to
707f40a
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.29.3
Update dependency argh to v0.29.4
Sep 24, 2023
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.29.4
Update dependency argh to v0.30.0
Oct 22, 2023
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
October 22, 2023 05:18
707f40a
to
867cd45
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.30.0
Update dependency argh to v0.30.1
Oct 24, 2023
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
2 times, most recently
from
October 25, 2023 05:20
d093660
to
18ccc1f
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.30.1
Update dependency argh to v0.30.2
Oct 25, 2023
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
October 31, 2023 05:54
18ccc1f
to
01fdf77
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.30.2
Update dependency argh to v0.30.3
Oct 31, 2023
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
November 5, 2023 06:11
01fdf77
to
d1454bb
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.30.3
Update dependency argh to v0.30.4
Nov 5, 2023
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
December 26, 2023 05:28
d1454bb
to
46c30fa
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.30.4
Update dependency argh to v0.30.5
Dec 26, 2023
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
December 31, 2023 06:42
46c30fa
to
494f246
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.30.5
Update dependency argh to v0.31.0
Dec 31, 2023
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
January 20, 2024 07:13
494f246
to
4d8b5de
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.31.0
Update dependency argh to v0.31.1
Jan 20, 2024
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
January 25, 2024 07:26
4d8b5de
to
5dccf73
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.31.1
Update dependency argh to v0.31.2
Jan 25, 2024
mend-for-github.aaakk.us.kg
bot
changed the title
Update dependency argh to v0.31.2
[NEUTRAL] Update dependency argh to v0.31.2
Jan 26, 2024
mend-for-github.aaakk.us.kg
bot
force-pushed
the
whitesource-remediate/argh-0.x
branch
from
July 14, 2024 06:14
5dccf73
to
cb13240
Compare
mend-for-github.aaakk.us.kg
bot
changed the title
[NEUTRAL] Update dependency argh to v0.31.2
[NEUTRAL] Update dependency argh to v0.31.3
Jul 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
None yet
0 participants
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:
==0.26.2
->==0.31.3
Release Notes
neithere/argh (argh)
v0.31.3
Compare Source
Bugs fixed:
errors
inwrap_errors
(PR #229 by @laazy)dest
via decorator(issue #224 by @mathieulongtin)
v0.31.2
Compare Source
Bugs fixed:
Optional[List]
(but notOptional[list]
), a narrowercase of the problem fixed earlier (issue #216).
v0.31.1
Compare Source
Bugs fixed:
List
(issue #216).Enhancements:
v0.31.0
Compare Source
Breaking changes:
The typing hints introspection feature is automatically enabled for any
command (function) which does not have any arguments specified via
@arg
decorator.
This means that, for example, the following function used to fail and now
it will pass::
This may lead to unexpected behaviour in some rare cases.
A small change in the legacy argument mapping policy
BY_NAME_IF_HAS_DEFAULT
concerning the order of variadic positional vs. keyword-only arguments.
The following function now results in
main alpha [args ...] beta
instead ofmain alpha beta [args ...]
::This does not concern the default name mapping policy. Even for the
legacy one it's an edge case which is extremely unlikely to appear in any
real-life application.
Removed the previously deprecated decorator
@expects_obj
.Enhancements:
Added experimental support for basic typing hints (issue #203)
The following hints are currently supported:
str
,int
,float
,bool
(goes totype
);list
(affectsnargs
),list[T]
(first subtype goes intotype
);Literal[T1, T2, ...]
(interpreted aschoices
);Optional[T]
AKAT | None
(currently interpreted asrequired=False
for optional andnargs="?"
for positionalarguments; likely to change in the future as use cases accumulate).
The exact interpretation of the type hints is subject to change in the
upcoming versions of Argh.
Added
always_flush
argument todispatch()
(issue #145)High-level functions
argh.dispatch_command()
andargh.dispatch_commands()
now accept a new parameter
old_name_mapping_policy
. The behaviour hasn'tchanged because the parameter is
True
by default. It will change toFalse
in Argh v.0.33 or v.1.0.Deprecated:
namespace
argument inargh.dispatch()
andargh.parse_and_resolve()
.Rationale: continued API cleanup. It's already possible to mutate the
namespace object between parsing and calling the endpoint; it's unlikely that
anyone would need to specify a custom namespace class or pre-populate it
before parsing. Please file an issue if you have a valid use case.
Other changes:
v0.30.5
Compare Source
Bugs fixed:
nargs
with a list as default value would lead to thevalues coming from CLI being wrapped in another list (issue #212).
Enhancements:
nargs
is not specified but the default valueis a list,
nargs="*"
is assumed and passed to argparse.v0.30.4
Compare Source
There were complaints about the lack of a deprecation cycle for the legacy name
mapping policy. This version addresses the issue:
The handling introduced in v.0.30.2 (raising an exception for clarity)
is retained for cases when no name mapping policy is specified but function
signature contains defaults in non-kwonly args and kwonly args are also
defined::
In a similar case but when kwonly args are not defined Argh now assumes
the legacy name mapping policy (
BY_NAME_IF_HAS_DEFAULT
) and merely issuesa deprecation warning with the same message as the exception mentioned above::
This ensures that most of the old scripts still work the same way despite the
new policy being used by default and enforced in cases when it's impossible
to resolve the mapping conflict.
Please note that this "soft" handling is to be removed in version v0.33
(or v1.0 if the former is not deemed necessary). The new name mapping policy
will be used by default without warnings, like in v0.30.
v0.30.3
Compare Source
Bugs fixed:
@arg
decoratorwould cause Argh fail on the assembling stage. (#208)
v0.30.2
Compare Source
Bugs fixed:
As reported in #204 and #206, the new default name mapping policy in fact
silently changed the CLI API of some scripts: arguments which were previously
translated as CLI options became optional positionals. Although the
instructions were supplied in the release notes, the upgrade may not
necessarily be intentional, so a waste of users' time is quite likely.
To alleviate this, the default value for
name_mapping_policy
in standardfunctions has been changed to
None
; if it's not specified, Argh falls backto the new default policy, but raises
ArgumentNameMappingError
withdetailed instructions if it sees a non-kwonly argument with a default value.
Please specify the policy explicitly in order to avoid this error if you need
to infer optional positionals (
nargs="?"
) from function signature.v0.30.1
Compare Source
Bugs fixed:
exception (#204)
Enhancements:
related to the migration from Argh v0.29 to a version with a new argument
name mapping policy.
Other changes:
py.typed
marker file for :pep:561
.v0.30.0
Compare Source
Backwards incompatible changes:
A new policy for mapping function arguments to CLI arguments is used by
default (see :class:
argh.assembling.NameMappingPolicy
).The following function does not map to
func foo [--bar]
anymore::Since this release it maps to
func foo [bar]
instead.Please update the function this way to keep
bar
an "option"::If you cannot modify the function signature to use kwonly args for options,
please consider explicitly specifying the legacy name mapping policy::
The name mapping policy
BY_NAME_IF_HAS_DEFAULT
slightly deviates from theold behaviour. Kwonly arguments without default values used to be marked as
required options (
--foo FOO
), now they are treated as positionals(
foo
). Please consider the new default policy (BY_NAME_IF_KWONLY
) fora better treatment of kwonly.
Removed previously deprecated features (#184 → #188):
argument help string in annotations — reserved for type hints;
argh.SUPPORTS_ALIASES
;argh.safe_input()
;previously renamed arguments for
add_commands()
:namespace
,namespace_kwargs
,title
,description
,help
;pre_call
argument indispatch()
. The basic usage remains simple butmore granular functions are now available for more control.
Instead of this::
argh.dispatch(..., pre_call=pre_call_hook)
please use this::
func, ns = argh.parse_and_resolve(...)
pre_call_hook(ns)
argh.run_endpoint_function(func, ns, ...)
Deprecated:
The
@expects_obj
decorator. Rationale: it used to support the old,"un-pythonic" style of usage, which essentially lies outside the scope of
Argh. If you are not using the mapping of function arguments onto CLI, then
you aren't reducing the amount of code compared to vanilla Argparse.
The
add_help_command
argument indispatch()
.Rationale: it doesn't add much to user experience; it's not much harder to
type
--help
than it is to typehelp
; moreover, the option can beadded anywhere, unlike its positional counterpart.
Enhancements:
Added support for Python 3.12.
Added type annotations to existing Argh code (#185 → #189).
The
dispatch()
function has been refactored, so in case you need finercontrol over the process, two new, more granular functions can be used:
endpoint_function, namespace = argh.parse_and_resolve(...)
argh.run_endpoint_function(endpoint_function, namespace, ...)
Please note that the names may change in the upcoming versions.
Configurable name mapping policy has been introduced for function argument
to CLI argument translation (#191 → #199):
BY_NAME_IF_KWONLY
(default and recommended).BY_NAME_IF_HAS_DEFAULT
(close to pre-v.0.30 behaviour);Please check API docs on :class:
argh.assembling.NameMappingPolicy
fordetails.
v0.29.4
Compare Source
Bugs fixed:
v0.29.3
Compare Source
Technical releases for packaging purposes. No changes in functionality.
v0.29.2
Compare Source
This is a technical release for packaging purposes.
v0.28.1
Compare Source
v0.28.0
Compare Source
A major cleanup.
Backward incompatible changes:
Deprecated features, to be removed in v.0.30:
argh.assembling.SUPPORTS_ALIASES
.True
for recent versions of Python.argh.io.safe_input()
AKAargh.interaction.safe_input()
.input()
instead.argument
pre_call
indispatch()
.Even though this hack seems to have been used in some projects, it was never
part of the official API and never recommended.
Describing your use case in the
discussion about shared arguments
_ canhelp improve the library to accomodate it in a proper way.
.. _discussion about shared arguments:https://github.com/neithere/argh/issues/633
Argument help as annotations.
Annotations will only be used for types after v.0.30.
Please replace any instance of::
def func(foo: "Foobar"):
with the following::
@arg('-f', '--foo', help="Foobar")
def func(foo):
It will be decided later how to keep this functionality "DRY" (don't repeat
yourself) without conflicts with modern conventions and tools.
Added deprecation warnings for some arguments deprecated back in v.0.26.
v0.27.2
Compare Source
Minor packaging fix:
v0.27.1
Compare Source
Minor building and packaging fixes:
v0.27.0
Compare Source
This is the last version to support Python 2.7.
Backward incompatible changes:
Enhancements:
@wraps
decorator(issue #111).
Fixed bugs:
**kwargs
and positionalswithout defaults and with underscores in their names, a weird behaviour could
be observed (issue #104).
unittest.mock
(PR #154).skip_unknown_args=True
(PR #134).Other changes:
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.