Source: python-webargs Version: 8.5.0-1 Severity: serious Tags: ftbfs Justification: FTBFS
Dear maintainer, During a test rebuild, python-webargs failed to rebuild. ------------------------------------------------------------------------------- [...] dh_auto_test -O--buildsystem=pybuild I: pybuild base:311: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_webargs/build; python3.12 -m pytest -k 'not test_get_path_param and not test_get_with_no_json_body and not test_post and not test_missing_required_field_throws_422 and not test_required_field_provided and not test_use_kwargs_with_error and not test_user_validator_returns_422_by_default' ============================= test session starts ============================== platform linux -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0 rootdir: /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_webargs/build configfile: pyproject.toml plugins: asyncio-0.20.3, typeguard-4.3.0 asyncio: mode=Mode.STRICT collected 464 items / 7 deselected / 457 selected tests/test_bottleparser.py .....................F...............F..s [ 8%] tests/test_core.py ..................................................... [ 20%] ........................................................................ [ 36%] .............. [ 39%] tests/test_djangoparser.py ........................................s.... [ 49%] . [ 49%] tests/test_falconparser.py .....................................s....... [ 59%] ...... [ 60%] tests/test_flaskparser.py .............................................. [ 70%] .......................................................... [ 83%] tests/test_pyramidparser.py ........................................... [ 92%] tests/test_tornadoparser.py ................................. [100%] =================================== FAILURES =================================== _____________ TestBottleParser.test_parse_json_with_nonutf8_chars ______________ self = <tests.test_bottleparser.TestBottleParser object at 0xffff925b91f0> testapp = <webtest.app.TestApp object at 0xffff92bd6480> def test_parse_json_with_nonutf8_chars(self, testapp): res = testapp.post( "/echo_json", b"\xfe", headers={"Accept": "application/json", "Content-Type": "application/json"}, expect_errors=True, ) assert res.status_code == 400 > assert res.json == {"json": ["Invalid JSON body."]} webargs/testing.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/webtest/response.py:470: in json return self.json_body /usr/lib/python3/dist-packages/webob/response.py:574: in _json_body__get return json.loads(self.body.decode('UTF-8')) /usr/lib/python3.12/json/__init__.py:346: in loads return _default_decoder.decode(s) /usr/lib/python3.12/json/decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <json.decoder.JSONDecoder object at 0xffff939823c0>, s = 'Invalid JSON' idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: > raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) /usr/lib/python3.12/json/decoder.py:355: JSONDecodeError ______________________ TestBottleParser.test_invalid_json ______________________ self = <tests.test_bottleparser.TestBottleParser object at 0xffff925ba660> testapp = <webtest.app.TestApp object at 0xffff92bd6480> def test_invalid_json(self, testapp): res = testapp.post( "/echo_json", '{"foo": "bar", }', headers={"Accept": "application/json", "Content-Type": "application/json"}, expect_errors=True, ) assert res.status_code == 400 > assert res.json == {"json": ["Invalid JSON body."]} webargs/testing.py:253: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/webtest/response.py:470: in json return self.json_body /usr/lib/python3/dist-packages/webob/response.py:574: in _json_body__get return json.loads(self.body.decode('UTF-8')) /usr/lib/python3.12/json/__init__.py:346: in loads return _default_decoder.decode(s) /usr/lib/python3.12/json/decoder.py:337: in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <json.decoder.JSONDecoder object at 0xffff939823c0>, s = 'Invalid JSON' idx = 0 def raw_decode(self, s, idx=0): """Decode a JSON document from ``s`` (a ``str`` beginning with a JSON document) and return a 2-tuple of the Python representation and the index in ``s`` where the document ended. This can be used to decode a JSON document from a string that may have extraneous data at the end. """ try: obj, end = self.scan_once(s, idx) except StopIteration as err: > raise JSONDecodeError("Expecting value", s, err.value) from None E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) /usr/lib/python3.12/json/decoder.py:355: JSONDecodeError =============================== warnings summary =============================== ../../../../../../usr/lib/python3/dist-packages/django/conf/__init__.py:267 /usr/lib/python3/dist-packages/django/conf/__init__.py:267: RemovedInDjango50Warning: The USE_L10N setting is deprecated. Starting with Django 5.0, localized formatting of data will always be enabled. For example Django will display numbers and dates using the format of the current locale. warnings.warn(USE_L10N_DEPRECATED_MSG, RemovedInDjango50Warning) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_bottleparser.py::TestBottleParser::test_parse_json_with_nonutf8_chars FAILED tests/test_bottleparser.py::TestBottleParser::test_invalid_json - json... ====== 2 failed, 452 passed, 3 skipped, 7 deselected, 1 warning in 1.88s ======= E: pybuild pybuild:389: test: plugin pyproject failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_webargs/build; python3.12 -m pytest -k 'not test_get_path_param and not test_get_with_no_json_body and not test_post and not test_missing_required_field_throws_422 and not test_required_field_provided and not test_use_kwargs_with_error and not test_user_validator_returns_422_by_default' dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12 returned exit code 13 make: *** [debian/rules:12: build] Error 25 dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 2024-09-19T23:30:29Z ------------------------------------------------------------------------------- The above is just how the build ends and not necessarily the most relevant part. If required, the full build log is available here (for the next 30 days): https://debusine.debian.net/artifact/800657/ About the archive rebuild: The build was made on debusine.debian.net, on arm64 using sbuild. You can find the build task here: https://debusine.debian.net/work-request/39208/ If this is really a bug in one of the build-depends, please use reassign and affects, so that this is still visible in the BTS web page for this package. Thanks, Stefano