Alexandre Spaeth

Results 28 comments of Alexandre Spaeth

@liminspace would you be open for a PR for this? We are hosting the MJML function in AWS Lambda with an API Gateway and one easy way to limit access...

I fixed `allowlist_todo` and the signature for `check`. As I said, not quite sure about the signature. I feel your suggestion might be good enough. If noone else suggest something...

Thanks or the other changes. As for the `str` vs `Any`, I'm not quite sure yet. There is indeed no casting happening in the code in Django, so the current...

Even though my opinion is not completely made on the topic yet, I agree with you that types should help us write better Python, not just make us happy because...

OK, so reading a bit more how headers are constructed, I see that the values are indeed strings for ASGI: in Django, it’s done [here](https://github.com/django/django/blob/4f6a51dfe6a4a8d5ed61c73b902e808109f142b0/django/core/handlers/asgi.py#L104). (I checked other implementations, and...

Well… I guess we might want to stick with `dict[str, Any]`… See https://github.com/python/cpython/blob/3907de12b57b14f674cdcc80ae64350a23af53a0/Lib/wsgiref/types.py#L29 Edit: and see also https://github.com/python/typeshed/pull/1745 The thing is, `META` can be an `Any`, but `headers` per se...

I might be wrong, but `CaseInsensitiveMapping[str])` simply means that keys are `str`. It doesn’t say anything about values. No?

Ah actually you’re right, I read it this morning while doing my search, and thought that this is what it was, but it’s indeed enforcing that values are `str` (the...