Miss Islington (bot)
e412cbba52
[3.8] bpo-39546: argparse: Honor allow_abbrev=False for specified prefix_chars (GH-18337) (GH-18543)
...
When `allow_abbrev` was first added, disabling the abbreviation of
long options broke the grouping of short flags ([bpo-26967](https://bugs.python.org/issue26967 )). As a fix,
b1e4d1b603 (contained in v3.8) ignores `allow_abbrev=False` for a
given argument string if the string does _not_ start with "--"
(i.e. it doesn't look like a long option).
This fix, however, doesn't take into account that long options can
start with alternative characters specified via `prefix_chars`,
introducing a regression: `allow_abbrev=False` has no effect on long
options that start with an alternative prefix character.
The most minimal fix would be to replace the "starts with --" check
with a "starts with two prefix_chars characters". But
`_get_option_tuples` already distinguishes between long and short
options, so let's instead piggyback off of that check by moving the
`allow_abbrev` condition into `_get_option_tuples`.
https://bugs.python.org/issue39546
(cherry picked from commit 8edfc47bae )
Co-authored-by: Kyle Meyer <kyle@kyleam.com >
https://bugs.python.org/issue39546
Automerge-Triggered-By: @encukou
2020-02-18 03:14:07 -08:00
..
2020-01-12 03:21:00 -08:00
2019-08-27 21:59:54 -07:00
2019-06-15 05:02:34 -07:00
2020-01-12 11:41:07 +00:00
2019-05-06 22:40:27 +03:00
2019-04-29 16:23:28 -07:00
2019-09-10 15:42:26 +01:00
2019-12-08 18:12:50 -08:00
2019-12-02 14:44:44 -08:00
2019-08-26 12:57:57 -07:00
2020-01-06 08:28:27 -05:00
2020-02-17 19:05:39 -08:00
2020-02-11 22:21:32 -05:00
2019-12-04 01:57:55 -08:00
2020-01-07 09:52:06 -08:00
2020-01-07 17:03:23 +00:00
2019-05-31 09:43:13 -07:00
2020-01-28 02:52:47 -08:00
2020-02-10 20:08:24 +01:00
2019-09-16 23:39:11 -07:00
2020-02-18 03:14:07 -08:00
2020-01-05 09:07:30 -08:00
2019-06-03 01:12:33 +02:00
2020-02-03 08:20:41 +00:00
2020-02-16 13:47:21 -08:00
2020-02-05 08:39:36 +00:00
2019-05-24 20:24:42 +03:00
2019-05-09 07:22:47 +02:00
2019-09-27 13:19:41 -07:00
2018-12-19 08:19:39 -08:00
2019-06-01 11:00:15 +03:00
2019-08-26 00:41:47 +10:00
2019-06-17 01:34:27 -07:00
2018-12-19 18:19:01 +01:00
2019-06-01 11:00:15 +03:00
2019-05-06 22:29:40 +03:00
2019-11-12 15:54:19 -08:00
2019-06-01 11:00:15 +03:00
2019-05-20 10:01:07 -07:00
2018-12-31 09:56:21 +02:00
2018-09-13 22:45:00 -07:00
2020-02-18 03:14:07 -08:00
2019-08-29 10:50:28 +03:00
2019-05-06 22:29:40 +03:00
2020-01-05 04:36:48 -08:00
2019-08-30 13:42:54 -07:00
2019-04-08 17:01:09 +09:00
2018-11-01 12:33:35 +02:00
2019-08-04 13:34:56 -07:00
2019-09-11 05:09:23 -07:00
2020-01-14 12:13:59 -08:00
2019-05-31 22:44:00 +03:00
2019-12-06 06:59:49 -08:00
2019-05-15 23:45:18 +02:00
2019-03-03 18:23:19 -08:00
2019-06-01 11:00:15 +03:00
2020-01-12 10:04:18 -08:00
2018-10-31 02:28:07 +02:00
2019-05-06 22:40:27 +03:00
2019-08-13 14:27:14 -07:00
2019-05-10 03:50:11 +02:00
2019-12-09 17:07:51 +01:00
2019-08-15 15:08:57 -04:00
2019-11-12 18:54:10 +02:00
2019-09-28 08:22:00 -07:00
2019-12-13 15:30:41 -08:00
2019-09-20 22:41:35 -07:00
2019-06-02 23:01:49 +02:00
2020-02-06 07:13:38 -08:00
2019-06-27 11:07:16 -07:00
2019-09-16 11:55:04 -07:00
2019-11-18 22:46:10 -08:00
2019-05-09 16:22:15 +02:00
2020-02-06 00:45:18 -08:00
2020-01-21 03:42:49 -08:00
2019-09-16 14:08:55 +02:00
2019-05-31 21:13:57 -07:00
2019-10-17 20:48:42 -07:00
2019-06-27 11:07:16 -07:00
2018-07-06 20:41:06 -07:00
2019-10-15 05:02:34 -07:00
2019-05-23 08:45:22 -07:00
2019-05-14 19:32:59 +09:00
2019-03-25 22:01:12 +00:00
2019-08-28 21:56:00 -07:00
2018-10-18 20:21:47 -04:00
2020-02-11 07:32:40 -08:00
2019-05-24 23:57:23 +02:00
2020-01-08 07:48:33 -08:00
2019-11-15 15:25:03 -08:00
2019-06-01 11:00:15 +03:00
2018-09-07 17:30:33 +02:00
2019-12-23 18:31:00 +00:00
2020-01-28 01:59:43 -08:00
2019-11-12 15:09:03 -08:00
2020-01-24 02:20:35 -08:00
2019-05-26 17:10:09 +02:00
2019-05-06 14:57:17 -04:00
2019-07-14 02:25:43 -07:00
2019-06-27 11:07:16 -07:00
2019-04-17 17:05:30 +02:00
2019-03-22 10:22:20 -07:00
2019-05-06 22:40:27 +03:00
2019-06-03 01:12:33 +02:00
2020-02-04 16:32:32 -08:00
2019-05-28 19:29:04 +03:00
2019-06-03 01:12:33 +02:00
2020-02-12 04:32:52 -08:00
2019-06-24 19:14:37 -07:00
2019-06-01 11:00:15 +03:00
2019-05-31 10:39:47 +03:00
2019-11-18 13:58:02 -08:00
2019-10-31 12:50:04 +00:00
2020-02-13 08:30:27 +00:00
2018-09-12 10:28:53 -07:00
2019-06-29 14:28:59 -07:00
2019-10-12 09:08:24 -07:00
2020-01-10 21:39:01 -08:00
2019-11-16 10:35:08 -08:00
2018-10-05 20:53:45 +03:00
2019-05-06 22:29:40 +03:00
2019-07-31 13:22:09 -07:00
2019-07-02 14:06:18 -07:00
2019-10-10 15:50:32 +02:00
2019-11-12 00:04:12 -08:00
2019-06-01 11:00:15 +03:00
2020-01-23 15:31:29 -08:00
2019-01-31 12:40:27 +01:00
2018-10-20 01:46:00 +01:00
2019-09-26 16:17:34 +02:00
2020-01-24 12:10:42 -08:00
2019-06-24 09:09:47 -07:00
2019-11-27 21:23:14 -08:00
2019-06-29 21:40:41 -07:00
2019-06-23 12:06:21 -07:00
2019-03-07 12:38:08 -08:00
2019-05-30 15:06:32 -07:00
2020-02-12 04:32:52 -08:00
2018-09-10 10:02:33 -07:00
2019-06-03 01:12:33 +02:00
2019-05-24 23:57:23 +02:00
2020-01-29 21:42:38 -08:00
2019-12-02 14:44:44 -08:00
2019-08-30 13:42:54 -07:00
2020-01-05 04:33:08 -08:00
2019-11-04 21:09:48 -08:00
2019-09-09 09:24:16 -07:00
2020-01-19 02:48:04 -08:00
2020-02-11 22:21:32 -05:00
2020-01-14 03:39:19 -08:00