https://bugzilla.redhat.com/show_bug.cgi?id=1979275
--- Comment #12 from Mukundan Ragavan nonamedotc@gmail.com --- (In reply to Miro Hrončok from comment #9)
The package does not build for me:
- pytest
============================= test session starts
platform linux -- Python 3.10.0b3, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 rootdir: /builddir/build/BUILD/python-lsp-jsonrpc-1.0.0, configfile: setup.cfg, testpaths: test plugins: cov-2.11.1 collected 27 items
test/test_endpoint.py ...................... [ 81%] test/test_streams.py ....F [100%]
=================================== FAILURES
___________________________ test_writer_bad_message ____________________________
wfile = <_io.BytesIO object at 0x7febc95eba10> writer = <pylsp_jsonrpc.streams.JsonRpcStreamWriter object at 0x7febc8a5bb50>
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 beempty # 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'1546304461', b'Content-Length: 10\r\n' b'Content-Type: application/vscode-jsonrpc; charset=utf8\r\n' b'\r\n' b'1546322461' ]E AssertionError: assert b'Content-Length: 10\r\nContent-Type: application/vscode-jsonrpc; charset=utf8\r\n\r\n1546300861' in [b'', b'Content-Length: 10\r\nContent-Type: application/vscode-jsonrpc; charset=utf8\r\n\r\n1546304461', b'Content-Length: 10\r\nContent-Type: application/vscode-jsonrpc; charset=utf8\r\n\r\n1546322461'] E + where b'Content-Length: 10\r\nContent-Type: application/vscode-jsonrpc; charset=utf8\r\n\r\n1546300861' = <built-in method getvalue of _io.BytesIO object at 0x7febc95eba10>() E + where <built-in method getvalue of _io.BytesIO object at 0x7febc95eba10> = <_io.BytesIO object at 0x7febc95eba10>.getvalue
test/test_streams.py:118: AssertionError
- generated xml file:
/builddir/build/BUILD/python-lsp-jsonrpc-1.0.0/pytest.xml -
----------- coverage: platform linux, python 3.10.0-beta-3 ----------- Name Stmts Miss Cover
pylsp_jsonrpc/__init__.py 2 0 100% pylsp_jsonrpc/_version.py 2 0 100% pylsp_jsonrpc/dispatchers.py 19 19 0% pylsp_jsonrpc/endpoint.py 138 5 96% pylsp_jsonrpc/exceptions.py 60 6 90% pylsp_jsonrpc/streams.py 67 14 79% test/__init__.py 0 0 100% test/test_endpoint.py 133 4 97% test/test_streams.py 49 1 98%
TOTAL 470 49 90% Coverage HTML written to dir htmlcov
=========================== short test summary info
FAILED test/test_streams.py::test_writer_bad_message - AssertionError: assert... ========================= 1 failed, 26 passed in 0.36s =========================
It builds for me. Here is one with the correct macro - https://koji.fedoraproject.org/koji/taskinfo?taskID=71450407
+ CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection' + LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' + PATH=/builddir/build/BUILDROOT/python-lsp-jsonrpc-1.0.0-1.fc35.noarch/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin + PYTHONPATH=/builddir/build/BUILDROOT/python-lsp-jsonrpc-1.0.0-1.fc35.noarch/usr/lib64/python3.10/site-packages:/builddir/build/BUILDROOT/python-lsp-jsonrpc-1.0.0-1.fc35.noarch/usr/lib/python3.10/site-packages + PYTHONDONTWRITEBYTECODE=1 + PYTEST_ADDOPTS=' --ignore=/builddir/build/BUILD/python-lsp-jsonrpc-1.0.0/.pyproject-builddir' + /usr/bin/pytest ============================= test session starts ============================== platform linux -- Python 3.10.0b3, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 rootdir: /builddir/build/BUILD/python-lsp-jsonrpc-1.0.0, configfile: setup.cfg, testpaths: test plugins: cov-2.11.1 collected 27 items test/test_endpoint.py ...................... [ 81%] test/test_streams.py ..... [100%] - generated xml file: /builddir/build/BUILD/python-lsp-jsonrpc-1.0.0/pytest.xml - ----------- coverage: platform linux, python 3.10.0-beta-3 ----------- Name Stmts Miss Cover -------------------------------------------------- pylsp_jsonrpc/__init__.py 2 0 100% pylsp_jsonrpc/_version.py 2 0 100% pylsp_jsonrpc/dispatchers.py 19 19 0% pylsp_jsonrpc/endpoint.py 138 5 96% pylsp_jsonrpc/exceptions.py 60 6 90% pylsp_jsonrpc/streams.py 67 14 79% test/__init__.py 0 0 100% test/test_endpoint.py 133 4 97% test/test_streams.py 49 1 98% -------------------------------------------------- TOTAL 470 49 90% Coverage HTML written to dir htmlcov ============================== 27 passed in 0.58s ==============================