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

Address deprecation warnings #85

Open
sajith opened this issue Apr 27, 2023 · 0 comments
Open

Address deprecation warnings #85

sajith opened this issue Apr 27, 2023 · 0 comments
Assignees

Comments

@sajith
Copy link
Member

sajith commented Apr 27, 2023

Running the test suit emits some deprecation warnings from connexion and flask. It would be good to address them so that we are not surprised by future breakage.

See this test run, for example:

2023-04-27T14:36:24.6949293Z .tox/py3/lib/python3.9/site-packages/connexion/decorators/validation.py:16
2023-04-27T14:36:24.6950310Z .tox/py3/lib/python3.9/site-packages/connexion/decorators/validation.py:16
2023-04-27T14:36:24.6952338Z   /home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/connexion/decorators/validation.py:16: DeprecationWarning: Accessing jsonschema.draft4_format_checker is deprecated and will be removed in a future release. Instead, use the FORMAT_CHECKER attribute on the corresponding Validator.
2023-04-27T14:36:24.6953809Z     from jsonschema import Draft4Validator, ValidationError, draft4_format_checker
2023-04-27T14:36:24.6954292Z 
2023-04-27T14:36:24.6954652Z swagger_server/test/test_connection_controller.py: 3 warnings
2023-04-27T14:36:24.6955348Z swagger_server/test/test_link_controller.py: 4 warnings
2023-04-27T14:36:24.6956025Z swagger_server/test/test_node_controller.py: 4 warnings
2023-04-27T14:36:24.6956717Z swagger_server/test/test_topology_controller.py: 8 warnings
2023-04-27T14:36:24.6957394Z swagger_server/test/test_user_controller.py: 8 warnings
2023-04-27T14:36:24.6963117Z   /home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/connexion/apps/flask_app.py:36: DeprecationWarning: 'app.json_encoder' is deprecated and will be removed in Flask 2.3. Customize 'app.json_provider_class' or 'app.json' instead.
2023-04-27T14:36:24.6964845Z     app.json_encoder = FlaskJSONEncoder
2023-04-27T14:36:24.6965474Z 
2023-04-27T14:36:24.6966032Z swagger_server/test/test_connection_controller.py: 3 warnings
2023-04-27T14:36:24.6966426Z swagger_server/test/test_link_controller.py: 4 warnings
2023-04-27T14:36:24.6967160Z swagger_server/test/test_node_controller.py: 4 warnings
2023-04-27T14:36:24.6967663Z swagger_server/test/test_topology_controller.py: 8 warnings
2023-04-27T14:36:24.6968032Z swagger_server/test/test_user_controller.py: 8 warnings
2023-04-27T14:36:24.6968980Z   /home/runner/work/sdx-lc/sdx-lc/swagger_server/test/__init__.py:13: DeprecationWarning: 'app.json_encoder' is deprecated and will be removed in Flask 2.3. Customize 'app.json_provider_class' or 'app.json' instead.
2023-04-27T14:36:24.6969816Z     app.app.json_encoder = JSONEncoder
2023-04-27T14:36:24.6970005Z 
2023-04-27T14:36:24.6970186Z swagger_server/test/test_connection_controller.py: 15 warnings
2023-04-27T14:36:24.6970542Z swagger_server/test/test_link_controller.py: 20 warnings
2023-04-27T14:36:24.6970907Z swagger_server/test/test_node_controller.py: 20 warnings
2023-04-27T14:36:24.6971280Z swagger_server/test/test_topology_controller.py: 40 warnings
2023-04-27T14:36:24.6971646Z swagger_server/test/test_user_controller.py: 40 warnings
2023-04-27T14:36:24.6972989Z   /home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/connexion/spec.py:50: DeprecationWarning: Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).iter_errors(...) instead.
2023-04-27T14:36:24.6974012Z     for error in instance_validator.iter_errors(instance['default'], instance):
2023-04-27T14:36:24.6980786Z 
2023-04-27T14:36:24.6981066Z swagger_server/test/test_connection_controller.py: 3 warnings
2023-04-27T14:36:24.6981435Z swagger_server/test/test_link_controller.py: 4 warnings
2023-04-27T14:36:24.6981792Z swagger_server/test/test_node_controller.py: 4 warnings
2023-04-27T14:36:24.6982160Z swagger_server/test/test_topology_controller.py: 8 warnings
2023-04-27T14:36:24.6982531Z swagger_server/test/test_user_controller.py: 8 warnings
2023-04-27T14:36:24.6983611Z   /home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/connexion/apis/flask_api.py:236: DeprecationWarning: '_request_ctx_stack' is deprecated and will be removed in Flask 2.3.
2023-04-27T14:36:24.6984426Z     setattr(flask._request_ctx_stack.top, 'connexion_context', context_dict)
2023-04-27T14:36:24.6984746Z 
2023-04-27T14:36:24.6985026Z swagger_server/test/test_connection_controller.py: 3 warnings
2023-04-27T14:36:24.7034965Z swagger_server/test/test_link_controller.py: 4 warnings
2023-04-27T14:36:24.7035345Z swagger_server/test/test_node_controller.py: 4 warnings
2023-04-27T14:36:24.7035737Z swagger_server/test/test_topology_controller.py: 8 warnings
2023-04-27T14:36:24.7036108Z swagger_server/test/test_user_controller.py: 8 warnings
2023-04-27T14:36:24.7037106Z   /home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/connexion/apis/flask_api.py:236: DeprecationWarning: '_request_ctx_stack' is deprecated and will be removed in Flask 2.3. Use 'g' to store data, or 'request_ctx' to access the current context.
2023-04-27T14:36:24.7037876Z     setattr(flask._request_ctx_stack.top, 'connexion_context', context_dict)
2023-04-27T14:36:24.7038221Z 
2023-04-27T14:36:24.7038383Z swagger_server/test/test_connection_controller.py: 4 warnings
2023-04-27T14:36:24.7038710Z swagger_server/test/test_link_controller.py: 6 warnings
2023-04-27T14:36:24.7039323Z swagger_server/test/test_node_controller.py: 6 warnings
2023-04-27T14:36:24.7039652Z swagger_server/test/test_topology_controller.py: 10 warnings
2023-04-27T14:36:24.7039978Z swagger_server/test/test_user_controller.py: 12 warnings
2023-04-27T14:36:24.7040798Z   /home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/flask/json/provider.py:188: DeprecationWarning: Setting 'json_encoder' on the app or a blueprint is deprecated and will be removed in Flask 2.3. Customize 'app.json' instead.
2023-04-27T14:36:24.7041229Z     warnings.warn(
2023-04-27T14:36:24.7041348Z 
2023-04-27T14:36:24.7041487Z swagger_server/test/test_connection_controller.py: 4 warnings
2023-04-27T14:36:24.7041772Z swagger_server/test/test_link_controller.py: 6 warnings
2023-04-27T14:36:24.7042035Z swagger_server/test/test_node_controller.py: 6 warnings
2023-04-27T14:36:24.7042318Z swagger_server/test/test_topology_controller.py: 10 warnings
2023-04-27T14:36:24.7042604Z swagger_server/test/test_user_controller.py: 12 warnings
2023-04-27T14:36:24.7043278Z   /home/runner/work/sdx-lc/sdx-lc/.tox/py3/lib/python3.9/site-packages/flask/json/provider.py:230: DeprecationWarning: 'JSONEncoder' is deprecated and will be removed in Flask 2.3. Use 'Flask.json' to provide an alternate JSON implementation instead.
2023-04-27T14:36:24.7044010Z     return json.dumps(obj, **kwargs)
2023-04-27T14:36:24.7044145Z 
@sajith sajith self-assigned this Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant