port_to_latest_tractor #45

Merged
goodboy merged 13 commits from port_to_latest_tractor into main 2026-01-07 04:43:28 +00:00

Getting us on tractor::main+ (technically the piker_pin) branch and thus,

  • unbreaking the pikers::main branch since landing https://www.pikers.dev/pikers/piker/pulls/53 which brought in some pyproject.toml/uv stuff a bit sooner then i shoulda bc I needed it for testing on NixOS/wayland.. Bp
  • formally adding proper cpython 3.13+ support which works at runtime B)
  • gets us on trio>=0.27 and working with all the strict-exception-groups-is-default “loveliness” Bp
  • updates (mostly?) everything to latest tractor APIs, typing and the newly exposed pytest plugin (which namely exposes a buncha handy fixtures).
  • tries out the UDS IPC transport (originally)

NB: there might still be some (small) warts todo with strict ExceptionGroup nurseries in trio mostly just with large tracebacks when SIGINT-ing the console .

Still todo prolly (but likely to come in follow-up..)

  • ideally minimizing more of the egs of nested multi-cancelleds..
  • replace the final (2?) strict_exception_groups=False in piker.tsp and tests/test_questrade.py.
Getting us on `tractor::main`+ (technically the `piker_pin`) branch and thus, - unbreaking the `pikers::main` branch since landing https://www.pikers.dev/pikers/piker/pulls/53 which brought in some `pyproject.toml`/`uv` stuff a bit sooner then i shoulda bc I needed it for testing on NixOS/wayland.. Bp - formally adding proper cpython 3.13+ support which works at runtime B) - gets us on `trio>=0.27` and working with all the strict-exception-groups-is-default "loveliness" Bp - updates (mostly?) everything to latest `tractor` APIs, typing and the newly exposed `pytest` plugin (which namely exposes a buncha handy fixtures). - tries out the UDS IPC transport (originally) NB: there might still be some (small) warts todo with strict `ExceptionGroup` nurseries in `trio` mostly just with large tracebacks when `SIGINT`-ing the console . --- #### Summary of hi-ish-level adjustments - bulk of the changes are related to `trio>=0.27` and thus moving to the use of, * `tractor.trionics.collapse_eg()` to smooth over strict-exception-group nurseries (now the default in `trio`). * adjusting to new `.ipc/._addr/._discovery/.get_root_actor()` ifaces. - see https://github.com/goodboy/tractor/pull/391 for lowlevel deats. * using `.trionics.maybe_raise_from_masking_exc()` to deal with issues thoroughly documented in, - https://github.com/goodboy/tractor/pull/387 - https://github.com/goodboy/tractor/pull/390 * renaming all `trio.Nursery` refs as the var `tn` (for "task nursery") - in our chart UI, tweaking the `brokerd` sidepane info to pull from new actor/IPC-transport meta-data fields like `tractor.Channel.aid: Aid` and **not** presume TCP as the IPC tpt proto B) --- #### Still todo prolly (but likely to come in follow-up..) - ideally minimizing more of the egs of nested multi-cancelleds.. - replace the final (2?) `strict_exception_groups=False` in `piker.tsp` and `tests/test_questrade.py`.
goodboy added 7 commits 2025-06-26 14:43:58 +00:00
b87ca76700 Bump to (latest) `polars`, the `0.20.6x` series B)
Since I was trying out the neat lookin `polars-fuzzy-match` (also added
for now as a core dep here) which requires the new plugin sys, plus it's
about time we synced with upstream!

Adjust some column syntax to the new `.name` sub-field-space and the
`uv` lock-file to match.

Other,
- add back `trio-typing` bc i guess something else needs it (debug
  tooling stuff in new `tractor`?)
- flip back to the `tractor` pre-main pin since the new `main`-branch
  requires new `trio` stuff we haven't ported yet..
f1b4550483 Flip to latest `tractor` @ `branch = main` deps
Namely requiring a `trio` that supports py3.13, so "trio >=0.27".
Unfortunately this brings in strict egs and drops various `trio`-related
sub-deps we also import in `piker`, like `trio-typing`. So there's a few
"rough edges", mostly todo with the REPL activating on graceful cancels
(SIGINT) of `piker` CLIs atm - due to the new strict-egs in recent
`trio`, but nothing we can't work out pretty quickly i'd imagine with
the new `tractor.collapse_eg()` stacker.

Note that we're pinning to `tractor`'s main branch for the moment since
it should be "stable" vs. the `repl_fixture` i'm likely running local Bp
7e82bf0729 Support python 3.13 !!
Luckily all core deps are already ported so this was pretty easy!

B)

I've opted (via `tool.uv` settings) to prefer the user's system
(installed) python distro and disable auto-download of astral's
distros for now since I recently hit some strange silent core dumping
(`brokerd` actors just disappearing..)
with their binaries; an introspect showed it seemingly todo with
p_threading in cpython internals? We can figure out how to
better accommodate users with the opposite pref later, presumably
non-opinionated-linux hackers?

Core pkg upgrades of note,
- manually re-pinned most numerics libs including `numpy`, `numba`,
  `pyarrow`.
- for AOT ext-libs (thanks to `uv.lock` being so detailed), new
  `cython`, `llvmlite`, `cffi`, `rapidfuzz`, `uvloop`, `wrapt` and
  `PyQt6` wheels pulled in.
- `cryptofeed` did a required bump to `2.4.0` looks like which also
  required the above (and notable?) `cffi` update.
goodboy added 3 commits 2025-06-26 15:06:54 +00:00
b01edcf65a kraken: `Pair.costmin` is now optional?
Some pairs don't seem to define it but it's not listed as deprecated on
official API page (new one now linked in type def's doc string).
baff466ee0 kraken: add crash-handling around `Pair()` init
Since it can otherwise be difficult to debug due to nursery cancellation
(we need that taskman yo!).
6f782862f8 Adjust to `trio`'s strict eg nurseries throughout!
Using `tractor.trionics.collapse_eg()` as needed to avoid, at the least,
crash-worthy (in debug-mode REPL-ing terms) nested cancellation egs that
exhibit on SIGINT/ctl-c of each "app" (chart & daemon).

Also a bit of renaming of all `trio.Nursery`s to `tn`, the new "task
nursery" shorthand-var-name being used in all our other `tractor`
related projects.
goodboy force-pushed port_to_latest_tractor from 6f782862f8 to f50202a6af 2025-06-26 15:08:09 +00:00 Compare
goodboy added 1 commit 2025-06-26 15:24:44 +00:00
28ba1392bb Adjust feed status fields/display-pane to new actor-ID
That is to use the new `tractor.msg.types.Aid` struct to pull the
`brokerd` info from the `tractor.Channel.aid: Aid` attr as well as more
generally handling the new `Channel.raddr.proto_key: str` and no longer
assuming a TCP IPC transport; this per the recent `tractor.ipc`
subsys which adds multi-IPC-transports!

Downstream tweaks to match,
- use an "opt-in" field set to display in the `brokerd` info pane in
  `.ui._feedstatus.mk_feed_label()`.
 |_ also add some todos and drop some seemingly unneeded form sizing
    calcs?
- tweak `.ui._label` to allow not using markdown, though ended up not
  doing that since it looked too plain..
goodboy force-pushed port_to_latest_tractor from 28ba1392bb to d3ae2b26f6 2026-01-02 05:15:22 +00:00 Compare
goodboy force-pushed port_to_latest_tractor from d3ae2b26f6 to 793a454463 2026-01-05 18:41:32 +00:00 Compare
goodboy force-pushed port_to_latest_tractor from 793a454463 to ede617b60e 2026-01-07 02:44:29 +00:00 Compare
goodboy changed title from port_to_latest_tractor to port_to_latest_tractor 2026-01-07 03:26:11 +00:00
goodboy changed target branch from decimal_prices_thru_ems to main 2026-01-07 03:26:11 +00:00
goodboy force-pushed port_to_latest_tractor from ede617b60e to 3adbabcba6 2026-01-07 03:28:07 +00:00 Compare
goodboy added 1 commit 2026-01-07 04:42:03 +00:00
c77aca1f90 Flip (back) `pikerd` to use TCP by default
It'll break all non-linux OS-platforms atm and bc it should only be set
to a "non-std transport" through the config anyways.

Yeah yeah, we're slowly appealing to the frickin masses..
goodboy merged commit f218cf450e into main 2026-01-07 04:43:28 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: pikers/piker#45
There is no content yet.