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
..
2019-04-09 00:34:02 +02:00
2019-10-09 07:02:15 -07:00
2019-10-14 09:01:29 -07:00
2020-01-07 16:55:19 +02:00
2019-12-08 18:12:50 -08:00
2019-09-11 12:38:22 +01:00
2020-02-11 22:21:32 -05:00
2019-12-04 01:57:55 -08:00
2019-10-11 06:56:49 -07:00
2020-01-05 04:33:08 -08:00
2019-05-02 22:11:04 +02:00
2019-09-10 15:57:54 -07:00
2019-12-18 10:11:05 +01:00
2019-11-21 09:43:42 -08:00
2019-12-09 11:36:25 -08:00
2019-05-01 22:49:49 -04:00
2019-09-14 13:31:50 +03:00
2019-12-09 17:07:51 +01:00
2019-09-11 04:47:16 -07:00
2019-08-26 00:41:47 +10:00
2019-04-29 13:36:57 +01:00
2019-04-29 13:36:57 +01:00
2019-09-25 09:13:54 -07:00
2019-02-19 13:53:07 +02:00
2019-08-30 13:42:54 -07:00
2019-09-25 09:13:54 -07:00
2018-12-17 16:52:45 +02:00
2020-02-02 21:22:57 +01:00
2019-10-02 09:52:50 -07:00
2019-09-11 09:46:29 -07:00
2019-05-08 09:35:09 -07:00
2019-05-17 10:13:03 +03:00
2018-12-11 11:32:12 +00:00
2020-02-03 16:50:29 -08:00
2019-09-25 09:13:54 -07:00
2019-05-17 10:13:03 +03:00
2019-01-15 14:47:42 -08:00
2019-05-27 12:56:22 -07:00
2018-12-19 18:19:01 +01:00
2020-02-04 07:31:19 -08:00
2018-11-16 17:32:58 +02:00
2020-02-18 03:14:07 -08:00
2019-05-17 10:13:03 +03:00
2019-01-31 12:40:27 +01:00
2020-02-12 12:56:44 -08:00
2020-02-13 00:43:23 -08:00
2019-07-01 19:01:52 +02:00
2018-12-17 09:36:36 +01:00
2019-12-09 11:36:25 -08:00
2020-01-05 04:36:48 -08:00
2019-03-12 20:57:09 -07:00
2018-12-20 09:34:51 +02:00
2019-05-29 11:46:58 -07:00
2019-03-05 10:06:26 +02:00
2019-03-05 10:06:26 +02:00
2019-02-02 18:57:41 +01:00
2019-09-21 01:22:29 -07:00
2019-05-29 11:46:58 -07:00
2019-07-30 11:34:32 -07:00
2019-07-02 04:18:40 -07:00
2019-07-23 12:39:51 +02:00
2019-11-21 04:11:44 -08:00
2019-09-11 05:09:23 -07:00
2019-02-19 23:23:48 +10:00
2018-12-25 10:17:28 +02:00
2019-07-01 19:01:52 +02:00
2019-08-30 13:42:54 -07:00
2019-07-01 19:01:52 +02:00
2019-06-01 18:08:04 +01:00
2019-07-01 19:01:52 +02:00
2019-09-09 09:12:01 -07:00
2019-08-30 13:42:54 -07:00
2019-10-30 05:11:41 -07:00
2019-05-15 23:45:18 +02:00
2019-10-10 10:11:07 -07:00
2019-12-18 21:30:43 +01:00
2019-12-08 04:49:07 -08:00
2019-04-01 09:16:35 +03:00
2019-04-01 09:16:35 +03:00
2020-01-12 10:04:18 -08:00
2019-06-03 03:51:43 +02:00
2019-07-01 19:01:52 +02:00
2020-01-09 09:19:59 -08:00
2019-05-10 03:50:11 +02:00
2018-10-30 13:22:42 +02:00
2020-01-10 04:12:08 -08:00
2019-03-05 10:05:57 +02:00
2018-12-12 20:46:55 +08:00
2018-12-12 20:46:55 +08:00
2018-11-05 16:20:25 +02:00
2020-02-09 00:39:28 -08:00
2019-09-10 05:55:12 -07:00
2019-09-11 16:37:38 +02:00
2019-06-03 21:30:58 +09:00
2019-12-31 04:15:36 +00:00
2019-06-22 15:34:03 -07:00
2019-08-21 12:18:26 -07:00
2019-08-24 13:41:53 +03:00
2019-12-13 15:30:41 -08:00
2019-09-27 13:19:41 -07:00
2019-06-17 01:34:27 -07:00
2019-07-21 22:48:45 -04:00
2019-09-29 16:58:57 -07:00
2019-03-24 17:07:47 -07:00
2018-11-06 09:38:54 +09:00
2020-01-09 23:03:05 +05:30
2019-04-09 00:34:02 +02:00
2018-12-17 16:43:14 +02:00
2020-02-12 02:35:10 -08:00
2019-02-19 13:49:09 +02:00
2019-09-18 14:10:16 +02:00
2019-11-22 15:15:36 +01:00
2019-05-20 23:44:11 +03:00
2019-05-23 08:45:22 -07:00
2019-06-02 00:05:48 +03:00
2019-07-01 19:01:52 +02:00
2019-08-30 13:42:54 -07:00
2020-02-06 07:13:38 -08:00
2018-12-17 16:52:45 +02:00
2018-11-16 17:32:58 +02:00
2019-08-09 15:34:22 -07:00
2019-04-09 00:34:02 +02:00
2019-02-07 19:36:48 +00:00
2019-05-26 11:27:35 -07:00
2018-12-12 18:38:34 +01:00
2019-05-29 03:55:44 -04:00
2019-10-15 03:06:16 +02:00
2019-09-26 08:13:39 -07:00
2019-07-01 19:01:52 +02:00
2019-04-22 11:51:06 -07:00
2018-12-14 13:37:26 +01:00
2018-11-20 19:27:16 +02:00
2019-06-02 00:05:48 +03:00
2019-07-01 19:01:52 +02:00
2019-09-12 16:07:47 +01:00
2019-08-24 13:41:53 +03:00
2020-01-21 03:42:49 -08:00
2019-09-30 09:10:38 +02:00
2020-01-23 07:22:25 -08:00
2019-12-05 08:51:30 -08:00
2019-11-22 06:42:06 -08:00
2019-09-28 07:23:34 -07:00
2019-06-29 14:28:59 -07:00
2019-09-25 08:50:31 -07:00
2019-02-04 16:56:26 -08:00
2019-06-02 00:05:48 +03:00
2019-10-15 05:02:34 -07:00
2019-06-02 00:05:48 +03:00
2020-02-04 13:41:55 -08:00
2019-03-05 10:06:26 +02:00
2019-08-04 03:01:55 -07:00
2019-09-09 02:07:51 -07:00
2019-03-25 22:01:12 +00:00
2019-04-09 00:34:02 +02:00
2020-02-17 10:13:52 +01:00
2019-08-28 21:56:00 -07:00
2020-01-01 20:06:52 +00:00
2019-09-12 07:41:11 -07:00
2019-02-25 23:32:27 +01:00
2019-06-02 09:03:59 +03:00
2020-01-21 15:04:33 +01:00
2020-02-11 07:32:40 -08:00
2019-03-27 07:58:49 +02:00
2019-05-27 10:57:23 -07:00
2019-04-07 18:00:41 +10:00
2019-06-02 21:36:21 +01:00
2018-11-02 12:29:40 +09:00
2018-12-11 11:31:16 +00:00
2018-12-11 11:31:16 +00:00
2018-12-18 23:54:33 +01:00
2019-12-31 21:28:08 -06:00
2019-03-12 08:39:57 -07:00
2020-01-08 07:48:33 -08:00
2018-11-04 15:58:24 -08:00
2019-11-15 16:21:27 -08:00
2019-01-13 13:05:13 +09:00
2019-01-07 09:38:41 -07:00
2019-05-10 19:21:10 +02:00
2019-12-23 18:31:00 +00:00
2018-12-17 09:36:36 +01:00
2019-06-22 15:34:03 -07:00
2020-01-28 01:59:43 -08:00
2019-09-09 04:25:21 -07:00
2019-09-28 08:22:00 -07:00
2019-06-13 05:28:11 -07:00
2019-07-01 19:01:52 +02:00
2019-05-26 17:10:09 +02:00
2019-03-05 10:06:26 +02:00
2019-07-01 19:01:52 +02:00
2019-11-02 16:48:22 +02:00
2019-03-05 10:06:26 +02:00
2019-09-25 08:50:31 -07:00
2020-01-05 09:21:47 -08:00
2019-06-27 09:45:30 -07:00
2019-07-01 19:01:52 +02:00
2019-06-02 10:24:06 +01:00
2019-03-22 10:22:20 -07:00
2018-11-05 22:03:46 +10:00
2019-12-09 03:15:23 -08:00
2019-12-17 04:05:41 -05:00
2019-07-01 19:01:52 +02:00
2019-07-01 19:01:52 +02:00
2019-08-29 18:29:59 +03:00
2019-06-24 19:14:37 -07:00
2019-06-03 03:51:43 +02:00
2019-07-21 22:48:45 -04:00
2018-11-05 16:20:25 +02:00
2019-05-31 10:39:47 +03:00
2019-10-03 17:26:25 +02:00
2020-01-06 08:26:13 -08:00
2019-04-17 17:41:33 +02:00
2019-06-16 00:07:54 -07:00
2019-07-01 19:01:52 +02:00
2019-04-14 11:16:54 +02:00
2019-03-05 10:06:26 +02:00
2019-06-11 01:41:23 -07:00
2019-03-05 10:06:26 +02:00
2019-09-11 13:39:52 +01:00
2020-01-28 00:46:29 +01:00
2019-07-01 19:01:52 +02:00
2019-05-05 18:06:30 +09:00
2019-09-25 08:50:31 -07:00
2019-09-12 11:34:28 +01:00
2019-03-05 10:06:26 +02:00
2019-03-25 00:25:37 -07:00
2019-09-11 15:37:18 +01:00
2019-12-07 09:20:27 -08:00
2019-04-25 18:36:45 +00:00
2019-10-10 15:50:32 +02:00
2019-12-09 17:35:25 -08:00
2019-08-09 15:34:22 -07:00
2019-07-18 07:17:58 -07:00
2020-01-23 15:31:29 -08:00
2019-04-25 18:36:45 +00:00
2019-05-29 02:33:59 -07:00
2019-01-22 10:49:52 -08:00
2019-05-28 16:21:17 -07:00
2019-12-31 21:28:08 -06:00
2019-05-22 22:05:02 +12:00
2019-07-29 07:47:30 -07:00
2019-07-01 19:01:52 +02:00
2019-06-29 14:28:59 -07:00
2019-07-01 19:01:52 +02:00
2019-09-25 08:50:31 -07:00
2019-10-04 03:28:54 -07:00
2019-11-27 21:23:14 -08:00
2019-06-03 03:51:43 +02:00
2019-07-01 19:01:52 +02:00
2019-07-01 19:01:52 +02:00
2019-01-06 23:10:55 +01:00
2019-08-01 07:38:57 -07:00
2018-12-17 09:36:36 +01:00
2019-07-18 07:17:58 -07:00
2019-08-20 21:08:57 -07:00
2019-01-24 16:49:56 -07:00
2019-06-01 14:49:09 +10:00
2018-11-16 17:32:58 +02:00
2019-08-30 13:42:54 -07:00
2019-02-19 13:49:09 +02:00
2019-06-12 16:17:05 +02:00
2019-11-21 09:43:42 -08:00
2019-08-19 10:53:22 +01:00
2019-09-03 20:03:37 -07:00
2019-09-25 08:50:31 -07:00
2019-10-12 09:58:11 -07:00
2019-02-22 14:45:36 +01:00
2020-01-05 04:32:00 -08:00
2019-02-22 14:45:36 +01:00
2020-02-16 13:47:21 -08:00
2019-05-07 17:41:06 -04:00
2019-08-27 21:59:54 -07:00
2019-04-22 11:46:27 -07:00
2019-12-02 14:44:44 -08:00
2019-06-15 09:10:34 -07:00
2019-09-11 08:55:57 -07:00
2019-10-08 21:38:11 +01:00
2019-05-20 10:01:07 -07:00
2018-11-26 23:29:45 +02:00
2019-07-03 02:31:39 -07:00
2019-09-09 03:11:00 -07:00
2019-08-30 13:42:54 -07:00
2018-12-18 22:29:14 +02:00
2019-07-24 20:46:01 +02:00
2019-04-30 19:12:21 -07:00
2019-06-29 23:13:18 -07:00
2019-06-03 03:51:43 +02:00
2019-03-05 10:05:57 +02:00
2020-02-11 22:21:32 -05:00
2019-03-05 10:06:26 +02:00
2020-01-14 03:39:19 -08:00
2019-02-25 17:57:58 +02:00
2018-12-17 11:30:34 +01:00