FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: duplicate subparsers being added to argparse by JohnVillalovos · Pull Request #2014 · python-gitlab/python-gitlab · GitHub

Repository navigation

fix: duplicate subparsers being added to argparse - #2014

Merged
nejch merged 1 commit into
mainfrom
jlvillal/python3.11beta1
May 9, 2022
Merged

nejch merged 1 commit into
mainfrom
jlvillal/python3.11beta1

Conversation

JohnVillalovos commented May 8, 2022 •
edited
Loading

Copy link
Copy Markdown
Member

Python 3.11 added an additional check in the argparse libary which
detected duplicate subparsers being added. We had duplicate subparsers
being added.

Make sure we don't add duplicate subparsers.
Closes: #2015

Copy link
Copy Markdown
Member Author

@nejch Seems like Python 3.11.0-beta.1 doesn't like what we are doing...

Copy link
Copy Markdown
Member Author

I think this is the upstream commit:

python/cpython@ad5e852

commit ad5e8520f3e117f45481513014548a39879d30d2
Author: Antony Lee <anntzer.lee@gmail.com>
Date:   Sun May 1 08:04:50 2022 +0200

    bpo-39716: Raise on conflicting subparser names. (GH-18605)



    Raise an ArgumentError when the same subparser name is added twice to an
    ArgumentParser.  This is consistent with the (default) behavior when the
    same option string is added twice to an ArgumentParser.

    (Support for `conflict_handler="resolve"` could be considered as a
    followup feature, although real use cases seem even rarer than
    "resolve"ing option-strings.)

    Automerge-Triggered-By: GH:rhettinger

Copy link
Copy Markdown
Member Author

The PR upstream: python/cpython#18605

Copy link
Copy Markdown
Member Author

Probably should create an issue for this instead of my dummy PR 😊

JohnVillalovos force-pushed the jlvillal/python3.11beta1 branch 4 times, most recently from d64b159 to 14df327 Compare May 8, 2022 19:20
JohnVillalovos changed the title WIP: testing Python 3.11.0-beta.1 fix: duplicate subparsers being added to argparse May 8, 2022
JohnVillalovos requested a review from nejch May 8, 2022 19:20
JohnVillalovos force-pushed the jlvillal/python3.11beta1 branch from 14df327 to 6f013d1 Compare May 8, 2022 19:26

codecov-commenter commented May 8, 2022 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #2014 (c7dcedd) into main (6b47c26) will decrease coverage by 0.03%.
The diff coverage is 69.23%.

@@            Coverage Diff             @@
##             main    #2014      +/-   ##
==========================================
- Coverage   92.65%   92.62%   -0.04%     
==========================================
  Files          78       78              
  Lines        4944     4949       +5     
==========================================
+ Hits         4581     4584       +3     
- Misses        363      365       +2     
Flag Coverage Δ
cli_func_v4 81.39% <69.23%> (-0.03%) ⬇️
py_func_v4 80.33% <0.00%> (-0.09%) ⬇️
unit 83.53% <69.23%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gitlab/v4/cli.py 81.18% <69.23%> (-0.38%) ⬇️

Comment thread gitlab/v4/cli.py Outdated
JohnVillalovos force-pushed the jlvillal/python3.11beta1 branch 2 times, most recently from e812380 to c7dcedd Compare May 8, 2022 22:01
Comment thread gitlab/v4/cli.py Outdated
Comment thread gitlab/v4/cli.py
Python 3.11 added an additional check in the argparse libary which
detected duplicate subparsers being added. We had duplicate subparsers
being added.

Make sure we don't add duplicate subparsers.

Closes: #2015
JohnVillalovos force-pushed the jlvillal/python3.11beta1 branch from c7dcedd to f553fd3 Compare May 9, 2022 13:40
nejch merged commit 7d5a0c9 into main May 9, 2022
nejch deleted the jlvillal/python3.11beta1 branch May 9, 2022 14:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python 3.11 unit tests are failing due to argparse error

3 participants


Back | FazBrowse Home | New Git URL