Repository navigation
fix: resolve stdout_path against cwd=, and raise QsvError from the probe - #7
Merged
Merged
Conversation
- A relative stdout_path is now resolved against the client's cwd=, like a relative --output given to qsv, instead of Python's working directory. Behavior change: output files of runs that combine cwd= with a relative stdout_path move. - capabilities (and run with min_version) raise QsvError instead of a bare ValueError when --version output isn't recognized, and fall back to --version when --capabilities returns JSON of an unexpected shape. Qsv and AsyncQsv now share this probe logic. - The QsvError docstring named the argv attribute args; it is args_run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jqnatividad
force-pushed
the
fix/review-followups
branch
from
October 10, 2026 17:44
0ebe083 to
379a4dc
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-ups from a codebase review. Separate from #6; the two CHANGELOG
[Unreleased]sections will need a trivial merge.stdout_pathfollowscwd=With
Qsv(cwd="/data"),run(..., stdout_path="out.csv")used to write./out.csvrelative to Python's working directory, while the input paths on argv resolved against/data. It now writes/data/out.csv, like a relative--outputgiven to qsv. Existing code that relies on the old location gets no error; its file just lands elsewhere. Passing an absolute path keeps the old location. Suggest releasing as 0.3.0 and calling this out in the release notes.Fixes
ValueErrorfrom the capabilities probe. Unrecognized--versionoutput now raisesQsvErrorfromcapabilities(and fromrunwhenmin_versionis set).--capabilitiesJSON of an unexpected shape (TypeError/AttributeError, not onlyValueError) now falls back to--version.QsvandAsyncQsvshare the parsing helpers.QsvErrordocumented the argv attribute asargs; it isargs_run.Known gaps (left as is)
--capabilitiesreturns valid JSON with an unparseableversion(e.g."dev") andmin_versionis set,parse_versionstill raisesValueError. The README wording covers only the--versioncase.QsvErrorreportsexit 0, because--versionitself succeeded.Tests
Six new tests (sync and async for each case) in
tests/test_process.py; all fail without the source change. Full suite passes locally (67, macOS). ruff and mypy are clean, including--platform win32.🤖 Generated with Claude Code