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

pytest warnings #1773

Open
Kunsi opened this issue Sep 1, 2024 · 1 comment
Open

pytest warnings #1773

Kunsi opened this issue Sep 1, 2024 · 1 comment

Comments

@Kunsi
Copy link
Contributor

Kunsi commented Sep 1, 2024

Noticed while preparing tests for #1770, pytest outputs a bunch of warnings:

================================================== warnings summary ===================================================
models/volunteer/shift.py:74
  /app/models/volunteer/shift.py:74: RemovedIn20Warning: Deprecated API features detected! These feature(s) are not compatible with SQLAlchemy 2.0. To prevent incompatible upgrades prior to updating applications, ensure requirements files are pinned to "sqlalchemy<2.0". Set environment variable SQLALCHEMY_WARN_20=1 to show all deprecation warnings.  Set environment variable SQLALCHEMY_SILENCE_UBER_WARNING=1 to silence this message. (Background on SQLAlchemy 2.0 at: https://sqlalche.me/e/b8d9)
    select([func.count(ShiftEntry.shift_id)]).where(ShiftEntry.shift_id == id).correlate_except(ShiftEntry).scalar_subquery()  # type: ignore[attr-defined,arg-type]

../root/.cache/pypoetry/virtualenvs/website-9TtSrW0h-py3.11/lib/python3.11/site-packages/dateutil/parser/_parser.py:1207: 1 warning
tests/test_cfp_sense_check.py: 15 warnings
  /root/.cache/pypoetry/virtualenvs/website-9TtSrW0h-py3.11/lib/python3.11/site-packages/dateutil/parser/_parser.py:1207: UnknownTimezoneWarning: tzname BST identified but not understood.  Pass `tzinfos` argument in order to correctly return a timezone-aware datetime.  In a future version, this will raise an exception.
    warnings.warn("tzname {tzname} identified but not understood.  "

tests/test_sql_query_count.py::test_query_count[/tickets-2]
  /root/.cache/pypoetry/virtualenvs/website-9TtSrW0h-py3.11/lib/python3.11/site-packages/flask_admin/contrib/__init__.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    __import__('pkg_resources').declare_namespace(__name__)

tests/test_sql_query_count.py::test_query_count[/tickets-2]
tests/test_sql_query_count.py::test_query_count[/tickets-2]
  /root/.cache/pypoetry/virtualenvs/website-9TtSrW0h-py3.11/lib/python3.11/site-packages/pkg_resources/__init__.py:2825: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('zope')`.
  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/test_sql_query_count.py::test_query_count[/tickets-2]
  /root/.cache/pypoetry/virtualenvs/website-9TtSrW0h-py3.11/lib/python3.11/site-packages/flask_admin/contrib/__init__.py:2: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('flask_admin.contrib')`.
  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
    __import__('pkg_resources').declare_namespace(__name__)

tests/test_sql_query_count.py::test_query_count[/tickets-2]
  /root/.cache/pypoetry/virtualenvs/website-9TtSrW0h-py3.11/lib/python3.11/site-packages/pkg_resources/__init__.py:2309: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('flask_admin')`.
  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(parent)
@jayaddison
Copy link
Contributor

Yep, those are noisy - this appears to be due to some code in flask-admin 1.6.1 -- fortunately it appears to already be fixed by a subsequent change (pallets-eco/flask-admin@1247073) that should arrive in flask-admin v2.0.0.

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

No branches or pull requests

2 participants