test: suppress aiohttp BasicAuth deprecation warning - #161
Conversation
LeyckerS
left a comment
There was a problem hiding this comment.
This is exactly what #151 asked for, and it gets the part right that the issue was actually about.
Verified both "Done when" criteria locally rather than reading the diff:
The target warning is gone. pytest tests/ -q → 50 passed, with no warnings summary at all; it previously ended 50 passed, 1 warning.
An unrelated deprecation still shows. I added a throwaway test raising a different DeprecationWarning:
tests/test_zz_warn.py::test_other_deprecation_still_visible
DeprecationWarning: a completely unrelated deprecation
1 passed, 1 warning
Still reported. That is the difference between this and a blanket ignore::DeprecationWarning, and it is the whole reason the issue was written the way it was — matching on the message text rather than the category is what keeps the next real deprecation visible.
The comment is right too, and it is the actual deliverable here. proxy_auth rejects anything that is not a BasicAuth, and moving the credentials into a header breaks HTTPS proxies specifically, because aiohttp authenticates those on the CONNECT request rather than inside the tunnel. Someone will find that suppression in a year and "fix it properly"; your three lines are what stops them. Pointing at #151 means the full reasoning is one click away.
moon_download.py untouched, as required.
One thing I noticed that is not yours to fix and that I am not asking for: neither workflow watches pytest.ini, so a future change to this file will not trigger CI at all. #151 said nothing about path filters and I am not moving the goalposts after the fact — opening it separately.
Merging. Welcome, and thank you for reading the issue closely enough to keep the narrow match.
@XEDAB's #162 closes #160 and @Divesh-Kshirsagar's #161 closes #151. The comment added by #162 was a single 228-character line against the line-length of 100 in ruff.toml; wrapped here as promised in the review rather than sending it back. Wording unchanged, plus a pointer to #160. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every entry in this release came from an outside contributor. - #150 (@shard872, #116) a full disk aborts the run instead of retrying - #149 (@Allen58562, #65) Stop interrupts transfers already in flight - #153 (@AdvaitVarhade, #32) structured CLI exit codes - #161 (@Divesh-Kshirsagar, #151) pytest.ini with a narrow warning filter - #158 (@nightcityblade, #81) ruff runs once, not once per Python version - #157 (@XEDAB, #155) the assertion that could not fail - #162 (@XEDAB, #160) the stub that left the engine on the real network - #159 (@AashishGupta2007, #145) the generated-era THEME block README: consolidated the changelog sections, refreshed the stale test count, and replaced the stars badge with a contributors badge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
Adds a targeted pytest warning filter for the
aiohttp.BasicAuthdeprecation warning inpytest.ini.aiohttp.BasicAuthis intentionally kept because it is still required for proxy authentication, including HTTPS proxy connections. The warning is suppressed only during pytest runs rather than changing the application code.Type of change
Checklist
applied the equivalent change to
moon_cli.pydescription
Screenshots / logs (if applicable)
Tests:
uv run pytest tests/— 50 passedact -j no-chrome— passedact -j ruff— passedCloses #151