==> Building on ceruledge ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list created directory packages/python-prance ./ PKGBUILD 1,673 100% 0.00kB/s 0:00:00 1,673 100% 0.00kB/s 0:00:00 (xfr#1, to-chk=1/3) python-prance-0.22.11.04.0-2.log 360 100% 351.56kB/s 0:00:00 360 100% 351.56kB/s 0:00:00 (xfr#2, to-chk=0/3) sent 1,248 bytes received 102 bytes 2,700.00 bytes/sec total size is 1,869 speedup is 1.38 ==> Running extra-riscv64-build -- -d /home/felix/packages/riscv64-pkg-cache:/var/cache/pacman/pkg -l root0 on remote host... [?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... there is nothing to do [?25h==> Building in chroot for [extra] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [root0]...done ==> Making package: python-prance 0.22.11.04.0-2 (Fri Sep 15 13:26:51 2023) ==> Retrieving sources...  -> Downloading python-prance-0.22.11.04.0.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 100 45823 0 45823 0 0 22030 0 --:--:-- 0:00:02 --:--:-- 22030 100 2740k 0 2740k 0 0 970k 0 --:--:-- 0:00:02 --:--:-- 3627k  -> Downloading OpenAPI-Specification-0f9d3ec7c033fef184ec54e1ffc201b2d61ce023.tar.gz... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 11743 0 11743 0 0 9052 0 --:--:-- 0:00:01 --:--:-- 9052 100 242k 0 242k 0 0 156k 0 --:--:-- 0:00:01 --:--:-- 928k ==> Validating source files with sha512sums... python-prance-0.22.11.04.0.tar.gz ... Passed OpenAPI-Specification-0f9d3ec7c033fef184ec54e1ffc201b2d61ce023.tar.gz ... Passed ==> Making package: python-prance 0.22.11.04.0-2 (Fri Sep 15 13:27:17 2023) ==> Checking runtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (11) New Version Net Change Download Size core/libnsl 2.0.0-3 0.06 MiB core/python 3.11.5-2 107.30 MiB extra/python-idna 3.4-3 0.71 MiB extra/python-ruamel.yaml.clib 0.2.7-2 0.24 MiB 0.12 MiB extra/python-urllib3 1.26.15-1 1.30 MiB extra/python-chardet 5.2.0-1 3.02 MiB extra/python-packaging 23.1-1 0.47 MiB extra/python-requests 2.28.2-4 0.61 MiB extra/python-ruamel-yaml 0.17.32-1 1.81 MiB 0.26 MiB extra/python-semver 3.0.0-1 0.17 MiB 0.03 MiB extra/python-six 1.16.0-8 0.12 MiB Total Download Size: 0.41 MiB Total Installed Size: 115.83 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-ruamel-yaml-0.17.32-1-any downloading... python-ruamel.yaml.clib-0.2.7-2-riscv64 downloading... python-semver-3.0.0-1-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing libnsl... installing python... Optional dependencies for python python-setuptools: for building Python packages using tooling that is usually bundled with Python python-pip: for installing Python packages using tooling that is usually bundled with Python python-pipx: for installing Python software not packaged on Arch Linux sqlite: for a default database integration [installed] mpdecimal: for decimal xz: for lzma [installed] tk: for tkinter installing python-chardet... installing python-ruamel.yaml.clib... installing python-ruamel-yaml... installing python-urllib3... Optional dependencies for python-urllib3 python-brotli: Brotli support python-certifi: security support python-cryptography: security support python-idna: security support [pending] python-pyopenssl: security support python-pysocks: SOCKS support installing python-idna... installing python-requests... Optional dependencies for python-requests python-pysocks: SOCKS proxy support installing python-six... installing python-semver... installing python-packaging... [?25h==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (36) New Version Net Change Download Size extra/libyaml 0.2.5-2 0.15 MiB extra/python-attrs 22.2.0-3 0.55 MiB extra/python-autocommand 2.2.2-4 0.08 MiB extra/python-coverage 6.5.0-5 1.68 MiB extra/python-fastjsonschema 2.18.0-1 0.29 MiB extra/python-inflect 7.0.0-1 0.39 MiB extra/python-iniconfig 2.0.0-4 0.04 MiB extra/python-jaraco.context 4.3.0-3 0.04 MiB extra/python-jaraco.functools 3.9.0-1 0.07 MiB extra/python-jaraco.text 3.11.1-3 0.09 MiB extra/python-jsonschema 4.19.0-1 1.36 MiB extra/python-jsonschema-spec 0.2.3-1 0.10 MiB extra/python-jsonschema-specifications 2023.7.1-1 0.05 MiB extra/python-lazy-object-proxy 1.9.0-3 0.14 MiB extra/python-more-itertools 10.1.0-1 0.63 MiB extra/python-openapi-schema-validator 0.6.0-1 0.07 MiB extra/python-ordered-set 4.1.0-4 0.07 MiB extra/python-pathable 0.4.3-2 0.07 MiB extra/python-platformdirs 3.10.0-1 0.23 MiB extra/python-pluggy 1.3.0-1 0.20 MiB extra/python-pydantic 1.10.9-1 6.57 MiB extra/python-pyrsistent 0.19.3-3 0.63 MiB extra/python-pytest 7.4.2-1 4.01 MiB extra/python-referencing 0.30.2-1 0.39 MiB extra/python-rfc3339-validator 0.1.4-4 0.01 MiB extra/python-rpds-py 0.9.2-1 0.51 MiB extra/python-tomli 2.0.1-3 0.11 MiB extra/python-trove-classifiers 2023.8.7-1 0.11 MiB extra/python-typing_extensions 4.7.1-1 0.37 MiB extra/python-validate-pyproject 0.13-1 0.29 MiB extra/python-yaml 6.0.1-2 0.91 MiB extra/python-click 8.1.7-1 1.24 MiB extra/python-openapi-spec-validator 0.6.0-1 0.26 MiB extra/python-pyicu 2.11-2 1.16 MiB 0.28 MiB extra/python-pytest-cov 4.1.0-1 0.16 MiB 0.04 MiB extra/python-setuptools 1:68.0.0-1 4.64 MiB Total Download Size: 0.32 MiB Total Installed Size: 27.66 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-pyicu-2.11-2-riscv64 downloading... python-pytest-cov-4.1.0-1-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-more-itertools... installing python-jaraco.functools... installing python-jaraco.context... installing python-autocommand... installing python-typing_extensions... installing python-pydantic... Optional dependencies for python-pydantic python-dotenv: for .env file support python-email-validator: for email validation installing python-inflect... installing python-jaraco.text... installing python-ordered-set... installing python-platformdirs... installing python-tomli... installing python-fastjsonschema... installing python-trove-classifiers... installing python-validate-pyproject... installing python-setuptools... installing python-coverage... Optional dependencies for python-coverage python-tomli: for pyproject.toml support [installed] installing python-iniconfig... installing python-pluggy... installing python-pytest... installing python-pytest-cov... installing python-click... installing python-pyicu... installing python-attrs... installing python-pyrsistent... installing python-rpds-py... installing python-referencing... installing python-jsonschema-specifications... installing python-jsonschema... Optional dependencies for python-jsonschema python-isoduration: for duration format python-fqdn: for hostname format python-idna: for idn-hostname format [installed] python-jsonpointer: for json-pointer & relative-json-pointer format python-rfc3339-validator: for date-time format [pending] python-rfc3987: for iri, iri-reference, uri & uri-reference format python-uri-template: for uri-template format python-webcolors: for color format installing python-rfc3339-validator... installing python-openapi-schema-validator... installing python-pathable... installing libyaml... installing python-yaml... installing python-jsonschema-spec... installing python-lazy-object-proxy... installing python-openapi-spec-validator... [?25h==> Retrieving sources...  -> Found python-prance-0.22.11.04.0.tar.gz  -> Found OpenAPI-Specification-0f9d3ec7c033fef184ec54e1ffc201b2d61ce023.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting python-prance-0.22.11.04.0.tar.gz with bsdtar  -> Extracting OpenAPI-Specification-0f9d3ec7c033fef184ec54e1ffc201b2d61ce023.tar.gz with bsdtar ==> Starting prepare()... ==> Starting build()... running build running build_py creating build creating build/lib creating build/lib/prance copying prance/__init__.py -> build/lib/prance copying prance/cli.py -> build/lib/prance copying prance/convert.py -> build/lib/prance copying prance/mixins.py -> build/lib/prance creating build/lib/prance/util copying prance/util/__init__.py -> build/lib/prance/util copying prance/util/exceptions.py -> build/lib/prance/util copying prance/util/formats.py -> build/lib/prance/util copying prance/util/fs.py -> build/lib/prance/util copying prance/util/iterators.py -> build/lib/prance/util copying prance/util/path.py -> build/lib/prance/util copying prance/util/resolver.py -> build/lib/prance/util copying prance/util/translator.py -> build/lib/prance/util copying prance/util/url.py -> build/lib/prance/util running egg_info creating prance.egg-info writing prance.egg-info/PKG-INFO writing dependency_links to prance.egg-info/dependency_links.txt writing entry points to prance.egg-info/entry_points.txt writing requirements to prance.egg-info/requires.txt writing top-level names to prance.egg-info/top_level.txt writing manifest file 'prance.egg-info/SOURCES.txt' reading manifest file 'prance.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '__pycache__' found anywhere in distribution warning: no previously-included files matching '*.py[co]' found anywhere in distribution warning: no previously-included files matching '.token' found anywhere in distribution warning: no previously-included files matching '.*.sw*' found anywhere in distribution no previously-included directories found matching 'docs/source/api' adding license file 'LICENSE.txt' writing manifest file 'prance.egg-info/SOURCES.txt' ==> Starting check()... ============================= test session starts ============================== platform linux -- Python 3.11.5, pytest-7.4.2, pluggy-1.3.0 -- /usr/bin/python cachedir: .pytest_cache rootdir: /build/python-prance/src/prance-0.22.11.04.0 configfile: setup.cfg testpaths: tests plugins: cov-4.1.0 collecting ... collected 207 items tests/test_backends.py::test_bad_backend PASSED [ 0%] tests/test_backends.py::test_flex_issue_5_integer_keys SKIPPED (Miss...) [ 0%] tests/test_backends.py::test_flex_validate_success SKIPPED (Missing ...) [ 1%] tests/test_backends.py::test_flex_validate_failure SKIPPED (Missing ...) [ 1%] tests/test_backends.py::test_swagger_spec_validator_issue_5_integer_keys SKIPPED [ 2%] tests/test_backends.py::test_swagger_spec_validator_validate_success SKIPPED [ 2%] tests/test_backends.py::test_swagger_spec_validator_validate_failure SKIPPED [ 3%] tests/test_backends.py::test_openapi_spec_validator_issue_5_integer_keys PASSED [ 3%] tests/test_backends.py::test_openapi_spec_validator_issue_36_error_reporting PASSED [ 4%] tests/test_backends.py::test_openapi_spec_validator_validate_success PASSED [ 4%] tests/test_backends.py::test_openapi_spec_validator_validate_failure FAILED [ 5%] tests/test_backends.py::test_openapi_spec_validator_issue_20_spec_version_handling PASSED [ 5%] tests/test_base_parser.py::test_load_fail PASSED [ 6%] tests/test_base_parser.py::test_parse_fail PASSED [ 6%] tests/test_base_parser.py::test_version_fail PASSED [ 7%] tests/test_base_parser.py::test_filename_or_spec PASSED [ 7%] tests/test_base_parser.py::test_load_and_parse_valid PASSED [ 8%] tests/test_base_parser.py::test_load_and_parse_lazy PASSED [ 8%] tests/test_base_parser.py::test_yaml_valid PASSED [ 9%] tests/test_base_parser.py::test_json_valid PASSED [ 9%] tests/test_base_parser.py::test_cache_specs_mixin PASSED [ 10%] tests/test_base_parser.py::test_relative_urls_from_string PASSED [ 10%] tests/test_cli.py::test_validate_defaults PASSED [ 11%] tests/test_cli.py::test_validate_multiple PASSED [ 11%] tests/test_cli.py::test_validate_no_resolve PASSED [ 12%] tests/test_cli.py::test_validate_output_too_many_inputs PASSED [ 12%] tests/test_cli.py::test_validate_output PASSED [ 13%] tests/test_cli.py::test_compile_defaults PASSED [ 13%] tests/test_cli.py::test_compile_output PASSED [ 14%] tests/test_cli.py::test_convert_defaults FAILED [ 14%] tests/test_cli.py::test_convert_output FAILED [ 14%] tests/test_convert.py::test_convert_petstore_yaml FAILED [ 15%] tests/test_convert.py::test_convert_petstore_json FAILED [ 15%] tests/test_convert.py::test_convert_petstore_yaml_explicit_name FAILED [ 16%] tests/test_convert.py::test_convert_url FAILED [ 16%] tests/test_convert.py::test_convert_spec XFAIL [ 17%] tests/test_convert.py::test_convert_parser_lazy_swagger_backend XFAIL [ 17%] tests/test_convert.py::test_convert_parser_validated FAILED [ 18%] tests/test_resolving_parser.py::test_basics PASSED [ 18%] tests/test_resolving_parser.py::test_petstore_resolve PASSED [ 19%] tests/test_resolving_parser.py::test_with_externals_resolve PASSED [ 19%] tests/test_resolving_parser.py::test_relative_urls_from_string PASSED [ 20%] tests/test_resolving_parser.py::test_issue_1_relative_path_references PASSED [ 20%] tests/test_resolving_parser.py::test_issue_39_sequence_indices PASSED [ 21%] tests/test_resolving_parser.py::test_issue_51_encoding_error PASSED [ 21%] tests/test_resolving_parser.py::test_issue_65_partial_resolution_files PASSED [ 22%] tests/test_resolving_parser.py::test_issue_83_skip_propagation PASSED [ 22%] tests/test_resolving_parser.py::test_value_not_converted_to_boolean PASSED [ 23%] tests/test_translating_parser.py::test_local_reference_from_root PASSED [ 23%] tests/test_translating_parser.py::test_file_reference_from_root PASSED [ 24%] tests/test_translating_parser.py::test_local_reference_from_file PASSED [ 24%] tests/test_translating_parser.py::test_same_file_reference_from_file PASSED [ 25%] tests/test_translating_parser.py::test_different_file_reference_from_file PASSED [ 25%] tests/test_translating_parser.py::test_root_file_reference_from_file PASSED [ 26%] tests/test_translating_parser.py::test_root_file_reference_from_root PASSED [ 26%] tests/test_translating_parser.py::test_recursive_reference_in_root PASSED [ 27%] tests/test_translating_parser.py::test_recursive_reference_in_file PASSED [ 27%] tests/test_translating_parser.py::test_nested_recursive_reference_in_file PASSED [ 28%] tests/test_util.py::test_stringify_keys PASSED [ 28%] tests/test_util_exceptions.py::test_reraise_without_value_no_extra_message PASSED [ 28%] tests/test_util_exceptions.py::test_reraise_without_value_extra_message PASSED [ 29%] tests/test_util_exceptions.py::test_reraise_with_value_no_extra_message PASSED [ 29%] tests/test_util_exceptions.py::test_reraise_with_value_extra_message PASSED [ 30%] tests/test_util_exceptions.py::test_reraise_with_empty_value_string_extra_message PASSED [ 30%] tests/test_util_formats.py::test_format_info_yaml PASSED [ 31%] tests/test_util_formats.py::test_format_info_json PASSED [ 31%] tests/test_util_formats.py::test_format_info_bad_format PASSED [ 32%] tests/test_util_formats.py::test_parse_details_yaml PASSED [ 32%] tests/test_util_formats.py::test_parse_yaml PASSED [ 33%] tests/test_util_formats.py::test_parse_yaml_ctype PASSED [ 33%] tests/test_util_formats.py::test_parse_json PASSED [ 34%] tests/test_util_formats.py::test_parse_json_ctype PASSED [ 34%] tests/test_util_formats.py::test_parse_unknown PASSED [ 35%] tests/test_util_formats.py::test_parse_unknown_ext PASSED [ 35%] tests/test_util_formats.py::test_parse_unknown_ctype PASSED [ 36%] tests/test_util_formats.py::test_serialize_json PASSED [ 36%] tests/test_util_formats.py::test_serialize_yaml PASSED [ 37%] tests/test_util_formats.py::test_serialize_json_ctype PASSED [ 37%] tests/test_util_formats.py::test_serialize_yaml_ctype PASSED [ 38%] tests/test_util_fs.py::test_canonical PASSED [ 38%] tests/test_util_fs.py::test_to_posix_rel PASSED [ 39%] tests/test_util_fs.py::test_to_posix_abs_posix PASSED [ 39%] tests/test_util_fs.py::test_to_posix_abs_win32 SKIPPED (Skip on !win32) [ 40%] tests/test_util_fs.py::test_from_posix_rel PASSED [ 40%] tests/test_util_fs.py::test_from_posix_abs_posix PASSED [ 41%] tests/test_util_fs.py::test_from_posix_abs_win32 SKIPPED (Skip on !w...) [ 41%] tests/test_util_fs.py::test_abspath_basics PASSED [ 42%] tests/test_util_fs.py::test_abspath_relative PASSED [ 42%] tests/test_util_fs.py::test_abspath_relative_dir PASSED [ 42%] tests/test_util_fs.py::test_detect_encoding PASSED [ 43%] tests/test_util_fs.py::test_issue_51_detect_encoding PASSED [ 43%] tests/test_util_fs.py::test_load_nobom PASSED [ 44%] tests/test_util_fs.py::test_load_utf8bom PASSED [ 44%] tests/test_util_fs.py::test_load_utf8bom_override PASSED [ 45%] tests/test_util_fs.py::test_write_file PASSED [ 45%] tests/test_util_fs.py::test_write_file_bom PASSED [ 46%] tests/test_util_fs.py::test_valid_pathname PASSED [ 46%] tests/test_util_iterators.py::test_item_iterator PASSED [ 47%] tests/test_util_iterators.py::test_item_iterator_empty PASSED [ 47%] tests/test_util_iterators.py::test_reference_iterator_empty_dict PASSED [ 48%] tests/test_util_iterators.py::test_reference_iterator_dict_without_references PASSED [ 48%] tests/test_util_iterators.py::test_reference_iterator_dict_with_references PASSED [ 49%] tests/test_util_path.py::test_get_bad_path PASSED [ 49%] tests/test_util_path.py::test_get_value_default PASSED [ 50%] tests/test_util_path.py::test_get_value_no_default PASSED [ 50%] tests/test_util_path.py::test_get_collection_default PASSED [ 51%] tests/test_util_path.py::test_get_collection_no_default PASSED [ 51%] tests/test_util_path.py::test_get_mapping_default PASSED [ 52%] tests/test_util_path.py::test_set_bad_path PASSED [ 52%] tests/test_util_path.py::test_set_value PASSED [ 53%] tests/test_util_path.py::test_set_sequence_no_create PASSED [ 53%] tests/test_util_path.py::test_set_sequence_create PASSED [ 54%] tests/test_util_path.py::test_set_mapping_no_create PASSED [ 54%] tests/test_util_path.py::test_set_mapping_create PASSED [ 55%] tests/test_util_path.py::test_set_mixed_no_create PASSED [ 55%] tests/test_util_path.py::test_set_mixed_create PASSED [ 56%] tests/test_util_path.py::test_set_mixed_create_no_fill PASSED [ 56%] tests/test_util_path.py::test_get_informative_key_error PASSED [ 57%] tests/test_util_path.py::test_get_informative_index_error PASSED [ 57%] tests/test_util_resolver.py::test_resolver_noname PASSED [ 57%] tests/test_util_resolver.py::test_resolver_named PASSED [ 58%] tests/test_util_resolver.py::test_resolver_missing_reference PASSED [ 58%] tests/test_util_resolver.py::test_resolver_recursive_objects PASSED [ 59%] tests/test_util_resolver.py::test_resolver_recursive_files PASSED [ 59%] tests/test_util_resolver.py::test_recursion_limit_do_not_recurse_raise PASSED [ 60%] tests/test_util_resolver.py::test_recursion_limit_do_not_recurse_ignore PASSED [ 60%] tests/test_util_resolver.py::test_recursion_limit_set_limit_ignore PASSED [ 61%] tests/test_util_resolver.py::test_recursion_limit_do_not_recurse_raise_files PASSED [ 61%] tests/test_util_resolver.py::test_recursion_limit_do_not_recurse_ignore_files PASSED [ 62%] tests/test_util_resolver.py::test_recursion_limit_set_limit_ignore_files PASSED [ 62%] tests/test_util_resolver.py::test_issue_22_empty_path PASSED [ 63%] tests/test_util_resolver.py::test_issue_38_tilde_one PASSED [ 63%] tests/test_util_resolver.py::test_issue_23_partial_resolution_all PASSED [ 64%] tests/test_util_resolver.py::test_issue_23_partial_resolution_internal PASSED [ 64%] tests/test_util_resolver.py::test_issue_23_partial_resolution_files PASSED [ 65%] tests/test_util_resolver.py::test_issue_65_partial_resolution_files PASSED [ 65%] tests/test_util_resolver.py::test_issue_23_partial_resolution_http PASSED [ 66%] tests/test_util_resolver.py::test_issue_23_partial_resolution_invalid_scheme PASSED [ 66%] tests/test_util_resolver.py::test_issue_69_urlparse_error PASSED [ 67%] tests/test_util_resolver.py::test_issue_72_nonexistent_file_error PASSED [ 67%] tests/test_util_resolver.py::test_issue_78_resolve_internal_bug PASSED [ 68%] tests/test_util_resolver.py::test_issue_77_translate_external PASSED [ 68%] tests/test_util_resolver.py::test_issue_77_translate_external_refs_internal PASSED [ 69%] tests/test_util_resolver.py::test_issue_77_internal_refs_unresolved PASSED [ 69%] tests/test_util_resolver.py::test_issue_205_swagger_resolution_failure XFAIL [ 70%] tests/test_util_resolver.py::test_resolve_package_ref PASSED [ 70%] tests/test_util_url.py::test_absurl_http PASSED [ 71%] tests/test_util_url.py::test_absurl_http_fragment PASSED [ 71%] tests/test_util_url.py::test_absurl_file_posix PASSED [ 71%] tests/test_util_url.py::test_absurl_file_win32 SKIPPED (Skip on !win32) [ 72%] tests/test_util_url.py::test_absurl_absfile_posix PASSED [ 72%] tests/test_util_url.py::test_absurl_absfile_win32 SKIPPED (Skip on !...) [ 73%] tests/test_util_url.py::test_absurl_fragment PASSED [ 73%] tests/test_util_url.py::test_absurl_relfile PASSED [ 74%] tests/test_util_url.py::test_absurl_paths_posix PASSED [ 74%] tests/test_util_url.py::test_absurl_paths_win32 SKIPPED (Skip on !win32) [ 75%] tests/test_util_url.py::test_urlresource PASSED [ 75%] tests/test_util_url.py::test_split_url_reference PASSED [ 76%] tests/test_util_url.py::test_fetch_url_file PASSED [ 76%] tests/test_util_url.py::test_fetch_url_cached PASSED [ 77%] tests/test_util_url.py::test_fetch_url_text_cached PASSED [ 77%] tests/test_util_url.py::test_fetch_url_http PASSED [ 78%] tests/test_util_url.py::test_fetch_url_python PASSED [ 78%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_json_api_with_examples XPASS [ 79%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_json_petstore_expanded XPASS [ 79%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_json_petstore_minimal XPASS [ 80%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_json_petstore_simple XPASS [ 80%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_json_petstore_with_external_docs XPASS [ 81%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_json_petstore XPASS [ 81%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_json_uber XPASS [ 82%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_yaml_api_with_examples XPASS [ 82%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_yaml_petstore_expanded XPASS [ 83%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_yaml_petstore_minimal XPASS [ 83%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_yaml_petstore_simple XPASS [ 84%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_yaml_petstore_with_external_docs XPASS [ 84%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_yaml_petstore XPASS [ 85%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v20_yaml_uber XPASS [ 85%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v30_yaml_api_with_examples XPASS [ 85%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v30_yaml_callback_example XPASS [ 86%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v30_yaml_link_example XPASS [ 86%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v30_yaml_petstore_expanded XPASS [ 87%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v30_yaml_petstore XPASS [ 87%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v30_yaml_uspto XPASS [ 88%] tests/test_zzz_specs.py::test_BaseParser_openapi_spec_validator_v31_yaml_webhook_example XPASS [ 88%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_json_api_with_examples XPASS [ 89%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_json_petstore_expanded XPASS [ 89%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_json_petstore_minimal XPASS [ 90%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_json_petstore_separate XPASS [ 90%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_json_petstore_simple XPASS [ 91%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_json_petstore_with_external_docs XPASS [ 91%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_json_petstore XPASS [ 92%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_json_uber XPASS [ 92%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_yaml_api_with_examples XPASS [ 93%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_yaml_petstore_expanded XPASS [ 93%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_yaml_petstore_minimal XPASS [ 94%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_yaml_petstore_separate XPASS [ 94%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_yaml_petstore_simple XPASS [ 95%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_yaml_petstore_with_external_docs XPASS [ 95%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_yaml_petstore XPASS [ 96%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v20_yaml_uber XPASS [ 96%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v30_yaml_api_with_examples XPASS [ 97%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v30_yaml_callback_example XPASS [ 97%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v30_yaml_link_example XPASS [ 98%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v30_yaml_petstore_expanded XPASS [ 98%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v30_yaml_petstore XPASS [ 99%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v30_yaml_uspto XPASS [ 99%] tests/test_zzz_specs.py::test_ResolvingParser_openapi_spec_validator_v31_yaml_webhook_example XPASS [100%] =================================== FAILURES =================================== _________________ test_openapi_spec_validator_validate_failure _________________ self = , uri = 'definitions.yaml' def get_or_retrieve(self, uri: URI) -> Retrieved[D, Resource[D]]: """ Get a resource from the registry, crawling or retrieving if necessary. May involve crawling to find the given URI if it is not already known, so the returned object is a `Retrieved` object which contains both the resource value as well as the registry which ultimately contained it. """ resource = self._resources.get(uri) if resource is not None: return Retrieved(registry=self, value=resource) registry = self.crawl() resource = registry._resources.get(uri) if resource is not None: return Retrieved(registry=registry, value=resource) try: > resource = registry._retrieve(uri) /usr/lib/python3.11/site-packages/referencing/_core.py:336: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.11/site-packages/jsonschema_spec/retrievers.py:44: in __call__ with urlopen(uri) as url: /usr/lib/python3.11/urllib/request.py:216: in urlopen return opener.open(url, data, timeout) /usr/lib/python3.11/urllib/request.py:503: in open req = Request(fullurl, data) /usr/lib/python3.11/urllib/request.py:322: in __init__ self.full_url = url /usr/lib/python3.11/urllib/request.py:348: in full_url self._parse() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def _parse(self): self.type, rest = _splittype(self._full_url) if self.type is None: > raise ValueError("unknown url type: %r" % self.full_url) E ValueError: unknown url type: 'definitions.yaml' /usr/lib/python3.11/urllib/request.py:377: ValueError During handling of the above exception, another exception occurred: self = Resolver(_base_uri='', _registry=) ref = 'definitions.yaml#/Pets' def lookup(self, ref: URI) -> Resolved[D]: """ Resolve the given reference to the resource it points to. Raises: `exceptions.Unresolvable` or a subclass thereof (see below) if the reference isn't resolvable `exceptions.NoSuchAnchor` if the reference is to a URI where a resource exists but contains a plain name fragment which does not exist within the resource `exceptions.PointerToNowhere` if the reference is to a URI where a resource exists but contains a JSON pointer to a location within the resource that does not exist """ if ref.startswith("#"): uri, fragment = self._base_uri, ref[1:] else: uri, fragment = urldefrag(urljoin(self._base_uri, ref)) try: > retrieved = self._registry.get_or_retrieve(uri) /usr/lib/python3.11/site-packages/referencing/_core.py:586: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , uri = 'definitions.yaml' def get_or_retrieve(self, uri: URI) -> Retrieved[D, Resource[D]]: """ Get a resource from the registry, crawling or retrieving if necessary. May involve crawling to find the given URI if it is not already known, so the returned object is a `Retrieved` object which contains both the resource value as well as the registry which ultimately contained it. """ resource = self._resources.get(uri) if resource is not None: return Retrieved(registry=self, value=resource) registry = self.crawl() resource = registry._resources.get(uri) if resource is not None: return Retrieved(registry=registry, value=resource) try: resource = registry._retrieve(uri) except ( exceptions.CannotDetermineSpecification, exceptions.NoSuchResource, ): raise except Exception: > raise exceptions.Unretrievable(ref=uri) E referencing.exceptions.Unretrievable: 'definitions.yaml' /usr/lib/python3.11/site-packages/referencing/_core.py:343: Unretrievable During handling of the above exception, another exception occurred: @pytest.mark.skipif( none_of("openapi-spec-validator"), reason="Missing dependencies: openapi-spec-validator", ) def test_openapi_spec_validator_validate_failure(): with pytest.raises(ValidationError): > parser = BaseParser( "tests/specs/missing_reference.yaml", backend="openapi-spec-validator" ) tests/test_backends.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ prance/__init__.py:118: in __init__ self.parse() prance/__init__.py:148: in parse self._validate() prance/__init__.py:187: in _validate validator(parsed) prance/__init__.py:248: in _validate_openapi_spec_validator validate_spec(self.specification) /usr/lib/python3.11/site-packages/openapi_spec_validator/shortcuts.py:19: in validate_spec return validator.validate(spec, base_uri=base_uri, spec_url=spec_url) /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/proxies.py:31: in validate for err in validator.iter_errors( /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/decorators.py:22: in wrapper for err in errors: /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/validators.py:107: in iter_errors yield from self._iter_paths_errors(paths) /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/validators.py:117: in _iter_paths_errors yield from self._iter_path_errors(url, path_item) /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/validators.py:131: in _iter_path_errors yield from self._iter_operation_errors( /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/validators.py:156: in _iter_operation_errors yield from self._iter_responses_errors(responses) /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/validators.py:183: in _iter_responses_errors yield from self._iter_response_errors(response_code, response) /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/validators.py:191: in _iter_response_errors yield from self._iter_schema_errors(schema) /usr/lib/python3.11/site-packages/openapi_spec_validator/validation/validators.py:261: in _iter_schema_errors if not hasattr(schema.content(), "__getitem__"): /usr/lib/python3.11/site-packages/pathable/paths.py:213: in content with self.open() as d: /usr/lib/python3.11/contextlib.py:137: in __enter__ return next(self.gen) /usr/lib/python3.11/site-packages/jsonschema_spec/paths.py:103: in open with self.resolve() as resolved: /usr/lib/python3.11/contextlib.py:137: in __enter__ return next(self.gen) /usr/lib/python3.11/site-packages/jsonschema_spec/paths.py:111: in resolve self._resolved_cached = self._get_resolved() /usr/lib/python3.11/site-packages/jsonschema_spec/paths.py:116: in _get_resolved with self.accessor.resolve(self.parts) as resolved: /usr/lib/python3.11/contextlib.py:137: in __enter__ return next(self.gen) /usr/lib/python3.11/site-packages/jsonschema_spec/accessors.py:64: in resolve yield self._resolve(self.lookup, parts_deque) /usr/lib/python3.11/site-packages/jsonschema_spec/accessors.py:88: in _resolve return self._resolve(target, parts_deque, resolver=resolver) /usr/lib/python3.11/site-packages/jsonschema_spec/accessors.py:88: in _resolve return self._resolve(target, parts_deque, resolver=resolver) /usr/lib/python3.11/site-packages/jsonschema_spec/accessors.py:88: in _resolve return self._resolve(target, parts_deque, resolver=resolver) /usr/lib/python3.11/site-packages/jsonschema_spec/accessors.py:88: in _resolve return self._resolve(target, parts_deque, resolver=resolver) /usr/lib/python3.11/site-packages/jsonschema_spec/accessors.py:88: in _resolve return self._resolve(target, parts_deque, resolver=resolver) /usr/lib/python3.11/site-packages/jsonschema_spec/accessors.py:88: in _resolve return self._resolve(target, parts_deque, resolver=resolver) /usr/lib/python3.11/site-packages/jsonschema_spec/accessors.py:77: in _resolve resolved = resolver.lookup(ref) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Resolver(_base_uri='', _registry=) ref = 'definitions.yaml#/Pets' def lookup(self, ref: URI) -> Resolved[D]: """ Resolve the given reference to the resource it points to. Raises: `exceptions.Unresolvable` or a subclass thereof (see below) if the reference isn't resolvable `exceptions.NoSuchAnchor` if the reference is to a URI where a resource exists but contains a plain name fragment which does not exist within the resource `exceptions.PointerToNowhere` if the reference is to a URI where a resource exists but contains a JSON pointer to a location within the resource that does not exist """ if ref.startswith("#"): uri, fragment = self._base_uri, ref[1:] else: uri, fragment = urldefrag(urljoin(self._base_uri, ref)) try: retrieved = self._registry.get_or_retrieve(uri) except exceptions.NoSuchResource: raise exceptions.Unresolvable(ref=ref) from None except exceptions.Unretrievable: > raise exceptions.Unresolvable(ref=ref) E referencing.exceptions.Unresolvable: definitions.yaml#/Pets /usr/lib/python3.11/site-packages/referencing/_core.py:590: Unresolvable ____________________________ test_convert_defaults _____________________________ runner = @pytest.mark.skipif(none_of("click"), reason="Click does not exist") @pytest.mark.requires_network() def test_convert_defaults(runner): from prance import cli # Good example result = runner.invoke(cli.convert, ["tests/specs/petstore.yaml"]) > assert result.exit_code == 0 E AssertionError: assert 1 == 0 E + where 1 = .exit_code tests/test_cli.py:179: AssertionError _____________________________ test_convert_output ______________________________ runner = @pytest.mark.skipif(none_of("click"), reason="Click does not exist") @pytest.mark.requires_network() def test_convert_output(runner): from prance import cli import os, os.path curdir = os.getcwd() outnames = ["foo.json", "foo.yaml"] for outname in outnames: with runner.isolated_filesystem(): result = runner.invoke( cli.convert, [os.path.join(curdir, "tests/specs/petstore.yaml"), outname], ) > assert result.exit_code == 0 E AssertionError: assert 1 == 0 E + where 1 = .exit_code tests/test_cli.py:205: AssertionError __________________________ test_convert_petstore_yaml __________________________ petstore_yaml = 'swagger: "2.0"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:\n name: MIT\nhost: petstore.swagger...ge\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n' @pytest.mark.requires_network() def test_convert_petstore_yaml(petstore_yaml): > converted, content_type = convert.convert_str(petstore_yaml) tests/test_convert.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ spec_str = 'swagger: "2.0"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:\n name: MIT\nhost: petstore.swagger...ge\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n' filename = None, kwargs = {} parse_spec_details = spec = {'basePath': '/v1', 'consumes': ['application/json'], 'definitions': {'Error': {'properties': {'code': {'format': 'int...pe': 'object'}, 'Pets': {'items': {'$ref': '#/definitions/Pet'}, 'type': 'array'}}, 'host': 'petstore.swagger.io', ...} content_type = 'application/x-yaml', extension = '.yaml' data = {'filename': 'openapi.yaml', 'source': 'swagger: "2.0"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:...e\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n'} headers = {'accept': 'application/x-yaml; charset=utf-8'} requests = def convert_str(spec_str, filename=None, **kwargs): """ Convert the serialized spec. We parse the spec first to ensure there is no parse error, then send it off to the API for conversion. :param str spec_str: The specifications as string. :param str filename: [optional] Filename to determine the format from. :param str content_type: [optional] Content type to determine the format from. :return: The converted spec and content type. :rtype: tuple :raises ParseError: when parsing fails. :raises ConversionError: when conversion fails. """ # Parse, but discard the results. The function raises parse error. from .util.formats import parse_spec_details spec, content_type, extension = parse_spec_details(spec_str, filename, **kwargs) # Ok, parsing went fine, so let's convert. data = { "source": spec_str, } if filename is not None: data["filename"] = filename else: data["filename"] = f"openapi{extension}" headers = {"accept": f"{content_type}; charset=utf-8"} # Convert via API import requests r = requests.post( "https://mermade.org.uk/api/v1/convert", data=data, headers=headers ) if not r.ok: # pragma: nocover > raise ConversionError( "Could not convert spec: %d %s" % (r.status_code, r.reason) ) E prance.convert.ConversionError: Could not convert spec: 502 Bad Gateway prance/convert.py:56: ConversionError __________________________ test_convert_petstore_json __________________________ petstore_json = '{\n "swagger": "2.0",\n "info": {\n "version": "1.0.0",\n "title": "Swagger Petstore",\n "license": {\n ... "format": "int32"\n },\n "message": {\n "type": "string"\n }\n }\n }\n }\n}' @pytest.mark.requires_network() def test_convert_petstore_json(petstore_json): > converted, content_type = convert.convert_str(petstore_json) tests/test_convert.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ spec_str = '{\n "swagger": "2.0",\n "info": {\n "version": "1.0.0",\n "title": "Swagger Petstore",\n "license": {\n ... "format": "int32"\n },\n "message": {\n "type": "string"\n }\n }\n }\n }\n}' filename = None, kwargs = {} parse_spec_details = spec = {'basePath': '/v1', 'consumes': ['application/json'], 'definitions': {'Error': {'properties': {'code': {'format': 'int...'id', 'name']}, 'Pets': {'items': {'$ref': '#/definitions/Pet'}, 'type': 'array'}}, 'host': 'petstore.swagger.io', ...} content_type = 'application/json', extension = '.json' data = {'filename': 'openapi.json', 'source': '{\n "swagger": "2.0",\n "info": {\n "version": "1.0.0",\n "title": "Sw... "format": "int32"\n },\n "message": {\n "type": "string"\n }\n }\n }\n }\n}'} headers = {'accept': 'application/json; charset=utf-8'} requests = def convert_str(spec_str, filename=None, **kwargs): """ Convert the serialized spec. We parse the spec first to ensure there is no parse error, then send it off to the API for conversion. :param str spec_str: The specifications as string. :param str filename: [optional] Filename to determine the format from. :param str content_type: [optional] Content type to determine the format from. :return: The converted spec and content type. :rtype: tuple :raises ParseError: when parsing fails. :raises ConversionError: when conversion fails. """ # Parse, but discard the results. The function raises parse error. from .util.formats import parse_spec_details spec, content_type, extension = parse_spec_details(spec_str, filename, **kwargs) # Ok, parsing went fine, so let's convert. data = { "source": spec_str, } if filename is not None: data["filename"] = filename else: data["filename"] = f"openapi{extension}" headers = {"accept": f"{content_type}; charset=utf-8"} # Convert via API import requests r = requests.post( "https://mermade.org.uk/api/v1/convert", data=data, headers=headers ) if not r.ok: # pragma: nocover > raise ConversionError( "Could not convert spec: %d %s" % (r.status_code, r.reason) ) E prance.convert.ConversionError: Could not convert spec: 502 Bad Gateway prance/convert.py:56: ConversionError ___________________ test_convert_petstore_yaml_explicit_name ___________________ petstore_yaml = 'swagger: "2.0"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:\n name: MIT\nhost: petstore.swagger...ge\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n' @pytest.mark.requires_network() def test_convert_petstore_yaml_explicit_name(petstore_yaml): > converted, content_type = convert.convert_str(petstore_yaml, filename="foo.yml") tests/test_convert.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ spec_str = 'swagger: "2.0"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:\n name: MIT\nhost: petstore.swagger...ge\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n' filename = 'foo.yml', kwargs = {} parse_spec_details = spec = {'basePath': '/v1', 'consumes': ['application/json'], 'definitions': {'Error': {'properties': {'code': {'format': 'int...pe': 'object'}, 'Pets': {'items': {'$ref': '#/definitions/Pet'}, 'type': 'array'}}, 'host': 'petstore.swagger.io', ...} content_type = 'application/x-yaml', extension = '.yaml' data = {'filename': 'foo.yml', 'source': 'swagger: "2.0"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:\n ...e\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n'} headers = {'accept': 'application/x-yaml; charset=utf-8'} requests = def convert_str(spec_str, filename=None, **kwargs): """ Convert the serialized spec. We parse the spec first to ensure there is no parse error, then send it off to the API for conversion. :param str spec_str: The specifications as string. :param str filename: [optional] Filename to determine the format from. :param str content_type: [optional] Content type to determine the format from. :return: The converted spec and content type. :rtype: tuple :raises ParseError: when parsing fails. :raises ConversionError: when conversion fails. """ # Parse, but discard the results. The function raises parse error. from .util.formats import parse_spec_details spec, content_type, extension = parse_spec_details(spec_str, filename, **kwargs) # Ok, parsing went fine, so let's convert. data = { "source": spec_str, } if filename is not None: data["filename"] = filename else: data["filename"] = f"openapi{extension}" headers = {"accept": f"{content_type}; charset=utf-8"} # Convert via API import requests r = requests.post( "https://mermade.org.uk/api/v1/convert", data=data, headers=headers ) if not r.ok: # pragma: nocover > raise ConversionError( "Could not convert spec: %d %s" % (r.status_code, r.reason) ) E prance.convert.ConversionError: Could not convert spec: 502 Bad Gateway prance/convert.py:56: ConversionError _______________________________ test_convert_url _______________________________ @pytest.mark.requires_network() def test_convert_url(): from prance.util import url > converted, content_type = convert.convert_url( url.absurl("python://tests/specs/petstore.yaml") ) tests/test_convert.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ prance/convert.py:79: in convert_url return convert_str(content, None, content_type=content_type) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ spec_str = 'swagger: "2.0"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:\n name: MIT\nhost: petstore.swagger...ge\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n' filename = None, kwargs = {'content_type': None} parse_spec_details = spec = {'basePath': '/v1', 'consumes': ['application/json'], 'definitions': {'Error': {'properties': {'code': {'format': 'int...'id', 'name']}, 'Pets': {'items': {'$ref': '#/definitions/Pet'}, 'type': 'array'}}, 'host': 'petstore.swagger.io', ...} content_type = 'application/x-yaml', extension = '.yaml' data = {'filename': 'openapi.yaml', 'source': 'swagger: "2.0"\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:...e\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n'} headers = {'accept': 'application/x-yaml; charset=utf-8'} requests = def convert_str(spec_str, filename=None, **kwargs): """ Convert the serialized spec. We parse the spec first to ensure there is no parse error, then send it off to the API for conversion. :param str spec_str: The specifications as string. :param str filename: [optional] Filename to determine the format from. :param str content_type: [optional] Content type to determine the format from. :return: The converted spec and content type. :rtype: tuple :raises ParseError: when parsing fails. :raises ConversionError: when conversion fails. """ # Parse, but discard the results. The function raises parse error. from .util.formats import parse_spec_details spec, content_type, extension = parse_spec_details(spec_str, filename, **kwargs) # Ok, parsing went fine, so let's convert. data = { "source": spec_str, } if filename is not None: data["filename"] = filename else: data["filename"] = f"openapi{extension}" headers = {"accept": f"{content_type}; charset=utf-8"} # Convert via API import requests r = requests.post( "https://mermade.org.uk/api/v1/convert", data=data, headers=headers ) if not r.ok: # pragma: nocover > raise ConversionError( "Could not convert spec: %d %s" % (r.status_code, r.reason) ) E prance.convert.ConversionError: Could not convert spec: 502 Bad Gateway prance/convert.py:56: ConversionError ________________________ test_convert_parser_validated _________________________ @pytest.mark.skipif( none_of("openapi-spec-validator"), reason="Missing openapi-spec-validator" ) @pytest.mark.requires_network() def test_convert_parser_validated(): from prance import BaseParser parser = BaseParser("tests/specs/petstore.yaml", backend="openapi-spec-validator") # Conversion should work: it's the right backend, and it validates. > converted = convert.convert_spec(parser) tests/test_convert.py:142: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ prance/convert.py:142: in convert_spec converted, ctype = convert_str(serialized, content_type="text/yaml") _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ spec_str = "swagger: '2.0'\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:\n name: MIT\nhost: petstore.swagger...ge\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n" filename = None, kwargs = {'content_type': 'text/yaml'} parse_spec_details = spec = {'basePath': '/v1', 'consumes': ['application/json'], 'definitions': {'Error': {'properties': {'code': {'format': 'int...'id', 'name']}, 'Pets': {'items': {'$ref': '#/definitions/Pet'}, 'type': 'array'}}, 'host': 'petstore.swagger.io', ...} content_type = 'application/x-yaml', extension = '.yaml' data = {'filename': 'openapi.yaml', 'source': "swagger: '2.0'\ninfo:\n version: 1.0.0\n title: Swagger Petstore\n license:...e\n properties:\n code:\n type: integer\n format: int32\n message:\n type: string\n"} headers = {'accept': 'application/x-yaml; charset=utf-8'} requests = def convert_str(spec_str, filename=None, **kwargs): """ Convert the serialized spec. We parse the spec first to ensure there is no parse error, then send it off to the API for conversion. :param str spec_str: The specifications as string. :param str filename: [optional] Filename to determine the format from. :param str content_type: [optional] Content type to determine the format from. :return: The converted spec and content type. :rtype: tuple :raises ParseError: when parsing fails. :raises ConversionError: when conversion fails. """ # Parse, but discard the results. The function raises parse error. from .util.formats import parse_spec_details spec, content_type, extension = parse_spec_details(spec_str, filename, **kwargs) # Ok, parsing went fine, so let's convert. data = { "source": spec_str, } if filename is not None: data["filename"] = filename else: data["filename"] = f"openapi{extension}" headers = {"accept": f"{content_type}; charset=utf-8"} # Convert via API import requests r = requests.post( "https://mermade.org.uk/api/v1/convert", data=data, headers=headers ) if not r.ok: # pragma: nocover > raise ConversionError( "Could not convert spec: %d %s" % (r.status_code, r.reason) ) E prance.convert.ConversionError: Could not convert spec: 502 Bad Gateway prance/convert.py:56: ConversionError =============================== warnings summary =============================== tests/test_backends.py: 8 warnings tests/test_base_parser.py: 6 warnings tests/test_cli.py: 13 warnings tests/test_convert.py: 3 warnings tests/test_resolving_parser.py: 11 warnings tests/test_translating_parser.py: 20 warnings tests/test_zzz_specs.py: 44 warnings /build/python-prance/src/prance-0.22.11.04.0/prance/__init__.py:234: DeprecationWarning: jsonschema.exceptions.RefResolutionError is deprecated as of version 4.18.0. If you wish to catch potential reference resolution errors, directly catch referencing.exceptions.Unresolvable. from jsonschema.exceptions import RefResolutionError tests/test_convert.py::test_convert_url /build/python-prance/src/prance-0.22.11.04.0/prance/util/url.py:195: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources tests/test_convert.py::test_convert_url /usr/lib/python3.11/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('ruamel')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) tests/test_convert.py::test_convert_url /usr/lib/python3.11/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('ruamel.yaml')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(pkg) tests/test_convert.py::test_convert_url /usr/lib/python3.11/site-packages/pkg_resources/__init__.py:2350: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('ruamel')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages declare_namespace(parent) -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ---------- coverage: platform linux, python 3.11.5-final-0 ----------- Name Stmts Miss Cover Missing --------------------------------------------------------- prance/__init__.py 101 1 99% 263 prance/cli.py 115 4 97% 298-303 prance/convert.py 38 3 92% 60, 145-146 prance/mixins.py 29 0 100% prance/util/__init__.py 27 0 100% prance/util/exceptions.py 17 0 100% prance/util/formats.py 83 0 100% prance/util/fs.py 89 0 100% prance/util/iterators.py 20 0 100% prance/util/path.py 83 0 100% prance/util/resolver.py 99 1 99% 274 prance/util/translator.py 68 3 96% 65, 110-111 prance/util/url.py 104 0 100% --------------------------------------------------------- TOTAL 873 12 99% Required test coverage of 90% reached. Total coverage: 98.63% =========================== short test summary info ============================ FAILED tests/test_backends.py::test_openapi_spec_validator_validate_failure FAILED tests/test_cli.py::test_convert_defaults - AssertionError: assert 1 == 0 FAILED tests/test_cli.py::test_convert_output - AssertionError: assert 1 == 0 FAILED tests/test_convert.py::test_convert_petstore_yaml - prance.convert.Con... FAILED tests/test_convert.py::test_convert_petstore_json - prance.convert.Con... FAILED tests/test_convert.py::test_convert_petstore_yaml_explicit_name - pran... FAILED tests/test_convert.py::test_convert_url - prance.convert.ConversionErr... FAILED tests/test_convert.py::test_convert_parser_validated - prance.convert.... = 8 failed, 141 passed, 11 skipped, 3 xfailed, 44 xpassed, 109 warnings in 33.11s = ==> ERROR: A failure occurred in check().  Aborting... ==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/root0/build receiving incremental file list python-prance-0.22.11.04.0-2-riscv64-build.log python-prance-0.22.11.04.0-2-riscv64-check.log python-prance-0.22.11.04.0-2-riscv64-prepare.log sent 81 bytes received 7,921 bytes 16,004.00 bytes/sec total size is 53,028 speedup is 6.63