From: "Arthur Zamarin" <arthurzam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pkgcore/snakeoil:master commit in: src/snakeoil/cli/
Date: Mon, 8 Apr 2024 19:37:06 +0000 (UTC) [thread overview]
Message-ID: <1712604765.936902901eb8df408a2bc708b327cf7e1325da16.arthurzam@gentoo> (raw)
commit: 936902901eb8df408a2bc708b327cf7e1325da16
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 8 19:32:45 2024 +0000
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org>
CommitDate: Mon Apr 8 19:32:45 2024 +0000
URL: https://gitweb.gentoo.org/proj/pkgcore/snakeoil.git/commit/?id=93690290
arghparse: fix handling with python 3.11.9
In commit [0], the private function changes the tuple size it returns.
By using `*_` in the middle, we can support both extracted versions (3
and 4) of the function.
This investigation was done by ajak, thank you.
[0] https://github.com/python/cpython/commit/c02b7ae4dd367444aa6822d5fb73b61e8f5a4ff9
Resolves: https://github.com/pkgcore/pkgcheck/issues/676
Resolves: https://github.com/pkgcore/pkgdev/issues/184
Investigated-by: John Helmert III <ajak <AT> gentoo.org>
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org>
src/snakeoil/cli/arghparse.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/snakeoil/cli/arghparse.py b/src/snakeoil/cli/arghparse.py
index ab458c8f..80443b7a 100644
--- a/src/snakeoil/cli/arghparse.py
+++ b/src/snakeoil/cli/arghparse.py
@@ -774,7 +774,7 @@ class OptionalsParser(argparse.ArgumentParser):
def consume_optional(start_index):
# get the optional identified at this index
option_tuple = option_string_indices[start_index]
- action, option_string, explicit_arg = option_tuple
+ action, option_string, *_, explicit_arg = option_tuple
# identify additional optionals in the same arg string
# (e.g. -xyz is the same as -x -y -z if no args are required)
next reply other threads:[~2024-04-08 19:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-08 19:37 Arthur Zamarin [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-01-20 7:24 [gentoo-commits] proj/pkgcore/snakeoil:master commit in: src/snakeoil/cli/ Arthur Zamarin
2023-01-16 21:00 Arthur Zamarin
2022-12-31 7:36 Arthur Zamarin
2022-12-30 19:03 Arthur Zamarin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1712604765.936902901eb8df408a2bc708b327cf7e1325da16.arthurzam@gentoo \
--to=arthurzam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox