Commit graph

1117 commits

Author SHA1 Message Date
b24f7e38a9 Re-lock textgrid to the key-translation 2026.8.5 tag 2026-08-06 08:46:09 +10:00
7ccc0d124c Re-lock textgrid to the window-fit grid 2026.8.5 tag 2026-08-06 08:05:52 +10:00
c8ac52d5c5 Re-lock textgrid to the focus-retry 2026.8.5 tag 2026-08-06 07:29:04 +10:00
739f530569 Re-lock textgrid to the input-focus 2026.8.5 tag 2026-08-06 07:17:03 +10:00
48256e12e8 Re-lock textgrid to the one-notch-smaller 2026.8.5 tag 2026-08-05 11:57:15 +10:00
e9726170f9 Re-lock textgrid to the moved 2026.8.5 tag
textgrid-rust's 2026.8.5 tag now points at the 16px default font scale
commit, so refresh the lock to pick up the new wheel.
2026-08-05 10:45:59 +10:00
19dbb2fd02 Redirect SummaryCursorTest cache writes to a temp dir
The getstate test called Summary.__getstate__(), which rebuilt the
PagedList pages in tools.CACHE_PATH/summary_dir with exist_ok=True.
Since CACHE_PATH is relative to the current directory, running the
tests clobbered the real .eris cache and caused eris to crash on the
next startup when sync_with_filesystem hit the stale summary.
2026-08-05 09:18:56 +10:00
619c2305ff Bump version to 2026.8.5, depend on fill3 2026.8.5
fill3 2026.8.5 opens the GPU window at 120x30 by default and depends on
textgrid-rust 2026.8.5.
2026-08-05 08:39:17 +10:00
73dd42c488 Bump version to 2026.8.4, depend on fill3 2026.8.4
fill3 2026.8.4 pulls in textgrid-rust 2026.8.4, which fixes window mode
rendering brighter than a terminal (non-sRGB surface format).
2026-08-04 23:12:45 +10:00
33b08d3a09 Support zstd compression via the Python 3.14 compression module
Map --compression values to the compression package submodules so zstd
is available alongside gzip, lzma and bz2. Default remains gzip.
2026-08-04 21:21:12 +10:00
5e0fd54a92 Use pyinstaller build for Docker images, drop shiv
The shiv zipapp's shebang points at the system python3 (GIL-enabled),
which cannot load the cp314t extensions built under the free-threaded
3.14 project venv, so ./dist/eris failed at runtime. pyinstaller bundles
its own 3.14t interpreter and works, so the Dockerfiles now run the
pyinstaller binary directly instead of via a python wrapper, and the
debian image no longer needs to install uv/python. Remove build-shiv and
the shiv dev dependency; build comments use podman.
2026-08-04 10:33:13 +10:00
329f500c8e Refuse to run a second eris instance on the same directory
flock on .eris/lock prevents two eris processes racing the cache, which
previously produced a mixed-format summary (int-list pages) and crashed
sync_with_filesystem. The lock is acquired before manage_cache, the lock
file survives checksum-mismatch cleanup, and the holder's PID is written
to the lock file so a refused instance can report it.
2026-08-04 09:25:49 +10:00
980ee7071c Replace killpg-on-self with thread-scoped subprocess kill on quit
Removes the shell's "Killed" message and lets fill3's terminal-restore
codes flush via normal interpreter exit. Worker.kill() now SIGKILLs only
the worker thread's subprocess descendants (via /proc/PID/task/TID/children,
recursing through shell=True grandchildren), so editor and xdg-open spawns
from the main thread survive quit. A _killed flag skips persisting result
pickles for aborted tool runs. start_new_session=True is no longer needed
on editor/xdg-open launches since the kill is worker-thread-scoped.
2026-08-04 08:31:28 +10:00
b932ebc6b8 Add test asserting free-threading survives full module import
Verify the interpreter is free-threaded (Py_GIL_DISABLED) and the GIL is
not re-enabled after loading the full eris module chain, so a dependency
that re-enables the GIL (PEP 703) or a non-free-threaded interpreter
fails the suite.
2026-08-03 18:47:46 +10:00
b96a8669cf Pin free-threaded Python explicitly in .python-version
A bare 3.14 previously resolved to the freethreaded build only because it
was the sole final 3.14 in uv's managed cache. Use 3.14t to lock in
free-threading against future plain 3.14 installs.
2026-08-03 12:57:23 +10:00
8af627b502 Save full summary on quit regardless of cursor row
__getstate__ emitted an empty entry list whenever the cursor was on the
top row (y == 0), so quitting from the top silently discarded all
previously calculated results. The guard was intended to rotate the
cursor row to the front, but the y == 0 case should simply keep the whole
list as-is. Remove the guard so all entries are always persisted.
2026-08-03 12:45:59 +10:00
53474b2bcb Flush stdout before killpg so terminal restore codes survive
sys.stdout is line-buffered on a tty, and fill3's terminal restore
context managers (alternate_buffer, mouse_tracking, title) only write
escape sequences without newlines. killpg(SIGKILL) killed the process
before those buffered codes were flushed, leaving the terminal stuck
in the alternate buffer with mouse tracking on. Flush first.
2026-08-03 11:10:33 +10:00
36a07813e7 Fix --version and make killpg fire under uv run
--version printed a stale __version__ (2026.7.28); bump it to 2026.8.3
and update the README install tag.

The killpg-on-self guard required eris to be its own process-group
leader, which is false under 'uv run eris' (uv is the leader), so the
fast shutdown never triggered. Also accept getpgrp() == getppid(),
covering the uv-run case while non-tty runs still skip killpg.
2026-08-03 10:44:53 +10:00
87813fdf21 Kill in-flight tools instantly on quit via killpg(self)
When eris quits, _python_exit joins executor threads, which block on
in-flight subprocess.run calls for up to TIMEOUT seconds. After saving
state, kill the process group to reap all tool subprocesses instantly.
Isolate editor/xdg-open in their own sessions so they survive.
2026-08-03 10:27:38 +10:00
eebb226b21 Use worker threads instead of subprocesses, bump to 2026.8.3
Convert each Worker from a subprocess to a thread running the tool in a
ThreadPoolExecutor, so eris can run free-threaded under CPython 3.14t.
Bump fill3 and lscolors deps to 2026.8.3 for the GIL-free cwcwidth chain.
2026-08-03 09:46:44 +10:00
527d2acd23 tools: Removed pydoc test
- pydoc output contains absolute paths
2026-08-01 09:03:46 +10:00
78246d51d1 use str.removeprefix/removesuffix for string slicing 2026-07-31 22:50:31 +10:00
bf42d15a4b simplify _image_to_text using itertools.batched
Pair image rows directly from the flattened pixel stream in blocks of
width*2, dropping the intermediate rows list and the range(0, height, 2)
indexing.
2026-07-31 22:35:13 +10:00
ced2895fbc raise requires-python to >=3.14
Align the minimum Python version with .python-version, the Dockerfiles,
and the cp314 wheels the build produces, since itertools.batched
(python 3.12+) is now used in paged_list.
2026-07-31 22:20:50 +10:00
7b82b8298d use itertools.batched in paged_list batch()
Replace the groupby-based pure-Python batching with the C-implemented
itertools.batched (Python 3.12+), wrapped in map(list, ...) to preserve
list-typed pages.
2026-07-31 22:14:15 +10:00
6a39f1aa3c coding style: Remove traces of snap builds 2026-07-31 21:56:50 +10:00
bcb1a0105b Update TODO
- Am currently self hosting not publishing on PyPI
2026-07-31 21:21:02 +10:00
b52bd59eb6 Using standard pytest for testing 2026-07-31 21:18:59 +10:00
1ac0ef3dae packaging: Don't need to run eris inside docker 2026-07-31 21:14:24 +10:00
feb0d0a68c revert worker to subprocess model, self-spawning via --worker flag
ProcessPoolExecutor relied on private API, lost os.setpriority and
auto-restart. Revert to the subprocess worker but spawn the current
executable with --worker instead of a separate eris-worker console
script, keeping a single entry point for shiv/pyinstaller. Bump
.python-version to 3.14.
2026-07-31 19:30:40 +10:00
2b13609966 add PyInstaller build script 2026-07-30 23:57:49 +10:00
cfc6e2d176 Relax requires-python to >=3.11, set .python-version to 3.13 2026-07-30 23:31:02 +10:00
272b28c46c revert Alpine Dockerfile to source-build for musl compatibility; restore uv-based Debian Dockerfile for Python 3.14 2026-07-30 13:01:52 +10:00
e35e2aefd5 simplify Dockerfiles to use pre-built dist/eris instead of uv build
Remove all build-dependency packages (glfw-dev, cmake, git, python3-dev,
libX11, mesa, etc.) that were only needed for building eris's Python deps
from source. Replace uv + source install with COPY dist/eris. Use
python3 /usr/local/bin/eris for ENTRYPOINT to avoid shebang portability
issues.
2026-07-30 12:24:32 +10:00
daba0d3eb4 add Shiv-based build for standalone eris executable
- Add 'shiv' to dev dependencies in pyproject.toml
- Add dist/ to .gitignore
- Create packaging/build-shiv script: builds dist/eris zipapp via
  shiv -e eris.__main__:entry_point --compile-pyc --reproducible
- Update uv.lock
2026-07-30 12:06:57 +10:00
1f72a3cbc7 revert pydoc to TOML-defined subprocess tool, remove @in_separate_process
Replace the native pydoc() function (+ @in_separate_process, _call_in_process)
with a TOML tool definition running python3 -m pydoc directly. No ANSI
styling, no TermDoc, no process isolation decorator. This eliminates the
grandchild worker process (from nested ProcessPoolExecutor) that caused
TUI corruption on shutdown.

Also remove now-unused import concurrent.futures from tools.py.
Regenerate the pydoc golden file to match plain-text output.
2026-07-30 11:35:12 +10:00
ed6457a0f0 replace eris-worker subprocess with ProcessPoolExecutor; guard sweep generators against empty _entries
- Rewrite worker.py: each Worker uses a ProcessPoolExecutor(max_workers=1),
  tools run via loop.run_in_executor() in a forked OS subprocess
- Remove create_process(), main(), stdin/stdout IPC, os.killpg
- Remove eris-worker entry point from [project.scripts] in pyproject.toml
- Update tests/worker_test.py for new Worker API
- Guard _sweep_up/_sweep_down against IndexError when _entries is empty;
  keep cursor_position() try/except for stale y after row deletion
2026-07-30 11:35:12 +10:00
3925ded957 refactor pydoc: inline into tools.py with @in_separate_process decorator for subprocess isolation 2026-07-30 11:34:30 +10:00
7e758b4da5 fix package names for Fedora 44 and Arch; pin Dockerfile base images to current distro releases 2026-07-30 11:34:30 +10:00
c6a076c31d fix Dockerfiles: add C++/make for glfw-sys source build; fix Alpine package names; fix EOL base images 2026-07-29 22:08:16 +10:00
e88385c861 add GLFW source build dependencies to all Dockerfiles 2026-07-29 12:48:23 +10:00
458e334f5d regenerate uv.lock after lscolors dep fix (termstr inline git+ tag) 2026-07-29 09:21:01 +10:00
ef41f35812 fix Dockerfiles: add git, fix path to ./eris 2026-07-29 08:58:09 +10:00
6ffab2828a update Dockerfiles: replace pipx with uv tool install --python 3.14 2026-07-29 08:49:34 +10:00
4f527b2ddb bump fill3 dep to 2026.7.28 (textgrid-rust pyo3 0.23→0.24 for python 3.14) 2026-07-28 13:37:28 +10:00
9be41ce792 convert indented code blocks to fenced for copy-to-clipboard 2026-07-28 12:22:24 +10:00
3da95703a1 bump version to 2026.7.28 2026-07-28 12:17:00 +10:00
92cd41c152 packaging: Fix README 2026-07-28 12:10:29 +10:00
fe5640f9aa packaging: Drop pipx as an installation method 2026-07-28 12:06:56 +10:00
5b1269ce1d add --python 3.14 to uv tool install command in README and make-readme.py 2026-07-28 11:51:03 +10:00