-
-
Notifications
You must be signed in to change notification settings - Fork 103
Django backend positional arg support #110
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
Django backend positional arg support #110
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Hi @massover, thank you for your contribution! Your code looks good to me, however, I have a couple of questions:
Additionally, several other contributors added support for python 3.8 and it required pytest/tox configuration. To make the source code clean, would you mind:
Appreciate your effort and looking forward to merging this to master soonest. |
6a06133
to
2024ac3
Compare
It fixes this I do have the most recent code from master in my branch and still have this issue. I have removed my fixes from the pr as per your request.
$ git revert c193d95
[django-backend-positional-arg-support d613fa9] Revert "Rename files so they're found by pytest"
2 files changed, 20 deletions(-)
rename jsonrpc/tests/test_backend_django/{test_backend.py => tests.py} (82%)
rename jsonrpc/tests/test_backend_flask/{test_backend.py => tests.py} (100%)
$ tox -e py37
...
jsonrpc/tests/test_base.py .. [ 0%]
jsonrpc/tests/test_bug29.py . [ 1%]
jsonrpc/tests/test_dispatcher.py ............. [ 7%]
jsonrpc/tests/test_examples20.py .............. [ 14%]
jsonrpc/tests/test_jsonrpc1.py ................................................ [ 37%]
jsonrpc/tests/test_jsonrpc2.py ................................................................................ [ 75%]
jsonrpc/tests/test_jsonrpc_errors.py ................... [ 85%]
jsonrpc/tests/test_manager.py ................ [ 92%]
jsonrpc/tests/test_pep3107.py . [ 93%]
jsonrpc/tests/test_utils.py .............. [100%]
...
$ git revert d613fa9
[django-backend-positional-arg-support de11f28] Revert Revert Rename files so theyre found by pytest
2 files changed, 20 insertions(+)
rename jsonrpc/tests/test_backend_django/{tests.py => test_backend.py} (82%)
rename jsonrpc/tests/test_backend_flask/{tests.py => test_backend.py} (100%)
$ tox -e py37
...
jsonrpc/tests/test_base.py .. [ 0%]
jsonrpc/tests/test_bug29.py . [ 1%]
jsonrpc/tests/test_dispatcher.py ............. [ 6%]
jsonrpc/tests/test_examples20.py .............. [ 12%]
jsonrpc/tests/test_jsonrpc1.py ................................................ [ 33%]
jsonrpc/tests/test_jsonrpc2.py ................................................................................ [ 68%]
jsonrpc/tests/test_jsonrpc_errors.py ................... [ 76%]
jsonrpc/tests/test_manager.py ................ [ 83%]
jsonrpc/tests/test_pep3107.py . [ 83%]
jsonrpc/tests/test_utils.py .............. [ 90%]
jsonrpc/tests/test_backend_django/test_backend.py ......... [ 93%]
jsonrpc/tests/test_backend_flask/test_backend.py ..............
... |
Merged into master. |
Description of the Change
json rpc allows params to be sent by position. The quickstart includes an example of this.
Using the django backend, params by position fail because they're missing the required request param. This code adds the request as the first argument to the method when called through the dispatcher. It makes this test pass that would be failing before.
Additionally: