Bugzilla – Bug 1212557
New python-Werkzeug breaks python-httpbin tests
Last modified: 2023-09-08 13:02:54 UTC
Hi, The update of python-Werkzeug to 2.3.6 [0] is blocked because it breaking the tests of python-httpbin I copied the full log at [1], but I'm attaching the tests failures below anyway. [0] https://build.opensuse.org/request/show/1093788 [1] https://paste.opensuse.org/pastes/6fb92893bbb5 --- [ 27s] ============================= test session starts ============================== [ 27s] platform linux -- Python 3.9.16, pytest-7.3.1, pluggy-1.0.0 -- /usr/bin/python3.9 [ 27s] cachedir: .pytest_cache [ 27s] rootdir: /home/abuild/rpmbuild/BUILD/python-httpbin-0.7.0+git20181107.f8ec666 [ 27s] plugins: anyio-3.6.2 [ 27s] collecting ... collected 67 items [ 27s] [ 27s] test_httpbin.py::HttpbinTestCase::test_absolute_redirect_n_equals_to_1 PASSED [ 1%] [ 27s] test_httpbin.py::HttpbinTestCase::test_absolute_redirect_n_higher_than_1 PASSED [ 2%] [ 27s] test_httpbin.py::HttpbinTestCase::test_anything PASSED [ 4%] [ 27s] test_httpbin.py::HttpbinTestCase::test_base64 FAILED [ 5%] [ 27s] test_httpbin.py::HttpbinTestCase::test_bearer_auth PASSED [ 7%] [ 27s] test_httpbin.py::HttpbinTestCase::test_bearer_auth_with_missing_token PASSED [ 8%] [ 27s] test_httpbin.py::HttpbinTestCase::test_bearer_auth_with_wrong_authorization_type PASSED [ 10%] [ 27s] test_httpbin.py::HttpbinTestCase::test_brotli PASSED [ 11%] [ 27s] test_httpbin.py::HttpbinTestCase::test_bytes_with_seed PASSED [ 13%] [ 27s] test_httpbin.py::HttpbinTestCase::test_delete_endpoint_returns_body PASSED [ 14%] [ 27s] test_httpbin.py::HttpbinTestCase::test_digest_auth FAILED [ 16%] [ 27s] test_httpbin.py::HttpbinTestCase::test_digest_auth_with_wrong_authorization_type PASSED [ 17%] [ 27s] test_httpbin.py::HttpbinTestCase::test_digest_auth_with_wrong_password PASSED [ 19%] [ 27s] test_httpbin.py::HttpbinTestCase::test_digest_auth_wrong_pass FAILED [ 20%] [ 30s] test_httpbin.py::HttpbinTestCase::test_drip PASSED [ 22%] [ 32s] test_httpbin.py::HttpbinTestCase::test_drip_with_custom_code PASSED [ 23%] [ 32s] test_httpbin.py::HttpbinTestCase::test_drip_with_invalid_numbytes PASSED [ 25%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_match_has_no_match PASSED [ 26%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_match_matches PASSED [ 28%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_match_matches_list PASSED [ 29%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_match_matches_star PASSED [ 31%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_none_match_has_no_match PASSED [ 32%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_none_match_matches PASSED [ 34%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_none_match_matches_list PASSED [ 35%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_none_match_matches_star PASSED [ 37%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_if_none_match_w_prefix PASSED [ 38%] [ 32s] test_httpbin.py::HttpbinTestCase::test_etag_with_no_headers PASSED [ 40%] [ 32s] test_httpbin.py::HttpbinTestCase::test_get PASSED [ 41%] [ 32s] test_httpbin.py::HttpbinTestCase::test_get_bytes PASSED [ 43%] [ 32s] test_httpbin.py::HttpbinTestCase::test_gzip PASSED [ 44%] [ 32s] test_httpbin.py::HttpbinTestCase::test_headers PASSED [ 46%] [ 32s] test_httpbin.py::HttpbinTestCase::test_headers_show_env PASSED [ 47%] [ 33s] test_httpbin.py::HttpbinTestCase::test_index PASSED [ 49%] [ 33s] test_httpbin.py::HttpbinTestCase::test_methods__to_status_endpoint PASSED [ 50%] [ 33s] test_httpbin.py::HttpbinTestCase::test_parse_multi_value_header PASSED [ 52%] [ 33s] test_httpbin.py::HttpbinTestCase::test_post_binary PASSED [ 53%] [ 33s] test_httpbin.py::HttpbinTestCase::test_post_body_binary PASSED [ 55%] [ 33s] test_httpbin.py::HttpbinTestCase::test_post_body_text PASSED [ 56%] [ 33s] test_httpbin.py::HttpbinTestCase::test_post_body_unicode PASSED [ 58%] [ 33s] test_httpbin.py::HttpbinTestCase::test_post_chunked PASSED [ 59%] [ 33s] test_httpbin.py::HttpbinTestCase::test_post_file_with_missing_content_type_header PASSED [ 61%] [ 33s] test_httpbin.py::HttpbinTestCase::test_redirect_absolute_param_n_higher_than_1 PASSED [ 62%] [ 33s] test_httpbin.py::HttpbinTestCase::test_redirect_n_equals_to_1 PASSED [ 64%] [ 33s] test_httpbin.py::HttpbinTestCase::test_redirect_n_higher_than_1 PASSED [ 65%] [ 33s] test_httpbin.py::HttpbinTestCase::test_redirect_to_post PASSED [ 67%] [ 33s] test_httpbin.py::HttpbinTestCase::test_relative_redirect_n_equals_to_1 PASSED [ 68%] [ 33s] test_httpbin.py::HttpbinTestCase::test_relative_redirect_n_higher_than_1 PASSED [ 70%] [ 33s] test_httpbin.py::HttpbinTestCase::test_request_out_of_bounds PASSED [ 71%] [ 33s] test_httpbin.py::HttpbinTestCase::test_request_range PASSED [ 73%] [ 33s] test_httpbin.py::HttpbinTestCase::test_request_range_first_15_bytes PASSED [ 74%] [ 33s] test_httpbin.py::HttpbinTestCase::test_request_range_open_ended_last_6_bytes PASSED [ 76%] [ 33s] test_httpbin.py::HttpbinTestCase::test_request_range_suffix PASSED [ 77%] [ 33s] test_httpbin.py::HttpbinTestCase::test_request_range_with_parameters PASSED [ 79%] [ 33s] test_httpbin.py::HttpbinTestCase::test_response_headers_multi PASSED [ 80%] [ 33s] test_httpbin.py::HttpbinTestCase::test_response_headers_simple PASSED [ 82%] [ 33s] test_httpbin.py::HttpbinTestCase::test_set_cors_allow_headers PASSED [ 83%] [ 33s] test_httpbin.py::HttpbinTestCase::test_set_cors_credentials_headers_after_auth_request PASSED [ 85%] [ 33s] test_httpbin.py::HttpbinTestCase::test_set_cors_headers_after_request PASSED [ 86%] [ 33s] test_httpbin.py::HttpbinTestCase::test_set_cors_headers_after_request_with_request_origin PASSED [ 88%] [ 33s] test_httpbin.py::HttpbinTestCase::test_set_cors_headers_with_options_verb PASSED [ 89%] [ 33s] test_httpbin.py::HttpbinTestCase::test_status_endpoint_invalid_code PASSED [ 91%] [ 33s] test_httpbin.py::HttpbinTestCase::test_status_endpoint_invalid_codes PASSED [ 92%] [ 33s] test_httpbin.py::HttpbinTestCase::test_stream_bytes PASSED [ 94%] [ 33s] test_httpbin.py::HttpbinTestCase::test_stream_bytes_with_seed PASSED [ 95%] [ 33s] test_httpbin.py::HttpbinTestCase::test_user_agent PASSED [ 97%] [ 33s] test_httpbin.py::HttpbinTestCase::test_x_forwarded_proto PASSED [ 98%] [ 33s] test_httpbin.py::HttpbinTestCase::test_xml_endpoint PASSED [100%] [ 33s] [ 33s] =================================== FAILURES =================================== [ 33s] _________________________ HttpbinTestCase.test_base64 __________________________ [ 33s] [ 33s] self = <test_httpbin.HttpbinTestCase testMethod=test_base64> [ 33s] [ 33s] def test_base64(self): [ 33s] greeting = u'ЗдравÑтвуй, мир!' [ 33s] b64_encoded = _string_to_base64(greeting) [ 33s] > response = self.app.get(b'/base64/' + b64_encoded) [ 33s] [ 33s] test_httpbin.py:171: [ 33s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 33s] /usr/lib/python3.9/site-packages/werkzeug/test.py:1242: in get [ 33s] return self.open(*args, **kw) [ 33s] /usr/lib/python3.9/site-packages/flask/testing.py:231: in open [ 33s] request = self._request_from_builder_args(args, kwargs) [ 33s] /usr/lib/python3.9/site-packages/flask/testing.py:203: in _request_from_builder_args [ 33s] return builder.get_request() [ 33s] /usr/lib/python3.9/site-packages/werkzeug/test.py:795: in get_request [ 33s] return cls(self.get_environ()) [ 33s] /usr/lib/python3.9/site-packages/werkzeug/test.py:737: in get_environ [ 33s] raw_uri = _wsgi_encoding_dance(self.request_uri, self.charset) [ 33s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 33s] [ 33s] s = b'/base64/0JfQtNGA0LDQstGB0YLQstGD0LksINC80LjRgCE=', charset = 'utf-8' [ 33s] errors = 'strict' [ 33s] [ 33s] def _wsgi_encoding_dance(s: str, charset: str = "utf-8", errors: str = "strict") -> str: [ 33s] > return s.encode(charset).decode("latin1", errors) [ 33s] E AttributeError: 'bytes' object has no attribute 'encode' [ 33s] [ 33s] /usr/lib/python3.9/site-packages/werkzeug/_internal.py:124: AttributeError [ 33s] _______________________ HttpbinTestCase.test_digest_auth _______________________ [ 33s] [ 33s] self = <test_httpbin.HttpbinTestCase testMethod=test_digest_auth> [ 33s] [ 33s] def test_digest_auth(self): [ 33s] """Test different combinations of digest auth parameters""" [ 33s] username = 'user' [ 33s] password = 'passwd' [ 33s] for qop in None, 'auth', 'auth-int',: [ 33s] for algorithm in None, 'MD5', 'SHA-256', 'SHA-512': [ 33s] for body in None, b'', b'request payload': [ 33s] for stale_after in (None, 1, 4) if algorithm else (None,) : [ 33s] > self._test_digest_auth(username, password, qop, algorithm, body, stale_after) [ 33s] [ 33s] test_httpbin.py:364: [ 33s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 33s] test_httpbin.py:394: in _test_digest_auth [ 33s] self._digest_auth_stale_after_check(header, username, password, uri, body, qop, stale_after) [ 33s] test_httpbin.py:425: in _digest_auth_stale_after_check [ 33s] self.assertIn('stale=TRUE', header) [ 33s] E AssertionError: 'stale=TRUE' not found in 'Digest realm="me@kennethreitz.com", nonce="e0c94a64214e040eea569237ba5e3868", qop="auth, auth-int", stale=True, opaque="47e64021e6bfad27a286db3e98f2b2bb", algorithm=MD5' [ 33s] _________________ HttpbinTestCase.test_digest_auth_wrong_pass __________________ [ 33s] [ 33s] self = <test_httpbin.HttpbinTestCase testMethod=test_digest_auth_wrong_pass> [ 33s] [ 33s] def test_digest_auth_wrong_pass(self): [ 33s] """Test different combinations of digest auth parameters""" [ 33s] username = 'user' [ 33s] password = 'passwd' [ 33s] for qop in None, 'auth', 'auth-int',: [ 33s] for algorithm in None, 'MD5', 'SHA-256', 'SHA-512': [ 33s] for body in None, b'', b'request payload': [ 33s] > self._test_digest_auth_wrong_pass(username, password, qop, algorithm, body, 3) [ 33s] [ 33s] test_httpbin.py:466: [ 33s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ [ 33s] test_httpbin.py:483: in _test_digest_auth_wrong_pass [ 33s] self.assertIn('stale=TRUE', header) [ 33s] E AssertionError: 'stale=TRUE' not found in 'Digest realm="me@kennethreitz.com", nonce="63fadef5d1af6b302f49dc2b82d944de", qop="auth, auth-int", stale=True, opaque="6d820c021d467ec2e914e13b7a1a3052", algorithm=MD5' [ 33s] =============================== warnings summary =============================== [ 33s] ../../../../../usr/lib/python3.9/site-packages/flasgger/utils.py:5 [ 33s] /usr/lib/python3.9/site-packages/flasgger/utils.py:5: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses [ 33s] import imp [ 33s] [ 33s] httpbin/helpers.py:26 [ 33s] /home/abuild/rpmbuild/BUILD/python-httpbin-0.7.0+git20181107.f8ec666/httpbin/helpers.py:26: DeprecationWarning: invalid escape sequence \_ [ 33s] ASCII_ART = """ [ 33s] [ 33s] httpbin/helpers.py:71 [ 33s] /home/abuild/rpmbuild/BUILD/python-httpbin-0.7.0+git20181107.f8ec666/httpbin/helpers.py:71: DeprecationWarning: invalid escape sequence \ [ 33s] ANGRY_ASCII =""" [ 33s] [ 33s] httpbin/helpers.py:438 [ 33s] /home/abuild/rpmbuild/BUILD/python-httpbin-0.7.0+git20181107.f8ec666/httpbin/helpers.py:438: DeprecationWarning: invalid escape sequence \s [ 33s] match = re.search('\s*(W/)?\"?([^"]*)\"?\s*', part) [ 33s] [ 33s] test_httpbin.py: 50 warnings [ 33s] /usr/lib/python3.9/site-packages/flask/json/provider.py:281: DeprecationWarning: The 'JSONIFY_PRETTYPRINT_REGULAR' config key is deprecated and will be removed in Flask 2.3. Set 'app.json.compact' instead. [ 33s] warnings.warn( [ 33s] [ 33s] test_httpbin.py::HttpbinTestCase::test_base64 [ 33s] /usr/lib/python3.9/site-packages/werkzeug/test.py:353: DeprecationWarning: Passing bytes is deprecated and will not be supported in Werkzeug 3.0. [ 33s] self.path = iri_to_uri(request_uri.path) [ 33s] [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth_with_wrong_authorization_type [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth_with_wrong_password [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth_wrong_pass [ 33s] /usr/lib/python3.9/site-packages/werkzeug/datastructures/auth.py:297: UserWarning: The 'set_digest' method is deprecated and will be removed in Werkzeug 3.0. Create and assign an instance instead. [ 33s] warnings.warn( [ 33s] [ 33s] test_httpbin.py: 10 warnings [ 33s] /home/abuild/rpmbuild/BUILD/python-httpbin-0.7.0+git20181107.f8ec666/httpbin/core.py:1142: DeprecationWarning: 'parse_authorization_header' is deprecated and will be removed in Werkzeug 2.4. Use 'Authorization.from_header' instead. [ 33s] credentials = parse_authorization_header(authorization) [ 33s] [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth_with_wrong_password [ 33s] test_httpbin.py::HttpbinTestCase::test_digest_auth_wrong_pass [ 33s] /home/abuild/rpmbuild/BUILD/python-httpbin-0.7.0+git20181107.f8ec666/httpbin/helpers.py:359: DeprecationWarning: 'parse_authorization_header' is deprecated and will be removed in Werkzeug 2.4. Use 'Authorization.from_header' instead. [ 33s] credentials = parse_authorization_header(request.headers.get('Authorization')) [ 33s] [ 33s] test_httpbin.py::HttpbinTestCase::test_redirect_to_post [ 33s] /usr/lib/python3.9/site-packages/werkzeug/datastructures/headers.py:330: DeprecationWarning: Passing bytes as a header value is deprecated and will not be supported in Werkzeug 3.0. [ 33s] _value = _str_header_value(_value) [ 33s] [ 33s] -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html [ 33s] =========================== short test summary info ============================ [ 33s] FAILED test_httpbin.py::HttpbinTestCase::test_base64 - AttributeError: 'bytes... [ 33s] FAILED test_httpbin.py::HttpbinTestCase::test_digest_auth - AssertionError: '... [ 33s] FAILED test_httpbin.py::HttpbinTestCase::test_digest_auth_wrong_pass - Assert... [ 33s] ================== 3 failed, 64 passed, 77 warnings in 6.35s =================== [ 33s] error: Bad exit status from /var/tmp/rpm-tmp.8wBBme (%check) [ 33s] [ 33s] RPM build errors: [ 33s] Bad exit status from /var/tmp/rpm-tmp.8wBBme (%check) [ 33s] ### VM INTERACTION START ### [ 33s] [ 27.821857][ T1] sysrq: Power Off [ 33s] [ 27.824441][ T18] reboot: Power down [ 33s] ### VM INTERACTION END ###
This is an autogenerated message for OBS integration: This bug (1212557) was mentioned in https://build.opensuse.org/request/show/1094317 Factory / python-httpbin
Fixed.