Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/nonebot/nonecorn
ASGI server that forked from hypercorn, with extra features beyond asgi spec
https://github.com/nonebot/nonecorn
This snippet allows the default behaviour of Hypercorn < 0.11 to be
restored.
2f2e9803647a4be5ea44573b3758f8fe2d16976e authored over 4 years ago
8b130b1b9628491b98b7504269533a6875e032ae authored over 4 years ago
This makes it easier to log the path or URL with a querystring.
3fc569df7a0b9ff781495b5ed61488a30a206d96 authored over 4 years ago
This allows the server to redirect to whatever host is present in the
headers rather than having...
Since `--bind-quic` may contain a combination of IP addresses, UNIX
socket addresses and file de...
Since "alt-svc" cannot be used to redirect to these sockets, they may
not be used.
b3194de8ff7f19f89468b16b4cf46a067932b418 authored over 4 years ago
Currently file descriptors are converted into python sockets using
`socket.fromfd`, this method ...
This just returns, rather than erroring or otherwise. This is the
correct action as lifespan can...
This ensures that if the app just returns (rather than erroring or
responding to messages) the l...
Previously using the `python:` prefix on the command line would load a
python file path, this is...
0462326d91893df562147421dadea412d4597560 authored over 4 years ago
15bfd2427ccd48ee4ecf1906f6dda57b738ee969 authored over 4 years ago
According to the documentation only Python version 3.7 and above are
supported by Hypercorn. Pyt...
To match the style I use in Hypercorn.
c6df3becf73df7be03451d53f5685aaadd4bbd80 authored over 4 years ago59afd56050dcec483b6ddd1c760ed01a6d3b91c6 authored over 4 years ago
f011b7a4c4fb061a8a22ba7d850918fdca6ff98e authored over 4 years ago
25fe1094cf1ce62b044fc195617df3ec5ba92f23 authored over 4 years ago
76e729c137f12862538f284e1dca7fda650bc403 authored over 4 years ago
ac7b0b4059f229a541fe1b50a9c1e3e177fc996c authored over 4 years ago
b71b4e93928dca8796ce22a99418c4a11068a87c authored over 4 years ago
502b94e17f7f8b313c4357672a2b3b89a0e0a78d authored over 4 years ago
37cfb561fc7976306c8cd99d1b820d3fc90885f2 authored over 4 years ago
1eb74d0fee48e27b75701dcd5a1ad3e43a03459b authored over 4 years ago
34fe786345661f5d4692dd52979f47440e4e66f6 authored over 4 years ago
e35a7fd2a4c73d0dfd0b32341f5e3dba041e1081 authored over 4 years ago
3a3a2aab1f755d88f081716fdcab2799c0ec4f2c authored over 4 years ago
b34e3272c413804fdcda72087b5521c6ecefcfcd authored over 4 years ago
d3da1c8c5d791eab4d5e4d4cb741619f40318b9e authored over 4 years ago
d732aec07ad2a7f9a657660939554dc28f537c05 authored over 4 years ago
1119d02aae91214eba47fb94e660a10f729083c5 authored over 4 years ago
This was implicitly the case before (as they ran in the event loop
anyway) but could result in s...
If no shutdown trigger is provided then signal handlers are now
created by default (rather than ...
This seems to be the best practice to avoid any confusing additional
errors.
41c30e25b420bdb1630285964557adf7ef32fa60 ensured that a closing stream
would handle events after...
Gitlab CIs API is changing.
Thanks to @perobertson
maybe_recycle may run while send(Updated()) is executing, thus it sets
can_read before handle_ev...
3696cf2f92798777bb35aefc5fe41150b0d5ab9b authored over 4 years ago
c3ca27bceb4d59849ac6ae8c89f9ad887bd64850 authored over 4 years ago
This extends ab22c5c1 to also catch TimeoutErrors thereby fixing both
bugs.
This fixes 9a42bd5c5946a8ac88992b7d118b655a9ac06ea9 correctly for the
Trio version (with a test).
The lifespan must be duplicated to all mounted apps and the return
messages combined. This does ...
The previous version would only pass on the scope to the first app.
56c2111d6be87fcd62a2cbe10a4799f8faa8ad50 authored over 4 years ago
Both should be latin1 encoded not UTF-8 (as ASGI specifies). Thanks to
https://github.com/django...
80326336f035edcfa7a446c5f064d77e0442ecde authored over 4 years ago
Previously the send task would not be running after an upgrade request
(as it would have trigger...
The correct action for a scope that cannot be handled by the
middleware (or passed on) is to rai...
1. Without this field, nghttp2 report the following errors:
[ERROR] Failed to parse HTTP Upgrad...
674862d8a54800951a1a196b015d95cdf86085d7 authored over 4 years ago9fbad6c0f7b18e6bce1db33bf38373702a4f541a authored over 4 years ago
6001f5d527c05c2826ed70b77f54ccc4af8f2e97 authored over 4 years ago
This is a very common use case, and should be better advertised.
e7213689888b1d9ac883abc3fa774ded77d8e992 authored over 4 years ago
I prefer poetry, but pip indicates any manager can be used without
stating a preference.
If the stream closes earlier than the client, especially for
websockets when the server closes w...
Request lines end after two newlines
GET doesn't have a body
This is clearer and less prone to error.
78b229ce8a18183080636028345f31482afd073f authored over 4 years ago
This prevents teh server crashing trying to handle the request body
after rejecting the request ...
8170cdc6079f8c1203eee7b555f35914a21e9d12 authored over 4 years ago
75b012bff739f6839125561d01996f5b6656eca0 authored over 4 years ago
This should give any tasks (requests, or background) the graceful
timeout to finish before they ...
This allows the connection to be kept alive (busy) until either the
client disconnects or the AS...
Previously the event loop specific calls, e.g. spawn, sleep, time, all
had to be done within the...
e1a3973c78f554540e0b01587114f73e8dcd083d authored over 4 years ago
This allows Hypercorn to serve WSGI applications via the use of this
middleware.
Whilst this ex...
d32ffd73a97ba8b24f9def1f21da80d67fcd85a3 authored over 4 years ago
This allows the valid hosts to be configured and for Hypercorn to only
reply to these hosts (404...
This is another indicator of the connection being closed (depending on
which race condition wins...
Switch from asynctest to the stdlib (with a backport as AsyncMock was
introduced in 3.8) and upd...
This is based on @blueyed work in !28.
Extracting the module paths is fairly expensive, as is y...
7caaadba5869983d8d391b09563a52042ef418b2 authored over 4 years ago
This follows Uvicorn and a suggestion from @selimb to ensure that the
signal handlers are presen...
414fbb80c0f4ddffdafa27fbb22217ea2e5cc2fa authored over 4 years ago
If the client is in a errored state after the request line, for
example from sending body beyond...
This will help users understand how to ignore SSLErrors if they use
the API.
The QuicConnection constructor now needs to be passed the Original
Destination Connection ID whe...
The loop argument should also have been removed.
5c0b8160ac0f28ac13d4e0e3235fd936fc24267b authored over 4 years ago
f092554447c0e811841a258b45856f467d8830d9 introduced a mandatory task
group argument that wasn't ...
fe12c0ae9ea89058e3e06eaf0992331a766609bc authored almost 5 years ago
540b10b70e3495587534bb61f3ae13352688db41 authored almost 5 years ago
Both are potentially raised if the stream (application) tries to send
events after the connectio...
This follows the clarification in
https://github.com/python-hyper/h11/issues/100 that the empty
...
This introduces a simple version of the trio nursery to manage the
tasks spawned in the TCP serv...
7fc168c7c86854a28c6e6879ad50467e9c392871 authored almost 5 years ago
Trying to call write_eof on a closed uvloop stream will result in a
RuntimeError. As this was no...
297bc774153d576b8ddbac039292c2a06b10ae74 authored almost 5 years ago
2579388e8a2375e4974a0375be53873c3c243d40 authored almost 5 years ago
This fixes aa52319e648585ba2388e906593edee4b1fb5ed1
ab22c5c144257102c7a867ecbe6a03d2ee62cf85 authored almost 5 years ago
There can only be a single task waiting on the drain otherwise this
line raises an AssertionErro...
3e57b7d33cef09eb51122158a75c34e9a7a8fb4c authored almost 5 years ago
c0e45a5c1c61e7f3f698d770492a04b51e2b01bc authored almost 5 years ago
As per
TrioDeprecationWarning: trio.Event.clear is deprecated since Trio
0.12.0; use mult...
It is important that the tasks spawned when a connection is
established complete. This wouldn't ...
This ensures the timeout update is atomic in that only one task can
delete and then create a tim...
These are further exception variants when the client has disconnected,
this now triggers a conne...
The path is percent decoded, which makes it unsuitable to be sent back
to the client as a reques...
This copes with disconnection when the handler tries to read the
peername i.e. Errno 107 Socket ...
See https://github.com/Teemu/pytest-sugar/issues/187.
de3961214d5d5b44b6fa8ed6711bc86ae720c54c authored almost 5 years agod9214214701df939f8831ad3fa623c53ad45a007 authored almost 5 years ago
As the theme has renamed
eaa2f9631339eb376a38f913f551cd4babe5ca57 authored almost 5 years ago
The underlying socket can also raise a TimeoutError which should be
caught and handled as if the...
This Partially reverts 13bbb7faeebed7462449d751b0e198079c120755
This was breaking keep alive ha...
4f3cb156f4b578495bdc24f47ce44df2d74ebc70 authored almost 5 years ago