Bug 2279961 - python-openapi-core fails to build with pytest 8: AttributeError: 'FixtureDef' object has no attribute 'unittest'
Summary: python-openapi-core fails to build with pytest 8: AttributeError: 'FixtureDef...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-openapi-core
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mattia Verga
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-05-10 07:47 UTC by Tomáš Hrnčiar
Modified: 2024-05-10 07:50 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-05-10 07:50:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-05-10 07:47:29 UTC
python-openapi-core fails to build with pytest 8.

==================================== ERRORS ====================================
______________ ERROR at setup of TestPetPhotoView.test_get_valid _______________

request = <SubRequest 'aiohttp_client' for <Coroutine test_get_valid>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_get_valid>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
______________ ERROR at setup of TestPetPhotoView.test_post_valid ______________

request = <SubRequest 'aiohttp_client' for <Coroutine test_post_valid>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_post_valid>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
____ ERROR at setup of test_aiohttp_integration_valid_input[no_validation] _____

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_valid_input[no_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_valid_input[no_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
__ ERROR at setup of test_aiohttp_integration_valid_input[request_validation] __

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_valid_input[request_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_valid_input[request_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
_ ERROR at setup of test_aiohttp_integration_valid_input[response_validation] __

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_valid_input[response_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_valid_input[response_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
___ ERROR at setup of test_aiohttp_integration_invalid_server[no_validation] ___

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_server[no_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_server[no_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
_ ERROR at setup of test_aiohttp_integration_invalid_server[request_validation] _

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_server[request_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_server[request_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
_ ERROR at setup of test_aiohttp_integration_invalid_server[response_validation] _

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_server[response_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_server[response_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
___ ERROR at setup of test_aiohttp_integration_invalid_input[no_validation] ____

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_input[no_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_input[no_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
_ ERROR at setup of test_aiohttp_integration_invalid_input[request_validation] _

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_input[request_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_input[request_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
_ ERROR at setup of test_aiohttp_integration_invalid_input[response_validation] _

request = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_input[response_validation]>>
kwargs = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}

    @functools.wraps(fixture)
    def _asyncgen_fixture_wrapper(request: SubRequest, **kwargs: Any):
        func = _perhaps_rebind_fixture_func(
>           fixture, request.instance, fixturedef.unittest
        )
E       AttributeError: 'FixtureDef' object has no attribute 'unittest'

event_loop_fixture_id = 'event_loop'
fixture    = <function aiohttp_client at 0x7fc835203b00>
fixturedef = <FixtureDef argname='aiohttp_client' scope='function' baseid=''>
kwargs     = {'aiohttp_client_cls': <class 'aiohttp.test_utils.TestClient'>, 'event_loop': <_UnixSelectorEventLoop running=False closed=False debug=False>}
request    = <SubRequest 'aiohttp_client' for <Coroutine test_aiohttp_integration_invalid_input[response_validation]>>

/usr/lib/python3.12/site-packages/pytest_asyncio/plugin.py:321: AttributeError
=================================== FAILURES ===================================
__________________________ TestPetstore.test_get_pets __________________________

self = <test_petstore.TestPetstore object at 0x7fc832a60a70>
spec = SchemaPath('')

    def test_get_pets(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "20",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': '20'}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc831c75130>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': 20, 'search': ''}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a60a70>
spec       = SchemaPath('')

tests/integration/test_petstore.py:100: DeprecationWarning
_____________________ TestPetstore.test_get_pets_response ______________________

self = <test_petstore.TestPetstore object at 0x7fc832a60950>
spec = SchemaPath('')

    def test_get_pets_response(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "20",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': '20'}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc831bf1f10>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': 20, 'search': ''}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a60950>
spec       = SchemaPath('')

tests/integration/test_petstore.py:159: DeprecationWarning
________________ TestPetstore.test_get_pets_response_media_type ________________

self = <test_petstore.TestPetstore object at 0x7fc832a60dd0>
spec = SchemaPath('')

    def test_get_pets_response_media_type(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "20",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': '20'}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc831b939b0>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': 20, 'search': ''}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a60dd0>
spec       = SchemaPath('')

tests/integration/test_petstore.py:219: DeprecationWarning
_________________ TestPetstore.test_get_pets_invalid_response __________________

self = <test_petstore.TestPetstore object at 0x7fc832a60530>
spec = SchemaPath('')
response_unmarshaller = <openapi_core.unmarshalling.response.unmarshallers.V30ResponseUnmarshaller object at 0x7fc830afb740>

    def test_get_pets_invalid_response(self, spec, response_unmarshaller):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "20",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': '20'}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830afacf0>
response_unmarshaller = <openapi_core.unmarshalling.response.unmarshallers.V30ResponseUnmarshaller object at 0x7fc830afb740>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': 20, 'search': ''}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a60530>
spec       = SchemaPath('')

tests/integration/test_petstore.py:267: DeprecationWarning
_____________________ TestPetstore.test_get_pets_ids_param _____________________

self = <test_petstore.TestPetstore object at 0x7fc832a60050>
spec = SchemaPath('')

    def test_get_pets_ids_param(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "20",
            "ids": ["12", "13"],
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'ids': ['12', '13'], 'limit': '20'}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830afa390>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': 20, 'search': '', 'ids': [12, 13]}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a60050>
spec       = SchemaPath('')

tests/integration/test_petstore.py:339: DeprecationWarning
____________________ TestPetstore.test_get_pets_tags_param _____________________

self = <test_petstore.TestPetstore object at 0x7fc832a60410>
spec = SchemaPath('')

    def test_get_pets_tags_param(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = [
            ("limit", "20"),
            ("tags", "cats,dogs"),
        ]
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = [('limit', '20'), ('tags', 'cats,dogs')]
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830a78ad0>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': 20, 'search': '', 'tags': ['cats', 'dogs']}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a60410>
spec       = SchemaPath('')

tests/integration/test_petstore.py:391: DeprecationWarning
______________ TestPetstore.test_get_pets_parameter_schema_error _______________

self = <test_petstore.TestPetstore object at 0x7fc832a612b0>
spec = SchemaPath('')

    def test_get_pets_parameter_schema_error(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "1",
            "tags": ",,",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

exc_info   = <ExceptionInfo InvalidParameter(name='tags', location='query') tblen=8>
host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': '1', 'tags': ',,'}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830a377d0>
self       = <test_petstore.TestPetstore object at 0x7fc832a612b0>
spec       = SchemaPath('')

tests/integration/test_petstore.py:443: DeprecationWarning
_______________ TestPetstore.test_get_pets_wrong_parameter_type ________________

self = <test_petstore.TestPetstore object at 0x7fc832a83bf0>
spec = SchemaPath('')

    def test_get_pets_wrong_parameter_type(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "twenty",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

exc_info   = <ExceptionInfo ParameterValidationError(name='limit', location='query') tblen=8>
host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': 'twenty'}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830a35e50>
self       = <test_petstore.TestPetstore object at 0x7fc832a83bf0>
spec       = SchemaPath('')

tests/integration/test_petstore.py:475: DeprecationWarning
___________ TestPetstore.test_get_pets_raises_missing_required_param ___________

self = <test_petstore.TestPetstore object at 0x7fc832a83d70>
spec = SchemaPath('')

    def test_get_pets_raises_missing_required_param(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830a37920>
self       = <test_petstore.TestPetstore object at 0x7fc832a83d70>
spec       = SchemaPath('')

tests/integration/test_petstore.py:502: DeprecationWarning
____________________ TestPetstore.test_get_pets_empty_value ____________________

self = <test_petstore.TestPetstore object at 0x7fc832a83fe0>
spec = SchemaPath('')

    def test_get_pets_empty_value(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "1",
            "order": "",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

exc_info   = <ExceptionInfo ParameterValidationError(name='order', location='query') tblen=8>
host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': '1', 'order': ''}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830970a40>
self       = <test_petstore.TestPetstore object at 0x7fc832a83fe0>
spec       = SchemaPath('')

tests/integration/test_petstore.py:534: DeprecationWarning
_________________ TestPetstore.test_get_pets_allow_empty_value _________________

self = <test_petstore.TestPetstore object at 0x7fc832a83860>
spec = SchemaPath('')

    def test_get_pets_allow_empty_value(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": "20",
            "search": "",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': '20', 'search': ''}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830a378f0>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': 20, 'search': ''}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a83860>
spec       = SchemaPath('')

tests/integration/test_petstore.py:567: DeprecationWarning
____________________ TestPetstore.test_get_pets_none_value _____________________

self = <test_petstore.TestPetstore object at 0x7fc832a83b30>
spec = SchemaPath('')

    def test_get_pets_none_value(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": None,
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': None}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830a35bb0>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': None, 'search': ''}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a83b30>
spec       = SchemaPath('')

tests/integration/test_petstore.py:605: DeprecationWarning
____________________ TestPetstore.test_get_pets_param_order ____________________

self = <test_petstore.TestPetstore object at 0x7fc832a83320>
spec = SchemaPath('')

    def test_get_pets_param_order(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        query_params = {
            "limit": None,
            "order": "desc",
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'limit': None, 'order': 'desc'}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830afb440>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': None, 'search': '', 'order': 'desc'}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a83320>
spec       = SchemaPath('')

tests/integration/test_petstore.py:644: DeprecationWarning
_________________ TestPetstore.test_get_pets_param_coordinates _________________

self = <test_petstore.TestPetstore object at 0x7fc832a83500>
spec = SchemaPath('')

    def test_get_pets_param_coordinates(self, spec):
        host_url = "http://petstore.swagger.io/v1"
        path_pattern = "/v1/pets"
        coordinates = {
            "lat": 1.12,
            "lon": 32.12,
        }
        query_params = {
            "limit": None,
            "coordinates": json.dumps(coordinates),
        }
    
        request = MockRequest(
            host_url,
            "GET",
            "/pets",
            path_pattern=path_pattern,
            args=query_params,
        )
    
>       with pytest.warns(
            DeprecationWarning, match="limit parameter is deprecated"
        ):
E       DeprecationWarning: Use of allowEmptyValue property is deprecated

coordinates = {'lat': 1.12, 'lon': 32.12}
host_url   = 'http://petstore.swagger.io/v1'
path_pattern = '/v1/pets'
query_params = {'coordinates': '{"lat": 1.12, "lon": 32.12}', 'limit': None}
request    = <openapi_core.testing.requests.MockRequest object at 0x7fc830ae69c0>
result     = RequestUnmarshalResult(errors=[], body=None, parameters=Parameters(query={'page': 1, 'limit': None, 'search': '', 'coordinates': Coordinates(lat=1.12, lon=32.12)}, header={}, cookie={}, path={}), security=None)
self       = <test_petstore.TestPetstore object at 0x7fc832a83500>
spec       = SchemaPath('')

tests/integration/test_petstore.py:688: DeprecationWarning
- generated xml file: /builddir/build/BUILD/openapi_core-0.19.1/reports/junit.xml -
=========================== short test summary info ============================
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets - Depr...
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_response
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_response_media_type
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_invalid_response
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_ids_param
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_tags_param
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_parameter_schema_error
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_wrong_parameter_type
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_raises_missing_required_param
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_empty_value
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_allow_empty_value
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_none_value
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_param_order
FAILED tests/integration/test_petstore.py::TestPetstore::test_get_pets_param_coordinates
ERROR tests/integration/contrib/aiohttp/test_aiohttp_project.py::TestPetPhotoView::test_get_valid
ERROR tests/integration/contrib/aiohttp/test_aiohttp_project.py::TestPetPhotoView::test_post_valid
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_valid_input[no_validation]
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_valid_input[request_validation]
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_valid_input[response_validation]
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_invalid_server[no_validation]
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_invalid_server[request_validation]
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_invalid_server[response_validation]
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_invalid_input[no_validation]
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_invalid_input[request_validation]
ERROR tests/integration/contrib/aiohttp/test_aiohttp_validation.py::test_aiohttp_integration_invalid_input[response_validation]
============ 14 failed, 1394 passed, 21 xfailed, 11 errors in 9.33s ============

https://docs.pytest.org/en/stable/changelog.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07389264-python-openapi-core/

For all our attempts to build python-openapi-core with pytest 8, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-openapi-core/

Let us know here if you have any questions.

Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a
heads up before we merge new pytest into rawhide. For more info see a Fedora Change
proposal https://fedoraproject.org/wiki/Changes/Pytest_8

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Tomáš Hrnčiar 2024-05-10 07:50:03 UTC
I just remembered we have this commit: https://src.fedoraproject.org/rpms/python-openapi-core/c/2579e4643368904e9966c025283cae20327be3dc?branch=rawhide
Sorry for the noise.


Note You need to log in before you can comment on or make changes to this bug.