Skip to content
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

implement werkzeug 2.1.0 changes #236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MeggyCal
Copy link

Werkzeug 2.1 removed some long deprecated classes (see pallets/werkzeug@7b52ecd) including BaseRequest and BaseResponse.

@kloczek
Copy link

kloczek commented Nov 1, 2023

Any chance to commit this PR and release new version? 🤔

@kloczek
Copy link

kloczek commented Nov 1, 2023

BTW as already has been released werkzeug 3.0.0 it would be good to try to push to that version.

@kloczek
Copy link

kloczek commented Feb 14, 2024

Just tested this PR and looks like test suite fails in few units

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-flex-6.14.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-flex-6.14.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -q
============================= test session starts ==============================
platform linux -- Python 3.8.18, pytest-8.0.0, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/flex-6.14.1
configfile: pytest.ini
plugins: Faker-23.1.0, httpbin-2.0.0
collected 1459 items

tests/cli/test_command_line_interface.py ...                             [  0%]
tests/core/test_decorators.py ...................                        [  1%]
tests/core/test_empty_sentinal.py .                                      [  1%]
tests/core/test_error_dict.py ..                                         [  1%]
tests/core/test_error_list.py ......                                     [  2%]
tests/core/test_example_schemas.py xxX.                                  [  2%]
tests/core/test_format_validators.py .................xx................ [  4%]
........                                                                 [  5%]
tests/core/test_load_source.py ........                                  [  5%]
tests/core/test_match_request_path_to_api_path.py ...................... [  7%]
.                                                                        [  7%]
tests/core/test_parameter_utils.py ...........                           [  8%]
tests/core/test_path_utils.py ....                                       [  8%]
tests/core/test_request_response_objects.py ......                       [  8%]
tests/core/test_utils.py ............................................... [ 12%]
..................................                                       [ 14%]
tests/core/utils/test_pluralize.py .......                               [ 14%]
tests/decorators/test_pull_keys_from_object.py ...                       [ 15%]
tests/decorators/test_skip_if_any_empty.py ...                           [ 15%]
tests/decorators/test_skip_if_empty.py .                                 [ 15%]
tests/http/test_request_data_property.py .......s..                      [ 16%]
tests/http/test_request_normalization.py ..s.sssss.                      [ 16%]
tests/http/test_response_data_propery.py s..                             [ 16%]
tests/http/test_response_normalization.py ..ssss.                        [ 17%]
tests/loading/common/test_external_docs_validator.py ...........         [ 18%]
tests/loading/common/test_reference_object_validation.py ........        [ 18%]
tests/loading/definition/parameters/single/test_collection_format.py ... [ 18%]
............                                                             [ 19%]
tests/loading/definition/parameters/single/test_default_validation.py .. [ 19%]
..                                                                       [ 20%]
tests/loading/definition/parameters/single/test_description_validation.py . [ 20%]
.......                                                                  [ 20%]
tests/loading/definition/parameters/single/test_in_validation.py ....... [ 21%]
............                                                             [ 21%]
tests/loading/definition/parameters/single/test_items_validation.py .    [ 22%]
tests/loading/definition/parameters/single/test_name_validation.py ..... [ 22%]
...                                                                      [ 22%]
tests/loading/definition/parameters/single/test_type_validation.py ..... [ 22%]
.....                                                                    [ 23%]
tests/loading/definition/responses/headers/single/test_collection_format_validation.py . [ 23%]
.......                                                                  [ 23%]
tests/loading/definition/responses/headers/single/test_description_validation.py . [ 23%]
.......                                                                  [ 24%]
tests/loading/definition/responses/headers/single/test_items_validation.py . [ 24%]
.....                                                                    [ 24%]
tests/loading/definition/responses/headers/single/test_schema_validation.py . [ 24%]
......                                                                   [ 25%]
tests/loading/definition/responses/headers/single/test_type_validation.py . [ 25%]
...................                                                      [ 26%]
tests/loading/definition/responses/headers/test_multi_header_validation.py . [ 26%]
.......                                                                  [ 27%]
tests/loading/definition/responses/single/test_schema_validation.py .... [ 27%]
...                                                                      [ 27%]
tests/loading/definition/responses/test_responses_validation.py ........ [ 28%]
.                                                                        [ 28%]
tests/loading/definition/schema/test_default.py .....                    [ 28%]
tests/loading/definition/schema/test_enum.py ........                    [ 29%]
tests/loading/definition/schema/test_format.py .........                 [ 29%]
tests/loading/definition/schema/test_items.py .....                      [ 30%]
tests/loading/definition/schema/test_min_and_max_items.py .............. [ 31%]
.........                                                                [ 31%]
tests/loading/definition/schema/test_min_and_max_length.py ............. [ 32%]
..........                                                               [ 33%]
tests/loading/definition/schema/test_min_and_max_properties.py ......... [ 33%]
..................                                                       [ 35%]
tests/loading/definition/schema/test_minimum_and_maximum_validation.py . [ 35%]
...........................................                              [ 38%]
tests/loading/definition/schema/test_multiple_of_validation.py ......... [ 38%]
......                                                                   [ 39%]
tests/loading/definition/schema/test_pattern.py .........                [ 39%]
tests/loading/definition/schema/test_properties.py ........              [ 40%]
tests/loading/definition/schema/test_read_only.py .......                [ 40%]
tests/loading/definition/schema/test_ref.py ........                     [ 41%]
tests/loading/definition/schema/test_required.py ..........              [ 42%]
tests/loading/definition/schema/test_schema_validator.py .....           [ 42%]
tests/loading/definition/schema/test_title.py ........                   [ 42%]
tests/loading/definition/schema/test_type.py ..........                  [ 43%]
tests/loading/definition/schema/test_unique_items.py ............        [ 44%]
tests/loading/definition/test_parameters_validation.py ...............   [ 45%]
tests/loading/definition/test_reference_validation.py ..                 [ 45%]
tests/loading/schema/paths/operation/responses/schema/test_external_docs_validation.py . [ 45%]
.......                                                                  [ 46%]
tests/loading/schema/paths/operation/responses/schema/test_reference_validation.py . [ 46%]
.......                                                                  [ 46%]
tests/loading/schema/paths/operation/responses/test_response_validation.py . [ 46%]
....                                                                     [ 47%]
tests/loading/schema/paths/operation/responses/test_schema_validation.py . [ 47%]
.......                                                                  [ 47%]
tests/loading/schema/paths/operation/test_consumes_validation.py ....... [ 48%]
..                                                                       [ 48%]
tests/loading/schema/paths/operation/test_external_docs_validation.py .. [ 48%]
......                                                                   [ 48%]
tests/loading/schema/paths/operation/test_parameters_validation.py ..... [ 49%]
...                                                                      [ 49%]
tests/loading/schema/paths/operation/test_produces_validation.py ....... [ 49%]
..                                                                       [ 49%]
tests/loading/schema/paths/operation/test_responses_validation.py ...... [ 50%]
..                                                                       [ 50%]
tests/loading/schema/paths/operation/test_tags_validation.py ........    [ 50%]
tests/loading/schema/paths/test_operation_validation.py ................ [ 52%]
........................................                                 [ 54%]
tests/loading/schema/test_base_path_validation.py ...                    [ 55%]
tests/loading/schema/test_host_validation.py ........................... [ 56%]
................                                                         [ 57%]
tests/loading/schema/test_info_validation.py ........................... [ 59%]
................                                                         [ 60%]
tests/loading/schema/test_mimetype_validation.py ....................... [ 62%]
................................                                         [ 64%]
tests/loading/schema/test_paths_validation.py ........                   [ 65%]
tests/loading/schema/test_produces_and_consumes_validation.py ......     [ 65%]
tests/loading/schema/test_schemes_validation.py ........                 [ 66%]
tests/loading/schema/test_swagger_validation.py ..........               [ 66%]
tests/test_assertion_utils.py ....................                       [ 68%]
tests/validation/api_call/test_api_call_validation.py .....              [ 68%]
tests/validation/headers/test_header_type_casting.py ................... [ 69%]
....                                                                     [ 70%]
tests/validation/headers/test_response_header_validation.py .            [ 70%]
tests/validation/operation/test_consumes_validation.py ....              [ 70%]
tests/validation/operation/test_parameter_validation.py .                [ 70%]
tests/validation/parameter/test_enum_validation.py ..................... [ 72%]
...................                                                      [ 73%]
tests/validation/parameter/test_format_validation.py ......              [ 73%]
tests/validation/parameter/test_items_validation.py ..                   [ 73%]
tests/validation/parameter/test_min_max_items_validation.py ............ [ 74%]
.                                                                        [ 74%]
tests/validation/parameter/test_min_max_length_validation.py ........... [ 75%]
..                                                                       [ 75%]
tests/validation/parameter/test_minimum_and_maximum_validation.py ...... [ 76%]
............................                                             [ 77%]
tests/validation/parameter/test_multiple_of_validation.py .......        [ 78%]
tests/validation/parameter/test_parameter_type_casting.py .............. [ 79%]
...                                                                      [ 79%]
tests/validation/parameter/test_path_parameter_extraction.py .           [ 79%]
tests/validation/parameter/test_pattern_validation.py ....               [ 79%]
tests/validation/parameter/test_required_validation.py ..                [ 80%]
tests/validation/parameter/test_schema_validation.py .........           [ 80%]
tests/validation/parameter/test_type_validation.py ...............       [ 81%]
tests/validation/parameter/test_unique_items_validation.py .........     [ 82%]
tests/validation/path/test_validate_path_to_api_path.py .......          [ 82%]
tests/validation/request/test_request_body_parameter_validation.py ...   [ 83%]
tests/validation/request/test_request_content_type_validation.py ...     [ 83%]
tests/validation/request/test_request_header_validation.py .....         [ 83%]
tests/validation/request/test_request_method_validation.py .             [ 83%]
tests/validation/request/test_request_parameter_validation.py ......F.   [ 84%]
tests/validation/request/test_request_path_validation.py ........        [ 84%]
tests/validation/request/test_request_query_parameter_validation.py ..   [ 84%]
tests/validation/response/test_produces_validation.py .....              [ 85%]
tests/validation/response/test_response_content_type_validation.py ...   [ 85%]
tests/validation/response/test_response_header_validation.py ..........  [ 86%]
tests/validation/response/test_response_method_validation.py .           [ 86%]
tests/validation/response/test_response_path_validation.py ..........    [ 86%]
tests/validation/response/test_response_reference.py .                   [ 86%]
tests/validation/response/test_response_status_code_validation.py ...    [ 87%]
tests/validation/response/test_schema_validation.py ....                 [ 87%]
tests/validation/schema/test_additional_properties_validation.py ..      [ 87%]
tests/validation/schema/test_allof_validation.py ....                    [ 87%]
tests/validation/schema/test_anyof_validation.py ..                      [ 88%]
tests/validation/schema/test_enum_validation.py ...............          [ 89%]
tests/validation/schema/test_format_validation.py ................       [ 90%]
tests/validation/schema/test_items_validation.py ........                [ 90%]
tests/validation/schema/test_min_and_max_length_validation.py .......... [ 91%]
..                                                                       [ 91%]
tests/validation/schema/test_min_max_items_validation.py ............    [ 92%]
tests/validation/schema/test_min_max_properties_validation.py .......... [ 93%]
.                                                                        [ 93%]
tests/validation/schema/test_minimum_and_maximum_validation.py ......... [ 93%]
..................                                                       [ 94%]
tests/validation/schema/test_multiple_of_validation.py ................  [ 96%]
tests/validation/schema/test_pattern_validation.py ...............       [ 97%]
tests/validation/schema/test_properties_validation.py ......             [ 97%]
tests/validation/schema/test_ref_validation.py .................         [ 98%]
tests/validation/schema/test_required_validation.py ..                   [ 98%]
tests/validation/schema/test_type_validation.py ...........              [ 99%]
tests/validation/schema/test_unique_items_validation.py .......          [100%]

=================================== FAILURES ===================================
_____________ test_request_parameter_array_extraction[tsv-1\t2\t3] _____________
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 345, in from_call
    result: Optional[TResult] = func()
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 266, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
    yield from thread_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 839, in pytest_runtest_call
    yield from self._runtest_for(item, "call")
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 822, in _runtest_for
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/capture.py", line 882, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 181, in pytest_runtest_call
    raise e
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 173, in pytest_runtest_call
    item.runtest()
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 1841, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 198, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/validation/request/test_request_parameter_validation.py", line 187, in test_request_parameter_array_extraction
    validate_request(
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/validation/request.py", line 65, in validate_request
    errors['method'].add_error(err.detail)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/exceptions.py", line 22, in __exit__
    self.raise_()
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/exceptions.py", line 25, in raise_
    raise ValidationError(self)
flex.exceptions.ValidationError: 'method':
    - 'parameters':
        - 'query':
            - 'id':
                - 'minItems':
                    - 'Array must have at least 3 items. It had only had 1 items.'
                - 'items':
                    - 'maximum':
                        - '123 must be less than or equal to 3'
================================== XFAILURES ===================================
_ test_load_and_parse_schema[/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/example_schemas/uber.yaml] _
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 345, in from_call
    result: Optional[TResult] = func()
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 266, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
    yield from thread_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 839, in pytest_runtest_call
    yield from self._runtest_for(item, "call")
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 822, in _runtest_for
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/capture.py", line 882, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 181, in pytest_runtest_call
    raise e
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 173, in pytest_runtest_call
    item.runtest()
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 1841, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 198, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/test_example_schemas.py", line 19, in test_load_and_parse_schema
    load(path)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/core.py", line 100, in load
    return parse(raw_schema)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/core.py", line 85, in parse
    swagger_definitions = definitions_validator(raw_schema, context=context)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/validation/common.py", line 398, in validate_object
    non_field_validators.validate_object(obj, context=context)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/datastructures.py", line 78, in validate_object
    errors.add_error(key, err.detail)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/exceptions.py", line 22, in __exit__
    self.raise_()
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/exceptions.py", line 25, in raise_
    raise ValidationError(self)
flex.exceptions.ValidationError: 'definitions':
    - 'Activity':
        - 'Unsupported Reference: `Activity` - $ref validation does not currently support references that are anything more than a url fragment.'
_ test_load_and_parse_schema[/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/example_schemas/petstore.yaml] _
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 345, in from_call
    result: Optional[TResult] = func()
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 266, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
    yield from thread_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 839, in pytest_runtest_call
    yield from self._runtest_for(item, "call")
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 822, in _runtest_for
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/capture.py", line 882, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 181, in pytest_runtest_call
    raise e
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 173, in pytest_runtest_call
    item.runtest()
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 1841, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 198, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/test_example_schemas.py", line 19, in test_load_and_parse_schema
    load(path)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/core.py", line 100, in load
    return parse(raw_schema)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/core.py", line 85, in parse
    swagger_definitions = definitions_validator(raw_schema, context=context)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/validation/common.py", line 398, in validate_object
    non_field_validators.validate_object(obj, context=context)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/datastructures.py", line 78, in validate_object
    errors.add_error(key, err.detail)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/exceptions.py", line 22, in __exit__
    self.raise_()
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/exceptions.py", line 25, in raise_
    raise ValidationError(self)
flex.exceptions.ValidationError: 'definitions':
    - 'Pet':
        - 'Unsupported Reference: `Pet` - $ref validation does not currently support references that are anything more than a url fragment.'
__ test_date_time_format_validator_with_valid_dateties[1990-12-31T23:59:60Z] ___
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 345, in from_call
    result: Optional[TResult] = func()
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 266, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
    yield from thread_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 839, in pytest_runtest_call
    yield from self._runtest_for(item, "call")
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 822, in _runtest_for
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/capture.py", line 882, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 181, in pytest_runtest_call
    raise e
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 173, in pytest_runtest_call
    item.runtest()
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 1841, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 198, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/test_format_validators.py", line 58, in test_date_time_format_validator_with_valid_dateties
    date_time_format_validator(value)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/formats.py", line 52, in inner
    return func(value, *args, **kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/formats.py", line 109, in date_time_format_validator
    raise ValidationError(MESSAGES['format']['invalid_datetime'].format(value))
flex.exceptions.ValidationError: '1990-12-31T23:59:60Z is not a valid RFC3339 date-time'
_ test_date_time_format_validator_with_valid_dateties[1990-12-31T15:59:60-08:00] _
Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 345, in from_call
    result: Optional[TResult] = func()
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 266, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 87, in pytest_runtest_call
    yield from thread_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 90, in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
  File "/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 839, in pytest_runtest_call
    yield from self._runtest_for(item, "call")
  File "/usr/lib/python3.8/site-packages/_pytest/logging.py", line 822, in _runtest_for
    yield
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/capture.py", line 882, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 96, in _multicall
    teardown.throw(exception)  # type: ignore[union-attr]
  File "/usr/lib/python3.8/site-packages/_pytest/skipping.py", line 257, in pytest_runtest_call
    return (yield)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 181, in pytest_runtest_call
    raise e
  File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 173, in pytest_runtest_call
    item.runtest()
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 1841, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 493, in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 115, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 113, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 77, in _multicall
    res = hook_impl.function(*args)
  File "/usr/lib/python3.8/site-packages/_pytest/python.py", line 198, in pytest_pyfunc_call
    result = testfunction(**testargs)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/test_format_validators.py", line 58, in test_date_time_format_validator_with_valid_dateties
    date_time_format_validator(value)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/formats.py", line 52, in inner
    return func(value, *args, **kwargs)
  File "/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/formats.py", line 109, in date_time_format_validator
    raise ValidationError(MESSAGES['format']['invalid_datetime'].format(value))
flex.exceptions.ValidationError: '1990-12-31T15:59:60-08:00 is not a valid RFC3339 date-time'
=============================== warnings summary ===============================
../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1394
  /usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1394: PytestConfigWarning: Unknown config option: python_paths

    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

flex/__init__.py:6
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/flex/__init__.py:6: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../../../usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2846
  /usr/lib/python3.8/site-packages/pkg_resources/__init__.py:2846: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  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/core/test_match_request_path_to_api_path.py:45
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/test_match_request_path_to_api_path.py:45: DeprecationWarning: invalid escape sequence \.
    ('/something.json', '/something\.json'),

tests/utils.py:31
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/utils.py:31: DeprecationWarning: invalid escape sequence \{
    pattern = re.sub('\{.*\}', '.*', unformatted_msg)

tests/utils.py:33
tests/utils.py:33
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/utils.py:33: DeprecationWarning: invalid escape sequence \(
    pattern = re.sub('\(', '\(', pattern)

tests/utils.py:34
tests/utils.py:34
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/utils.py:34: DeprecationWarning: invalid escape sequence \)
    pattern = re.sub('\)', '\)', pattern)

tests/utils.py:36
tests/utils.py:36
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/utils.py:36: DeprecationWarning: invalid escape sequence \^
    pattern = re.sub('\^', '\^', pattern)

tests/utils.py:37
tests/utils.py:37
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/utils.py:37: DeprecationWarning: invalid escape sequence \$
    pattern = re.sub('\$', '\$', pattern)

tests/utils.py:88
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/utils.py:88: DeprecationWarning: invalid escape sequence \.
    pattern = re.sub('\.', '.+', target_path)

tests/validation/schema/test_pattern_validation.py:13
  /home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/validation/schema/test_pattern_validation.py:13: DeprecationWarning: invalid escape sequence \s
    ZIPCODE_REGEX = '^[0-9]{5}(?:[-\s][0-9]{4})?$'

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=================================== XPASSES ====================================
=========================== short test summary info ============================
SKIPPED [1] tests/http/test_request_data_property.py:64: Python35+ has json.JSONDecodeError
SKIPPED [1] tests/http/test_request_normalization.py:46: No urllib2 in python3
SKIPPED [1] tests/http/test_request_normalization.py:81: tornado not installed
SKIPPED [1] tests/http/test_request_normalization.py:98: tornado not installed
SKIPPED [1] tests/http/test_request_normalization.py:116: falcon not installed
SKIPPED [1] tests/http/test_request_normalization.py:141: webob not installed
SKIPPED [1] tests/http/test_request_normalization.py:158: django not installed
SKIPPED [1] tests/http/test_response_data_propery.py:14: Python35+ has json.JSONDecodeError
SKIPPED [1] tests/http/test_response_normalization.py:50: No urllib2 in python3
SKIPPED [1] tests/http/test_response_normalization.py:66: tornado not installed
SKIPPED [1] tests/http/test_response_normalization.py:87: webob not installed
SKIPPED [1] tests/http/test_response_normalization.py:107: django not installed
XFAIL tests/core/test_example_schemas.py::test_load_and_parse_schema[/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/example_schemas/uber.yaml]
XFAIL tests/core/test_example_schemas.py::test_load_and_parse_schema[/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/example_schemas/petstore.yaml]
XFAIL tests/core/test_format_validators.py::test_date_time_format_validator_with_valid_dateties[1990-12-31T23:59:60Z]
XFAIL tests/core/test_format_validators.py::test_date_time_format_validator_with_valid_dateties[1990-12-31T15:59:60-08:00]
XPASS tests/core/test_example_schemas.py::test_load_and_parse_schema[/home/tkloczko/rpmbuild/BUILD/flex-6.14.1/tests/core/example_schemas/petstore-expanded.yaml]
FAILED tests/validation/request/test_request_parameter_validation.py::test_request_parameter_array_extraction[tsv-1\t2\t3]
= 1 failed, 1441 passed, 12 skipped, 4 xfailed, 1 xpassed, 15 warnings in 4.69s =

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants