tests/schemas/test_openapi.py::TestOperationIntrospection::test_different_request_response_objects test failure with Python 3.13
#9445
Unanswered
mgorny
asked this question in
Potential Issue
Replies: 1 comment
-
|
Gentle ping. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When testing with Python 3.13.0b2, I'm getting one failure:
$ python -m pytest tests/schemas/test_openapi.py::TestOperationIntrospection::test_different_request_response_objects -vv /tmp/django-rest-framework/rest_framework/fields.py:990: UserWarning: max_value should be a Decimal instance. warnings.warn("max_value should be a Decimal instance.") /tmp/django-rest-framework/rest_framework/fields.py:992: UserWarning: min_value should be a Decimal instance. warnings.warn("min_value should be a Decimal instance.") ========================================================= test session starts ========================================================= platform linux -- Python 3.13.0b2, pytest-8.2.2, pluggy-1.5.0 -- /tmp/django-rest-framework/.venv/bin/python cachedir: .pytest_cache django: version: 5.0.6 rootdir: /tmp/django-rest-framework configfile: setup.cfg plugins: django-4.8.0 collected 1 item tests/schemas/test_openapi.py::TestOperationIntrospection::test_different_request_response_objects FAILED [100%] ============================================================== FAILURES =============================================================== _________________________________ TestOperationIntrospection.test_different_request_response_objects __________________________________ tests/schemas/test_openapi.py:883: in test_different_request_response_objects assert operation == { E AssertionError: assert {'operationId': 'createExample', 'description': 'The type of the None singleton.', 'parameters': [], 'requestBody': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Request'}}, 'application/x-www-form-urlencoded': {'schema': {'$ref': '#/components/schemas/Request'}}, 'multipart/form-data': {'schema': {'$ref': '#/components/schemas/Request'}}}}, 'responses': {'201': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Response'}}}, 'description': ''}}, 'tags': ['']} == {'operationId': 'createExample', 'description': '', 'parameters': [], 'requestBody': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Request'}}, 'application/x-www-form-urlencoded': {'schema': {'$ref': '#/components/schemas/Request'}}, 'multipart/form-data': {'schema': {'$ref': '#/components/schemas/Request'}}}}, 'responses': {'201': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Response'}}}, 'description': ''}}, 'tags': ['']} E E Common items: E {'operationId': 'createExample', E 'parameters': [], E 'requestBody': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Request'}}, E 'application/x-www-form-urlencoded': {'schema': {'$ref': '#/components/schemas/Request'}}, E 'multipart/form-data': {'schema': {'$ref': '#/components/schemas/Request'}}}}, E 'responses': {'201': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Response'}}}, E 'description': ''}}, E 'tags': ['']} E Differing items: E {'description': 'The type of the None singleton.'} != {'description': ''} E E Full diff: E { E - 'description': '', E + 'description': 'The type of the None singleton.', E 'operationId': 'createExample', E 'parameters': [], E 'requestBody': { E 'content': { E 'application/json': { E 'schema': { E '$ref': '#/components/schemas/Request', E }, E }, E 'application/x-www-form-urlencoded': { E 'schema': { E '$ref': '#/components/schemas/Request', E }, E }, E 'multipart/form-data': { E 'schema': { E '$ref': '#/components/schemas/Request', E }, E }, E }, E }, E 'responses': { E '201': { E 'content': { E 'application/json': { E 'schema': { E '$ref': '#/components/schemas/Response', E }, E }, E }, E 'description': '', E }, E }, E 'tags': [ E '', E ], E } -------------------------------------------------------- Captured stdout setup -------------------------------------------------------- Operations to perform: Synchronize unmigrated apps: importable, rest_framework, staticfiles, tests Apply all migrations: admin, auth, authentication, authtoken, contenttypes, generic_relations, sessions, sites Synchronizing apps without migrations: Creating tables... Creating table tests_basicmodel Creating table tests_manytomanytarget Creating table tests_manytomanysource Creating table tests_basicmodelwithusers Creating table tests_foreignkeytarget Creating table tests_uuidforeignkeytarget Creating table tests_foreignkeysource Creating table tests_foreignkeysourcewithlimitedchoices Creating table tests_foreignkeysourcewithqlimitedchoices Creating table tests_nullableforeignkeysource Creating table tests_nullableuuidforeignkeysource Creating table tests_nestedforeignkeysource Creating table tests_onetoonetarget Creating table tests_nullableonetoonesource Creating table tests_onetoonepksource Creating table tests_custommanagermodel Creating table tests_openapiexample Running deferred SQL... Running migrations: Applying contenttypes.0001_initial... OK Applying auth.0001_initial... OK Applying admin.0001_initial... OK Applying admin.0002_logentry_remove_auto_add... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying contenttypes.0002_remove_content_type_name... OK Applying auth.0002_alter_permission_name_max_length... OK Applying auth.0003_alter_user_email_max_length... OK Applying auth.0004_alter_user_username_opts... OK Applying auth.0005_alter_user_last_login_null... OK Applying auth.0006_require_contenttypes_0002... OK Applying auth.0007_alter_validators_add_error_messages... OK Applying auth.0008_alter_user_username_max_length... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying auth.0012_alter_user_first_name_max_length... OK Applying authentication.0001_initial... OK Applying authtoken.0001_initial... OK Applying authtoken.0002_auto_20160226_1747... OK Applying authtoken.0003_tokenproxy... OK Applying authtoken.0004_alter_tokenproxy_options... OK Applying generic_relations.0001_initial... OK Applying sessions.0001_initial... OK Applying sites.0001_initial... OK Applying sites.0002_alter_domain_unique... OK Operations to perform: Synchronize unmigrated apps: importable, rest_framework, staticfiles, tests Apply all migrations: admin, auth, authentication, authtoken, contenttypes, generic_relations, sessions, sites Synchronizing apps without migrations: Creating tables... Creating table tests_basicmodel Creating table tests_manytomanytarget Creating table tests_manytomanysource Creating table tests_basicmodelwithusers Creating table tests_foreignkeytarget Creating table tests_uuidforeignkeytarget Creating table tests_foreignkeysource Creating table tests_foreignkeysourcewithlimitedchoices Creating table tests_foreignkeysourcewithqlimitedchoices Creating table tests_nullableforeignkeysource Creating table tests_nullableuuidforeignkeysource Creating table tests_nestedforeignkeysource Creating table tests_onetoonetarget Creating table tests_nullableonetoonesource Creating table tests_onetoonepksource Creating table tests_custommanagermodel Creating table tests_openapiexample Running deferred SQL... Running migrations: Applying contenttypes.0001_initial... OK Applying auth.0001_initial... OK Applying admin.0001_initial... OK Applying admin.0002_logentry_remove_auto_add... OK Applying admin.0003_logentry_add_action_flag_choices... OK Applying contenttypes.0002_remove_content_type_name... OK Applying auth.0002_alter_permission_name_max_length... OK Applying auth.0003_alter_user_email_max_length... OK Applying auth.0004_alter_user_username_opts... OK Applying auth.0005_alter_user_last_login_null... OK Applying auth.0006_require_contenttypes_0002... OK Applying auth.0007_alter_validators_add_error_messages... OK Applying auth.0008_alter_user_username_max_length... OK Applying auth.0009_alter_user_last_name_max_length... OK Applying auth.0010_alter_group_name_max_length... OK Applying auth.0011_update_proxy_permissions... OK Applying auth.0012_alter_user_first_name_max_length... OK Applying authentication.0001_initial... OK Applying authtoken.0001_initial... OK Applying authtoken.0002_auto_20160226_1747... OK Applying authtoken.0003_tokenproxy... OK Applying authtoken.0004_alter_tokenproxy_options... OK Applying generic_relations.0001_initial... OK Applying sessions.0001_initial... OK Applying sites.0001_initial... OK Applying sites.0002_alter_domain_unique... OK -------------------------------------------------------- Captured stderr setup -------------------------------------------------------- Creating test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')... Creating test database for alias 'secondary' ('file:memorydb_secondary?mode=memory&cache=shared')... ------------------------------------------------------ Captured stderr teardown ------------------------------------------------------- Destroying test database for alias 'default' ('file:memorydb_default?mode=memory&cache=shared')... Destroying test database for alias 'secondary' ('file:memorydb_secondary?mode=memory&cache=shared')... ======================================================= short test summary info ======================================================= FAILED tests/schemas/test_openapi.py::TestOperationIntrospection::test_different_request_response_objects - AssertionError: assert {'operationId': 'createExample', 'description': 'The type of the None singleton.', 'parameters': [], 'requestBody': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Request'}}, 'application/x-www-form-urlencoded': {'schema': {'$ref': '#/components/schemas/Request'}}, 'multipart/form-data': {'schema': {'$ref': '#/components/schemas/Request'}}}}, 'responses': {'201': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Response'}}}, 'description': ''}}, 'tags': ['']} == {'operationId': 'createExample', 'description': '', 'parameters': [], 'requestBody': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Request'}}, 'application/x-www-form-urlencoded': {'schema': {'$ref': '#/components/schemas/Request'}}, 'multipart/form-data': {'schema': {'$ref': '#/components/schemas/Request'}}}}, 'responses': {'201': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Response'}}}, 'description': ''}}, 'tags': ['']} Common items: {'operationId': 'createExample', 'parameters': [], 'requestBody': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Request'}}, 'application/x-www-form-urlencoded': {'schema': {'$ref': '#/components/schemas/Request'}}, 'multipart/form-data': {'schema': {'$ref': '#/components/schemas/Request'}}}}, 'responses': {'201': {'content': {'application/json': {'schema': {'$ref': '#/components/schemas/Response'}}}, 'description': ''}}, 'tags': ['']} Differing items: {'description': 'The type of the None singleton.'} != {'description': ''} Full diff: { - 'description': '', + 'description': 'The type of the None singleton.', 'operationId': 'createExample', 'parameters': [], 'requestBody': { 'content': { 'application/json': { 'schema': { '$ref': '#/components/schemas/Request', }, }, 'application/x-www-form-urlencoded': { 'schema': { '$ref': '#/components/schemas/Request', }, }, 'multipart/form-data': { 'schema': { '$ref': '#/components/schemas/Request', }, }, }, }, 'responses': { '201': { 'content': { 'application/json': { 'schema': { '$ref': '#/components/schemas/Response', }, }, }, 'description': '', }, }, 'tags': [ '', ], } ========================================================== 1 failed in 0.53s ==========================================================This is e13688f, django 5.0.6. The respective test passes with the same deps on Python 3.12.
Beta Was this translation helpful? Give feedback.
All reactions