Skip to content

test_decorator failure for Python 3.11.4 #269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zhiruiluo opened this issue Jul 1, 2023 · 0 comments · Fixed by #273
Closed

test_decorator failure for Python 3.11.4 #269

zhiruiluo opened this issue Jul 1, 2023 · 0 comments · Fixed by #273

Comments

@zhiruiluo
Copy link
Contributor

zhiruiluo commented Jul 1, 2023

Describe the bug
test_decorator.py failed during collection for Python 3.11.4 at line 65.

>> signature = signature.replace(parameters=new_parameters)  
test/test_decorator.py:86: in <module>
    ("--b=2", 4, partial(_fn_with_all_argument_types, 1, c=1)),
test/test_decorator.py:66: in partial
    signature = signature.replace(parameters=new_parameters)
conda/envs/py311test/lib/python3.11/inspect.py:3052: in replace
    return type(self)(parameters,
.conda/envs/py311test/lib/python3.11/inspect.py:3008: in __init__
    raise ValueError(msg)
E   ValueError: non-default argument follows default argument
---------------------------------------------------------------

The test case ("--b=2", 4, partial(_fn_with_all_argument_types, 1, c=1)), has parameters [<Parameter "a: int = 1">, <Parameter "b: int">, <Parameter "c: int = 1">]

To Reproduce

pytest test/test_decorator.py

Desktop (please complete the following information):

  • Version: master
  • Python version: 3.11.4

Additional context
Add any other context about the problem here.

zhiruiluo added a commit to zhiruiluo/SimpleParsing that referenced this issue Jul 1, 2023
lebrice added a commit that referenced this issue Jul 10, 2023
* fix_issue #269

* apply lint check

* update

* update

* apply lint check

* Simplify `test_decorator`

Signed-off-by: Fabrice Normandin <[email protected]>

---------

Signed-off-by: Fabrice Normandin <[email protected]>
Co-authored-by: lzrpotato <[email protected]>
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 a pull request may close this issue.

1 participant