I attempted to use BlackSheep with https://github.com/abersheeran/a2wsgi so that I could use BlackSheep with https://pywebview.flowrl.com/ which expects a WSGI application.
It doesn't work because it seems that BlackSheep does not fully conform to the ASGI specification. Specifically, the raw_path field in an ASGI connection scope is optional, but BlackSheep treats it as required. a2wsgi does not provide this field, so when running a BlackSheep app under its ASGIMiddleware, a KeyError is thrown at https://github.com/Neoteroi/BlackSheep/blob/main/blacksheep/server/application.py#L632
I thought this would be easy to fix myself, and started to attempt to, but then I ran across this block of code: https://github.com/Neoteroi/BlackSheep/blob/main/blacksheep/server/application.py#L682-L689 - it looks like MountMixin depends on raw_path being present, and I'm not sure if it would be correct to rewrite it to use path.
I attempted to use BlackSheep with https://github.com/abersheeran/a2wsgi so that I could use BlackSheep with https://pywebview.flowrl.com/ which expects a WSGI application.
It doesn't work because it seems that BlackSheep does not fully conform to the ASGI specification. Specifically, the
raw_pathfield in an ASGI connection scope is optional, but BlackSheep treats it as required.a2wsgidoes not provide this field, so when running a BlackSheep app under itsASGIMiddleware, aKeyErroris thrown at https://github.com/Neoteroi/BlackSheep/blob/main/blacksheep/server/application.py#L632I thought this would be easy to fix myself, and started to attempt to, but then I ran across this block of code: https://github.com/Neoteroi/BlackSheep/blob/main/blacksheep/server/application.py#L682-L689 - it looks like
MountMixindepends onraw_pathbeing present, and I'm not sure if it would be correct to rewrite it to usepath.