Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
Flask-WTF
to address test warnings (#1114)
## Fixes issue #1054 ## Description of Changes Addressed the below error by updating `Flask-WTF`: ```console ../../local/lib/python3.11/site-packages/flask_wtf/recaptcha/widgets.py:2: 10 warnings /usr/local/lib/python3.11/site-packages/flask_wtf/recaptcha/widgets.py:2: DeprecationWarning: 'flask.Markup' is deprecated and will be removed in Flask 2.4. Import 'markupsafe.Markup' instead. from flask import Markup ``` ## Tests and Linting - [x] This branch is up-to-date with the `develop` branch. - [x] `pytest` passes on my local development environment. - [x] `pre-commit` passes on my local development environment. - [x] Verified warning is no longer in the `warnings summary`. ```console =============================== warnings summary =============================== OpenOversight/tests/test_commands.py::test_add_department__duplicate OpenOversight/tests/test_models.py::test__uuid_uniqueness_constraint OpenOversight/tests/routes/test_singular_redirects.py::test_redirect_add_salary /usr/src/app/OpenOversight/tests/conftest.py:325: SAWarning: transaction already deassociated from connection transaction.rollback() OpenOversight/tests/test_models.py::test_salary_repr /usr/src/app/OpenOversight/tests/test_models.py:170: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider storing Decimal numbers as strings or integers on this platform for lossless storage. salary = Salary.query.first() OpenOversight/tests/test_database_cache.py::test_documented_assignments OpenOversight/tests/test_functional.py::test_incident_detail_display_read_more_button_for_descriptions_over_cutoff /usr/local/lib/python3.11/site-packages/jinja2/environment.py:487: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider storing Decimal numbers as strings or integers on this platform for lossless storage. return getattr(obj, attribute) OpenOversight/tests/test_commands.py::test_csv_import_new /usr/src/app/OpenOversight/tests/conftest.py:855: SAWarning: Dialect sqlite+pysqlite does *not* support Decimal objects natively, and SQLAlchemy must convert from floating point - rounding errors and other issues may occur. Please consider storing Decimal numbers as strings or integers on this platform for lossless storage. if len(list(officer.salaries)) > 0: OpenOversight/tests/test_commands.py::test_csv_new_salary /usr/src/app/OpenOversight/tests/test_commands.py:463: FutureWarning: Setting an item of incompatible dtype is deprecated and will raise an error in a future version of pandas. Value '123456.78' has dtype incompatible with float64, please explicitly cast to a compatible dtype first. df.loc[0, "salary"] = "123456.78" OpenOversight/tests/test_functional.py: 138 warnings /usr/local/lib/python3.11/site-packages/selenium/webdriver/remote/remote_connection.py:418: DeprecationWarning: HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default). if resp.getheader('Content-Type') is not None: OpenOversight/tests/test_functional.py: 138 warnings /usr/local/lib/python3.11/site-packages/selenium/webdriver/remote/remote_connection.py:419: DeprecationWarning: HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default). content_type = resp.getheader('Content-Type').split(';') -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ---------- coverage: platform linux, python 3.11.9-final-0 ----------- ```
- Loading branch information