snok / asgi-correlation-id

Request ID propagation for ASGI apps
MIT License
369 stars 29 forks source link

starlette marked as dev dependency in poetry.lock but needed for usage #43

Closed tamarabester closed 1 year ago

tamarabester commented 1 year ago

Hi, I've installed asgi-correlation-id using poetry, and when tried to use CorrelationIdFilter received the error ValueError: Cannot resolve 'asgi_correlation_id.CorrelationIdFilter': No module named 'starlette' (poetry add starlette resolved the issue for now). By looking at asgi-correlation-id's poetry.lock, it seems like starlette is marked as a dev-dependency and therefore is not automatically installed during poetry add asgi-correlation-id. This means that starlette needs to be manually added every time asgi-correlation-id is installed. If that can be changed, it would be highly appreciated!

sondrelg commented 1 year ago

I think at one point the idea was to make this middleware framework agnostic; i.e., not require starlette. However, that's not really true anymore, so yeah I agree the dependency should be moved up :+1:

I'll fix the issue and release a new version shortly :slightly_smiling_face: Thanks for letting me know!

sondrelg commented 1 year ago

Would you be able to validate that 3.0.1 seems to work OK @tamarabester? 🙂