Code Monkey home page Code Monkey logo

Comments (4)

Lawouach avatar Lawouach commented on June 11, 2024 1

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.

florimondmanca avatar florimondmanca commented on June 11, 2024

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.

Lawouach avatar Lawouach commented on June 11, 2024

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.

florimondmanca avatar florimondmanca commented on June 11, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.