Update to longwei 2.0 #14
Loading…
Reference in a new issue
No description provided.
Delete branch "refs/pull/14/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Migrates taibai from longwei 1.x to longwei 2.0, which ships httpx2 (pydantic's HTTP client) instead of httpx.
Changes
longwei~=2.0.0in pyproject.toml; remove direct httpx dependencyasync with await APClient.create(instance=..., access_token=...) as ap:context-manager patterncommands/init.py: update static auth method signatures (create_app,generate_authorization_url,validate_authorization_code)commands/trending.py: moveINSTANCE_TYPE_MASTODONimport to top-level longwei packagepytest-httpx→pytest-httpx2in dev deps; port all async-layer tests to the respx-basedhttpx2_mockfixtureget_requests()→ respxcallsAPI; remove stalehttpx.ConnectErrortestNote
The noxfile.py (off-limits) hardcodes
pytest-httpxin the pytest session install list. Nox CI will show 82 fixture-not-found errors until that line is updated topytest-httpx2. Runningpython3 -m pytest tests/directly passes all 373 tests.Closes #13
This PR is too large to review automatically (4317 lines; limit is 2000). Please consider splitting it into smaller PRs.
This PR is too large to review automatically (4439 lines; limit is 2000). Please consider splitting it into smaller PRs.