bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)



The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing.

However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`).  Checking the argument for a leading `--` before rejecting it fixes this.

This was prompted by pytest-dev/pytest#5469, so a backport to at least 3.8 would be great :smile:  
And this is my first PR to CPython, so please let me know if I've missed anything!


https://bugs.python.org/issue26967
diff --git a/Misc/ACKS b/Misc/ACKS
index b2a6011..3e6a0ac 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -645,6 +645,7 @@
 Shane Harvey
 Larry Hastings
 Tim Hatch
+Zac Hatfield-Dodds
 Shane Hathaway
 Michael Haubenwallner
 Janko Hauser
diff --git a/Misc/NEWS.d/next/Library/2019-06-23-12-46-10.bpo-26967.xEuem1.rst b/Misc/NEWS.d/next/Library/2019-06-23-12-46-10.bpo-26967.xEuem1.rst
new file mode 100644
index 0000000..c5852f6
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-06-23-12-46-10.bpo-26967.xEuem1.rst
@@ -0,0 +1,3 @@
+An :class:`~argparse.ArgumentParser` with ``allow_abbrev=False`` no longer
+disables grouping of short flags, such as ``-vv``, but only disables
+abbreviation of long flags as documented. Patch by Zac Hatfield-Dodds.