Repository navigation
Make requirements-dev.txt installable, alone and alongside requirements.txt - #36
Conversation
CI failure summaryCI is failing on Test Agent with Dummy Data (Python 3.10, 3.11, 3.12). All other checks pass. Failing test: tests/test_mcp.py::test_register_agent_tools_registers_all_tools Likely cause: Pre-existing failure on main, not introduced by the requirements-dev.txt changes in this PR. Same test fails on #35 and #37. Suggested fix: Fix tests/test_mcp.py on main (ensure devops_mcp.registry is importable before patch), then rebase this branch. This PR scope: Dev/test dependency pin work looks good — lint, security, integration, and collector/tool tests all pass. |
|
CI fix merged to |
Rebase needed — no code fixes requiredThe CI failure on this PR was caused by a pre-existing issue on Your PR code looks good. To get CI green, update your branch with latest git fetch origin
git checkout {"headRefName":"fix/29-align-dev-test-pins"}
git rebase origin/main
git push --force-with-leaseOr use the Update branch button on this PR if GitHub offers it. After rebase, CI should pass and this will be ready to merge. Thanks for contributing! |
pytest, pytest-asyncio and httpx were pinned in requirements-dev.txt to versions below the floors requirements.txt already states, so `pip install -r requirements.txt -r requirements-dev.txt` failed with ResolutionImpossible. safety==2.3.5 additionally pins packaging<22.0 against black's packaging>=22.0, so requirements-dev.txt would not even install on its own. Restate the four specifiers as the floors already used by requirements.txt and pyproject.toml's dev extra. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
5885517 to
a4792ee
Compare
|
Rebased onto 146 passed, 2 skipped locally on 3.12. Since this PR is itself about dev-requirements installability, I also re-checked both paths against the new pin: |
Bug Description / Summary
requirements-dev.txtandrequirements.txtcannot be installed together, andrequirements-dev.txtis not installable on its own either.
Fixes #29.
The issue named two conflicting pins; there are four, and the second failure mode was not in the issue
at all:
Worth knowing structurally:
pytest==7.4.3was already dead the momentrequirements.txtgainedpytest>=8.2.0. No working environment has ever run this suite under pytest 7 — CI has been resolvingpytest 9 all along, because its install ignores
requirements-dev.txtentirely.What changed
Four specifiers in
requirements-dev.txt, nothing else:Floors rather than new exact pins, and each is lifted from a declaration you already maintain:
pyproject.toml:100-106haspytest>=8.2.0,pytest-asyncio>=0.23.0andsafety>=3.0.0;requirements.txt:9hashttpx>=0.27.0. Nothing is invented. Re-pinning would re-freeze the file thesame way it froze at the initial commit while
requirements.txtmoved on — which is how this arose.requirements.txt,pyproject.tomlandblackare all untouched. Bumpingsafetyalone clears thepackagingconflict, soblackdid not need to move — which also avoids a needless textual conflictwith dependabot PR #3, which edits this same file (and does not fix this on its own: it leaves
pytest-asyncio,httpxand thesafety/packagingconflict in place).Testing
Both dry-runs now exit 0, resolving
pytest 9.1.1,pytest-asyncio 1.4.0,httpx 0.28.1,safety 3.8.1, withblack 23.12.1andpackaging 26.2co-existing.The suite is unchanged, which is the claim that matters for a dependency bump. Real installs on
both sides, dummy
.envcreated exactly asci.yml:57-85:1736350):1 failed, 145 passed, 2 skipped1 failed, 145 passed, 2 skippedDelta zero, same failing node id. Per-test outcomes were also extracted from
-von both sides anddiffed: empty — no test silently changed status, same two skips.
pytest 8/9 and pytest-asyncio 1.x were checked for the specific things that break suites across those
boundaries: there is no
[tool.pytest.ini_options], nopytest.ini/setup.cfg/tox.ini, so noasyncio_modeto migrate; noevent_loopoverride and noloop_scope; all 18async def test_carry
@pytest.mark.asyncio(strict mode confirmed live); and the only nose-style survivals are foursetup_method, which pytest 9 still supports.A green CI run would not prove this fix. All eight jobs install
-r requirements.txtplus ad-hocpackage names;
requirements-dev.txtis installed in no job at all, andmypyruns in none. Theproofs above are the only proof.
The one failure is pre-existing and unrelated —
tests/test_mcp.py::test_register_agent_tools_registers_all_tools,from
requirements.txt:15's unboundedmcp[cli]>=1.9.0resolving to mcp 2.0.0, which removedmcp.server.fastmcp. Filed separately as #34. It reproduces identically on untouched base; I did notpin around it or skip it.
Environment
Debian 13 (x86_64), Python 3.13.14.
Follow-ups / Known Limitations
requirements files and the editable
.[dev]extra in one resolve still fails. Nothing inCONTRIBUTING or CI does that, so it is out of scope here — mentioning it so it is not a surprise if
you ever add it.
>=floor means a future major can break this again, with nothing to stop it. That exposurealready exists through
requirements.txt's identical floors and is not made worse here; dependabotis active on this file, which is the mechanism that manages it.
tests/test_basic.py:118calls asyncK8sCollector.collect()without awaiting it and asserts on the coroutine, inside two bare
except Exception: passhandlersat
:120-122and:123-125— the test cannot fail. Also.github/workflows/ci.yml:5,7trigger ona
developbranch that does not exist.Generated by Claude Opus 5 (1M context) (brief, implementation, review), Kimi K3 (verification)