fix(deps): declare pytest-timeout required by the pytest addopts - #248
Merged
Conversation
The fork's `[tool.pytest.ini_options] addopts` adds `--timeout=30 --timeout-method=thread` (upstream has neither), but `pytest-timeout` was never added to the dev dependencies. So every pytest run aborts at startup with `unrecognized arguments: --timeout` as soon as it actually gets to run — which `test (1..6)` and the `e2e` "Packaged-wheel i18n smoke test" now do, after the uv.lock sync in #247 unblocked dependency install (the install failure had been masking this). Add `pytest-timeout==2.4.0` (resolves cleanly against pytest 9.0.2) and lock. Verified locally: `python -m pytest -m integration tests/test_wheel_locales_e2e.py` now starts and collects/runs both tests instead of erroring on the unknown arg. Co-Authored-By: Claude Code <noreply@anthropic.com>
🔎 Lint report:
|
| Rule | Count |
|---|---|
unresolved-attribute |
2 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [unresolved-attribute] unresolved-attribute: Unresolved attribute `_credits_session_start_micros` on type `AIAgent`
run_agent.py:3004: [unresolved-attribute] unresolved-attribute: Object of type `Self@get_credits_spent_micros` has no attribute `_credits_session_start_micros`
✅ Fixed issues (1):
| Rule | Count |
|---|---|
invalid-assignment |
1 |
First entries
tests/run_agent/test_credits_notices_toggle.py:76: [invalid-assignment] invalid-assignment: Object of type `None` is not assignable to attribute `_credits_session_start_micros` of type `int`
Unchanged: 5711 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
9 tasks
OmarB97
added a commit
that referenced
this pull request
Jul 11, 2026
…ne -> green main (#262) Head-of-main CI is red on `Check uv.lock / uv lock --check`, all 8 `Python tests / Run tests slice N/8`, and `Python tests / e2e`. Root cause is a uv.lock <-> pyproject.toml inconsistency (not a test-logic failure): every slice and e2e install via `uv sync --locked`, which hard-fails on a stale lockfile. Two stale entries, both pre-dating the five fork-ship merges (#257-#261, none of which touched pyproject.toml/uv.lock): 1. pytest-timeout==2.4.0 - the fork's pytest addopts use `--timeout=30 --timeout-method=thread` (needs the plugin); PR #248 declared it in the `dev` extra, but the v0.18.2 upstream merge (ba510aa) dropped that declaration while keeping the addopts and the lock entry. 2. A vestigial `{ name = "pillow", marker = "extra == 'vision'" }` line in uv.lock, left over from Pillow's promotion to a core dependency (`vision = []`). Fix: re-declare pytest-timeout==2.4.0 in the dev extra (reverts the merge drop; the existing lock entry is already correct) and regenerate uv.lock to drop the stale pillow vision-marker line. Net: +1 pyproject dep, -1 uv.lock line. Verified locally: `uv lock --check` clean; `uv sync --locked --python 3.11 --extra dev` installs; pytest_timeout plugin registered and a trivial test passes under the repo addopts (1 passed) - i.e. `--timeout` is accepted instead of aborting on an unknown arg. Co-authored-by: Omar Baradei <omar@kostudios.io> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
OmarB97
added a commit
that referenced
this pull request
Jul 20, 2026
…ne -> green main (#262) Head-of-main CI is red on `Check uv.lock / uv lock --check`, all 8 `Python tests / Run tests slice N/8`, and `Python tests / e2e`. Root cause is a uv.lock <-> pyproject.toml inconsistency (not a test-logic failure): every slice and e2e install via `uv sync --locked`, which hard-fails on a stale lockfile. Two stale entries, both pre-dating the five fork-ship merges (#257-#261, none of which touched pyproject.toml/uv.lock): 1. pytest-timeout==2.4.0 - the fork's pytest addopts use `--timeout=30 --timeout-method=thread` (needs the plugin); PR #248 declared it in the `dev` extra, but the v0.18.2 upstream merge (ba510aa) dropped that declaration while keeping the addopts and the lock entry. 2. A vestigial `{ name = "pillow", marker = "extra == 'vision'" }` line in uv.lock, left over from Pillow's promotion to a core dependency (`vision = []`). Fix: re-declare pytest-timeout==2.4.0 in the dev extra (reverts the merge drop; the existing lock entry is already correct) and regenerate uv.lock to drop the stale pillow vision-marker line. Net: +1 pyproject dep, -1 uv.lock line. Verified locally: `uv lock --check` clean; `uv sync --locked --python 3.11 --extra dev` installs; pytest_timeout plugin registered and a trivial test passes under the repo addopts (1 passed) - i.e. `--timeout` is accepted instead of aborting on an unknown arg. Co-authored-by: Omar Baradei <omar@kostudios.io> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
What does this PR do?
Makes pytest actually start in CI. The fork's
[tool.pytest.ini_options]addoptsadds--timeout=30 --timeout-method=thread(upstream has neither), butpytest-timeoutwas never declared as a dependency. Every pytest invocation aborts at startup:This was hidden until now: the Python jobs used to die earlier, at
uv sync --locked(the lockfile drift fixed in #247). With install unblocked,test (1)–test (6)and thee2e"Packaged-wheel i18n smoke test" all run pytest — and now hit the missing-plugin error.Related Issue
Follow-up to #247. That PR unblocked dependency install; this one fixes the next layer (pytest can't start without the plugin its own
addoptsrequires).Type of Change
Changes Made
pyproject.toml— addpytest-timeout==2.4.0to thedevoptional-dependencies (next topytest/pytest-asyncio). 2.4.0 resolves cleanly against the pinnedpytest==9.0.2.uv.lock— regenerated (uv lock): adds thepytest-timeoutentry + references, no other churn.How to Test
uv sync --locked --python 3.11 --extra dev # Exact command the e2e job runs (was: "unrecognized arguments: --timeout"): uv run python -m pytest -m integration tests/test_wheel_locales_e2e.py -vLocally (macOS): pytest now starts and runs —
test_built_sdist_ships_locale_catalogspasses;test_installed_wheel_renders_i18n_stringsbuilds a wheel then dies inensurepipwith SIGABRT, which is a known uv-managed-CPython/macOS quirk in the throwaway venv, not related to this change. On Linux CI (standard Python) that step works, and the test never ran on the fork before because pytest couldn't start. CI on this PR is the real check.Checklist
Code
fix(deps))uv lock --checkpassesDocumentation & Housekeeping
Screenshots / Logs
Before (this branch's base, from the #247 run's
e2ejob):After:
2 tests collected/ pytest starts normally.