Open vxgmichel opened 2 years ago
I think the issue here is that wsproto doesn't accept (by typing) a h11.Headers
instance as an argument to initiate_upgrade_connection
. I think this is correct as I don't think h11.Headers
should be used in other libraries. It is also possible to convert a h11.Headers
to a list for wsproto via something like list(headers)
.
At the moment, the
wsproto.typing.Header
type is not compatible withh11._headers.Header
which is defined as the following, starting with version0.13.0
:The following patch might provide this compatibility:
This would fix mypy errors such as:
Would that make sense? I can make a PR if necessary.