Clinical-Genomics / preClinVar

A ClinVar API submission helper written in FastAPI
MIT License
1 stars 0 forks source link

[deprecatiob] on_event is deprecated, use lifespan event handlers instead. #133

Open northwestwitch opened 2 months ago

northwestwitch commented 2 months ago
preClinVar/main.py:22
  /Users/chiararasi/Documents/work/GITs/preClinVar/preClinVar/main.py:22: DeprecationWarning:
          on_event is deprecated, use lifespan event handlers instead.

          Read more about it in the
          [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).

    @app.on_event("startup")

../../../../../../opt/homebrew/Caskroom/miniconda/base/envs/preclinvar/lib/python3.9/site-packages/fastapi/applications.py:4495
  /opt/homebrew/Caskroom/miniconda/base/envs/preclinvar/lib/python3.9/site-packages/fastapi/applications.py:4495: DeprecationWarning:
          on_event is deprecated, use lifespan event handlers instead.

          Read more about it in the
          [FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/).

    return self.router.on_event(event_type)

../../../../../../opt/homebrew/Caskroom/miniconda/base/envs/preclinvar/lib/python3.9/site-packages/httpx/_client.py:680
  /opt/homebrew/Caskroom/miniconda/base/envs/preclinvar/lib/python3.9/site-packages/httpx/_client.py:680: DeprecationWarning: The 'app' shortcut is now deprecated. Use the explicit style 'transport=WSGITransport(app=...)' instead.
    warnings.warn(message, DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html