Decode credentials from URLs before auth#1850
Conversation
|
Follow-up pushed at e25c436 to carry over the CI dependency/test-environment stabilization that this branch exposed:
Local validation after aligning the venv with the new caps: .venv/bin/python -m pytest tests/test_auth.py::test_credentials_in_url tests/test_auth.py::test_credentials_in_url_are_percent_decoded tests/test_auth.py::test_credentials_in_url_auth_flag_has_priority tests/test_auth.py::test_only_username_in_url tests/test_encoding.py::test_terminal_output_response_charset_detection tests/test_encoding.py::test_terminal_output_request_charset_detection tests/test_plugins_cli.py -q
# 27 passed, 1 skipped
HTTPIE_TEST_WITH_PYOPENSSL=1 .venv/bin/python -m pytest tests/test_auth.py::test_digest_auth -q
# 4 passed
.venv/bin/flake8 httpie/cli/argparser.py tests/test_auth.py tests/test_cli_ui.py httpie/manager/tasks/plugins.py tests/utils/plugins_cli.py
.venv/bin/python -m compileall -q httpie/cli/argparser.py tests/test_auth.py tests/test_cli_ui.py httpie/manager/tasks/plugins.py tests/utils/plugins_cli.py
git diff --check
# passedExpected remaining CI limitation: Ubuntu Python 3.7 still fails before tests on |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1850 +/- ##
==========================================
- Coverage 97.28% 94.11% -3.17%
==========================================
Files 67 113 +46
Lines 4235 7703 +3468
==========================================
+ Hits 4120 7250 +3130
- Misses 115 453 +338 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e25c436 to
23d0397
Compare
|
One more follow-up pushed at 23d0397 after the refreshed Ubuntu 3.8 lane exposed a Python-version compatibility issue in my previous conflict resolution. The plugin helper now uses nested Additional validation: .venv/bin/python -m pytest tests/test_plugins_cli.py -q
# 14 passed, 1 skipped
uv run --python 3.8 --isolated --with-editable ".[dev]" python -m pytest tests/test_plugins_cli.py -q
# 14 passed, 1 skipped
.venv/bin/flake8 tests/utils/plugins_cli.py
.venv/bin/python -m compileall -q tests/utils/plugins_cli.py
git diff --check
# passedI intentionally did not include the Ubuntu 3.7 workflow workaround in this push, since workflow-file updates require the |
|
CI follow-up status on the current PR head (
The remaining immediate Linux red jobs are both Python 3.7 on @@
pyopenssl: [0, 1]
+ exclude:
+ - os: ubuntu-latest
+ python-version: '3.7'
+ include:
+ - os: ubuntu-22.04
+ python-version: '3.7'
+ pyopenssl: 0
+ - os: ubuntu-22.04
+ python-version: '3.7'
+ pyopenssl: 1That keeps the 3.7 coverage but moves it to the last Ubuntu image that can still set up Python 3.7. Local commit is |
|
Follow-up validation for
The Python 3.8 compatibility fix is reflected in CI now: the previously failing Ubuntu 3.8 shards and The only hard failures I still see are |
|
One more note on the remaining Ubuntu 3.7 failures: I validated the minimal workflow patch locally as YAML, but this OAuth token cannot push workflow file changes ( The minimal patch is to exclude only |
|
Updated the branch with the dependency/test-environment fixes that were causing the broad CI failures on the first run. Current validation on pushed head
The two remaining confirmed failures are the Ubuntu/Python 3.7 setup jobs. They fail before tests because |
Summary
u%40d:1%3D2%3F, matching the behavior users expect from URL credentials.Fixes #1623.
Tests
.venv/bin/python -m pytest -q tests/test_auth.py::test_credentials_in_url_are_percent_decoded.venv/bin/python -m pytest -q tests/test_auth.py::test_credentials_in_url tests/test_auth.py::test_credentials_in_url_are_percent_decoded tests/test_auth.py::test_credentials_in_url_auth_flag_has_priority tests/test_auth.py::test_only_username_in_url.venv/bin/python -m pytest -q tests/test_auth.py.venv/bin/flake8 httpie/cli/argparser.py tests/test_auth.py.venv/bin/python -m compileall -q httpie/cli/argparser.py tests/test_auth.py.venv/bin/python -m pytest -q tests/test_plugins_cli.py::test_plugins_installation tests/test_plugins_cli.py::test_plugins_listing tests/test_plugins_cli.py::test_plugins_uninstall.venv/bin/flake8 tests/utils/plugins_cli.py.venv/bin/python -m compileall -q tests/utils/plugins_cli.pygit diff --checkNote: on Python 3.14, the pinned test extra pulled an old
werkzeugthat imports removedast.Str; I upgradedhttpbin,flask, andwerkzeugin the local venv before running pytest, matching the workaround from #1641.Known CI blocker
The Ubuntu Python 3.7 jobs fail before tests because
ubuntu-latestnow resolves to Ubuntu 24.04, andactions/setup-pythoncannot provide Python 3.7 there. The narrow workflow fix is to route only the Ubuntu 3.7 matrix rows toubuntu-22.04; I confirmed the needed YAML locally, but this fork token lacks the GitHubworkflowscope, so GitHub rejected pushing that workflow-file update.