Swap `open_channel_from()` yield-pair order
Match upstream `tractor` API change where `open_channel_from()` now yields `(chan, first)` instead of `(first, chan)` — i.e. `tuple[LinkedTaskChannel, Any]`. - `brokers/ib/api.py` - `brokers/ib/broker.py` - `brokers/ib/feed.py` - `brokers/deribit/api.py` (2 sites) (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codeto_asyncio_api_update
parent
a32ffb75f2
commit
f7244b89f8
|
|
@ -586,7 +586,7 @@ async def open_price_feed(
|
||||||
fh,
|
fh,
|
||||||
instrument
|
instrument
|
||||||
)
|
)
|
||||||
) as (first, chan):
|
) as (chan, first):
|
||||||
yield chan
|
yield chan
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -653,7 +653,7 @@ async def open_order_feed(
|
||||||
fh,
|
fh,
|
||||||
instrument
|
instrument
|
||||||
)
|
)
|
||||||
) as (first, chan):
|
) as (chan, first):
|
||||||
yield chan
|
yield chan
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1529,7 +1529,7 @@ async def open_client_proxies() -> tuple[
|
||||||
# TODO: maybe this should be the default in tractor?
|
# TODO: maybe this should be the default in tractor?
|
||||||
key=tractor.current_actor().uid,
|
key=tractor.current_actor().uid,
|
||||||
|
|
||||||
) as (cache_hit, (clients, _)),
|
) as (cache_hit, (_, clients)),
|
||||||
|
|
||||||
AsyncExitStack() as stack
|
AsyncExitStack() as stack
|
||||||
):
|
):
|
||||||
|
|
@ -1718,7 +1718,7 @@ async def open_client_proxy(
|
||||||
open_aio_client_method_relay,
|
open_aio_client_method_relay,
|
||||||
client=client,
|
client=client,
|
||||||
event_consumers=event_table,
|
event_consumers=event_table,
|
||||||
) as (first, chan),
|
) as (chan, first),
|
||||||
|
|
||||||
trionics.collapse_eg(), # loose-ify
|
trionics.collapse_eg(), # loose-ify
|
||||||
trio.open_nursery() as relay_tn,
|
trio.open_nursery() as relay_tn,
|
||||||
|
|
|
||||||
|
|
@ -514,8 +514,8 @@ async def open_trade_event_stream(
|
||||||
recv_trade_updates,
|
recv_trade_updates,
|
||||||
client=client,
|
client=client,
|
||||||
) as (
|
) as (
|
||||||
_, # first pushed val
|
|
||||||
trade_event_stream,
|
trade_event_stream,
|
||||||
|
_, # first pushed val
|
||||||
):
|
):
|
||||||
task_status.started(trade_event_stream)
|
task_status.started(trade_event_stream)
|
||||||
# block forever to keep session trio-asyncio session
|
# block forever to keep session trio-asyncio session
|
||||||
|
|
|
||||||
|
|
@ -989,7 +989,7 @@ async def open_aio_quote_stream(
|
||||||
symbol=symbol,
|
symbol=symbol,
|
||||||
contract=contract,
|
contract=contract,
|
||||||
|
|
||||||
) as (contract, from_aio):
|
) as (from_aio, contract):
|
||||||
|
|
||||||
assert contract
|
assert contract
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue