Comments (4)
Yeap, feel free to close it actually.
I have a fairly large testsuite so there is likely some other stuff going on here.
Cheers for responding fast :)
from asgi-lifespan.
Hi!
Which version of this package were you using? As of 1.0 there is no dependency on Starlette anymore. :) (At least, judging from master.)
from asgi-lifespan.
The latest I guess. But the dependency is part of the requirements.txt file :)
https://github.com/florimondmanca/asgi-lifespan/blob/master/requirements.txt
from asgi-lifespan.
The requirements.txt
file is for development dependencies only (Starlette is used for testing). Runtime dependencies are specified in setup.py
, and Starlette is not in there. :-)
So at this point I'm thinking the hang might be a proper bug triggered by some specific aspects of your tests setup (or it's caused by something else than asgi-lifespan
?)…
FWIW, I wasn't able to reproduce it on the following minimal setup:
import asyncio
from asgi_lifespan import LifespanManager
from starlette.applications import Starlette
app = Starlette(
on_startup=[lambda: print("startup")], on_shutdown=[lambda: print("shutdown")]
)
async def main():
async with LifespanManager(app):
pass
asyncio.run(main())
$ pip install "starlette==0.12.*" "asgi-lifespan==1.*"
$ python example.py
startup
shutdown
from asgi-lifespan.
Related Issues (16)
- Usage examples should be tested
- Testing use case guide HOT 3
- Can't use LifespanManager with pytest-asyncio HOT 2
- Remove dependency on anyio?
- Switch to register-on-init style for Lifespan event handlers
- Enforcing top-level imports
- Should we get rid of `Lifespan` and `LifespanMiddleware`? HOT 8
- Implement lifespan manager
- Implement lifespan middleware
- Handling `lifespan.shutdown.failed` ASGI messages HOT 1
- [feature request] support ContextVars HOT 9
- Test fail on FreeBSD HOT 1
- Error reproducing an example from the REAME.md HOT 3
- Support for lifespan state HOT 10
- Implement lifespan app
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asgi-lifespan.