Repository navigation
Add keyword-only argument support #2555 - #2782
Conversation
bdae732 to
4533702
Compare
|
Rebased with robotframework/master to cleanup merge commits. |
|
I'm torn with this:
Issue #2555 that PR addresses is clearly an enhancement, not a bug, so based on yesterday's discussion we should descope it to RF 3.1. On the other hand, this PR looks good, it's a useful enhancement, and we have never had a general rule not to introduce new features in minor releases. What do you @Brian-Williams think about this? Would you be fine us getting RF 3.0.3 out ASAP and then returning to this issue/PR? |
|
I agree this is a "nice to have" not a "must have". I'm fine with this being pushed out a release. As for documentation. Do you mean docstrings in the code itself or documented elsewhere? If elsewhere could you point me in the right direction? |
|
OK, let's try to get RF 3.0.3 out ASAP and get this in right after that. Something about kw-only-args should be added to the User Guide. Most likely only needs to be documented under the Creating test libraries chapter somewhere. |
|
Added documentation to the "Creating test libraries" chapter under
|
* Add dictionary input to _ArgumentParser.parse * Change PythonArgumentParser._get_arg_spec to return a dictionary with kwonly information * Add kwo information to argumentspec and property reqkwargs * Added validator for missing keyword only arguments In mapping I originally did something more complex with DefaultValues, however since we allow duplicate named inputs and always take the last one I don't believe anything more complex than converting the dictionary into a list is required. Added documentation to the 'Creating test libraries' chapter under `Providing arguments to test libraries`.
|
Going to look at this more closely tomorrow. Are you @Brian-Williams available here or on Slack if I have questions? |
|
As I've already commented above, this PR is really good. Been testing it locally and making some adjustments and ought to get it merged later today. The biggest changes I've done is moving kw-only-args tests into their own suite (easier to tag them all |
- Better error reporting. - Tests to own suite, more tests. See PR #2782.
KeywordCallTemplate is not used with Python based static keywords and thus kw-only-args related changes done in PR #2782 aren't needed there yet. Situation changes when kw-only-arg support is added to user keywords or to the dynamic API.
|
Merged the PR, thanks @Brian-Williams, but there are still few more things to do before issue #2555 can be considered done. I'll comment the issue itself about that. |
|
I apologise for the unavailability I have limited internet access until
July 9th. When I get online I'll look over the other issue tasks. I should
have time to next week.
…On Sat, Jul 7, 2018, 7:22 AM Pekka Klärck ***@***.***> wrote:
Merged the PR, thanks @Brian-Williams <https://github.com/Brian-Williams>,
but there are still few more things to do before issue #2555
<#2555> can be
considered done. I'll comment the issue itself about that.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2782 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AOfvs7MQ3QdUablLrfJ5k3FfMqM9vHGjks5uEJnvgaJpZM4SRfV7>
.
|
|
No worries, I haven't been available to look at PRs lately. I try to get the aforementioned tasks today or tomorrow before alpha 2 and holidays. |
Summary
Addresses #2555.
kwonly information
In mapping I originally did something more complex with DefaultValues,
however since we allow duplicate named inputs and always take the last
one I don't believe anything more complex than converting the
dictionary into a list is required.
Testing
Unit tests passed for 2.7, 3.4-3.6 and pypy3.
Acceptance tests for 2.7 passed with the following parameters:
atest/run.py python --exclude no-ciORrequire-screenshot atest/robotI ran tests against 3.6 for kwonlyarguments:
atest/run.py python3 atest/robot/keywords/python_arguments.robotand that succeeds.