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
Dev-python/python-language-server: allow newer ujson versions #17882
Dev-python/python-language-server: allow newer ujson versions #17882
Conversation
Pull Request assignmentSubmitter: @AndrewAmmerlaan dev-python/python-jsonrpc-server: @AndrewAmmerlaan, @gentoo/proxy-maint Linked bugsBugs linked: 715290 In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
Pull request CI reportReport generated at: 2020-10-11 12:01 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
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.
Could you revbump both of these so people who already have these installed can update to later ujson as well? git mv
with your changes is fine here.
2d97932
to
87ab055
Compare
Done |
Pull request CI reportReport generated at: 2020-10-12 09:36 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
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.
Sooo after your update the tests fail with updated ujson,
============================================== FAILURES ==============================================
______________________________________ test_writer_bad_message _______________________________________
wfile = <_io.BytesIO object at 0x7f8541835e90>
writer = <pyls_jsonrpc.streams.JsonRpcStreamWriter object at 0x7f8541850210>
def test_writer_bad_message(wfile, writer):
# A datetime isn't serializable(or poorly serializable),
# ensure the write method doesn't throw, but the result could be empty
# or the correct datetime
datetime.datetime = JsonDatetime
writer.write(datetime.datetime(
year=2019,
month=1,
day=1,
hour=1,
minute=1,
second=1,
))
> assert wfile.getvalue() in [
b''
b'Content-Length: 10\r\n'
b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n'
b'\r\n'
b'1546300861'
]
E AssertionError: assert b'Content-Length: 10\r\nContent-Type: application/vscode-jsonrpc; charset=utf8\r\n\r\n1546304461' in [b'Content-Length: 10\r\nContent-Type: application/vscode-jsonrpc; charset=utf8\r\n\r\n1546300861']
E + where b'Content-Length: 10\r\nContent-Type: application/vscode-jsonrpc; charset=utf8\r\n\r\n1546304461' = <built-in method getvalue of _io.BytesIO object at 0x7f8541835e90>()
E + where <built-in method getvalue of _io.BytesIO object at 0x7f8541835e90> = <_io.BytesIO object at 0x7f8541835e90>.getvalue
test/test_streams.py:124: AssertionError
====================================== short test summary info =======================================
FAILED test/test_streams.py::test_writer_bad_message - AssertionError: assert b'Content-Length: 10\...
==================================== 1 failed, 26 passed in 0.09s ====================================
* ERROR: dev-python/python-jsonrpc-server-0.4.0-r1::testworld failed (test phase):
* Tests fail with python3.7
But the ::gentoo version passes all tests. So there's definitely still something broken with this.
Which ujson version where you using? this was working for me with ujson-4.0.0 |
Let me try with 4.0.0 Basically my deps are always the latest available version. |
Same, but I just retested and this works for me, so I'm a bit confused now Lets compare equery depgraphs:
|
Do note that your version is -r1, the ::gentoo version (-r0) works for me too as I said previously. But here's mine:
|
This is because the ebuild in my local overlay does not have the -r1 suffix. Well I'm even more confused now, does it work for you without the patch? Because the error you're getting looks suspiciously like the patch. |
Yep, they seem to pass happily without the patch. |
The plot thickens, I get this without the patch:
|
87ab055
to
7ef354d
Compare
Pull request CI reportReport generated at: 2020-10-13 18:41 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
I get the error you posted with the patch you included here. If no pathes are applied, python-jsonrpc-server-0.4.0-r1 passes all tests and installs just fine. Are you doing something weird on your end? :) I'm applying this on top of ::gentoo tree and running emerge. |
Not that I know Looking at the PR where I got this patch the upstream CI checks seem to be failing as well: palantir/python-jsonrpc-server#49 Though presumably the submitter wrote the patch in the first place because they were getting this error. So it seems like some people need this patch to get the test to work, and for others the patch breaks the test. I don't know what's going on, but the test seems to be doing something with date and time, so I suspect locale settings are causing these issues. |
Probably upstream hasn't fully fixed this issue. |
I took the liberty of fixing this issue, apply
It should work like a charm. |
Closes: https://bugs.gentoo.org/715290 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
Bug: https://bugs.gentoo.org/715290 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
7ef354d
to
39ed72d
Compare
Awesome, Thank You! This works for me, @juippis does this fix the issue for you too? |
Pull request CI reportReport generated at: 2020-10-16 08:31 UTC There are existing issues already. Please look into the report to make sure none of them affect the packages in question: |
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.
Thanks, both of you!
This fixes a bug in pyls_jsonrpc preventing the use of ujson newer than 1.35 in pyls.