Apply workaround for multiple short options for Python <= 3.8
Hopefully by Python 3.9 this will be fixed upstream, if not we will need to bump the version again. Fix #5523
This commit is contained in:
		
							parent
							
								
									4f9bf028f5
								
							
						
					
					
						commit
						1db132290f
					
				|  | @ -0,0 +1 @@ | ||||||
|  | Fixed using multiple short options together in the command-line (for example ``-vs``) in Python 3.8+. | ||||||
|  | @ -358,7 +358,7 @@ class MyOptionParser(argparse.ArgumentParser): | ||||||
|             getattr(args, FILE_OR_DIR).extend(argv) |             getattr(args, FILE_OR_DIR).extend(argv) | ||||||
|         return args |         return args | ||||||
| 
 | 
 | ||||||
|     if sys.version_info[:2] < (3, 8):  # pragma: no cover |     if sys.version_info[:2] < (3, 9):  # pragma: no cover | ||||||
|         # Backport of https://github.com/python/cpython/pull/14316 so we can |         # Backport of https://github.com/python/cpython/pull/14316 so we can | ||||||
|         # disable long --argument abbreviations without breaking short flags. |         # disable long --argument abbreviations without breaking short flags. | ||||||
|         def _parse_optional(self, arg_string): |         def _parse_optional(self, arg_string): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue