Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dni
Copy link
Member

@dni dni commented Feb 23, 2024

recommended use: https://fastapi.tiangolo.com/advanced/events/?h=lifespan

threw warnings in pytest

tests/core/test_db.py::test_create_wallet_and_delete_wallet
  /home/dni/repos/lnbits/lnbits/lnbits/app.py:467: 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")

tests/core/test_db.py::test_create_wallet_and_delete_wallet
  /home/dni/repos/lnbits/lnbits/lnbits/app.py:410: 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("shutdown")

@dni dni added this to the 0.12.3 milestone Feb 23, 2024
@dni dni force-pushed the fastapi-deprecations branch from fdf595a to b8b713d Compare February 28, 2024 06:37
@dni
Copy link
Member Author

dni commented Mar 12, 2024

@dni dni force-pushed the fastapi-deprecations branch from b8b713d to fd1f9c0 Compare March 12, 2024 07:29
@dni dni requested review from jackstar12 and motorina0 March 12, 2024 07:30
@dni dni marked this pull request as ready for review March 12, 2024 07:30
@dni dni marked this pull request as draft March 21, 2024 16:41
@dni dni removed this from the 0.12.3 milestone Mar 22, 2024
@dni dni force-pushed the fastapi-deprecations branch 2 times, most recently from a477638 to 9b9eb0c Compare March 26, 2024 21:14
@dni dni marked this pull request as ready for review March 26, 2024 21:18
@dni dni added the code health Make the code more beautiful label Mar 26, 2024
@dni dni requested review from prusnak and talvasconcelos March 26, 2024 21:19
@dni dni added this to the 0.12.5 milestone Mar 26, 2024
@dni dni force-pushed the fastapi-deprecations branch 2 times, most recently from 672862b to 300823c Compare March 26, 2024 21:57
@codecov
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 86.84211% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 58.44%. Comparing base (d64239f) to head (d2fcd27).

Files Patch % Lines
lnbits/app.py 86.84% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2294      +/-   ##
==========================================
- Coverage   58.58%   58.44%   -0.14%     
==========================================
  Files          65       65              
  Lines        9353     9347       -6     
==========================================
- Hits         5479     5463      -16     
- Misses       3874     3884      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dni dni changed the title refactor: use new fastapi lifespan instead of events refactor: use new fastapi lifespan instead of startup/stop events Mar 26, 2024
@dni dni changed the title refactor: use new fastapi lifespan instead of startup/stop events refactor: use new fastapi lifespan instead of startup/shutdown events Mar 26, 2024
@dni dni force-pushed the fastapi-deprecations branch from 300823c to 9b93729 Compare March 28, 2024 08:51
@dni
Copy link
Member Author

dni commented Mar 28, 2024

@prusnak can i request your help with the nix CI i added asgi-lifespan

@prusnak
Copy link
Collaborator

prusnak commented Mar 28, 2024

Let's wait until nix-community/poetry2nix#1563 is merged

Then all we need is to update the poetry2nix flake to fix the build

@dni dni force-pushed the fastapi-deprecations branch from 9b93729 to 282c611 Compare April 3, 2024 08:13
@prusnak prusnak force-pushed the fastapi-deprecations branch from a253a0a to d2fcd27 Compare April 4, 2024 19:53
Copy link
Collaborator

@prusnak prusnak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nix is fixed now

@dni dni merged commit 820882d into dev Apr 5, 2024
@dni dni deleted the fastapi-deprecations branch April 5, 2024 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code health Make the code more beautiful

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants