Make ``start_soon`` a protocol.
Don't care for bikeshedding over the name of the protocol. The definition of start_soon is directly copied from Nursery.
I would've liked Nursery to explicitly implement TaskSpawner but it can't due to metaclass clashing.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
d4ce2f9) 99.49% compared to head (47ed6c9) 99.49%. Report is 7 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #2907 +/- ##
=======================================
Coverage 99.49% 99.49%
=======================================
Files 115 115
Lines 17704 17704
Branches 3158 3158
=======================================
Hits 17615 17615
Misses 70 70
Partials 19 19
| Files | Coverage Δ | |
|---|---|---|
| src/trio/_abc.py | 100.00% <100.00%> (ø) |
|
| src/trio/_highlevel_open_tcp_listeners.py | 100.00% <ø> (ø) |
|
| src/trio/_highlevel_serve_listeners.py | 100.00% <100.00%> (ø) |
|
| src/trio/_highlevel_ssl_helpers.py | 100.00% <ø> (ø) |
|
| src/trio/abc.py | 100.00% <ø> (ø) |
I'm not changing the name.
Hi, just a bump! re: my last comment I still can't think of normal usage that requires this to be exported.
does this really need to be exported? I imagine any normal usage of this will just have the concrete other nursery as a type hint:
I already changed type hints for listeners to accept this, so yes, it does.
I'll get around to fixing the docstring at some point soon.
Yeah, I don't really care to do this anymore. I'll just close it.