GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — test(v4): poll Anvil startup instead of a fixed sleep by TimeToBuildBob · Pull Request #486 · uniswap-python/uniswap-python Conversation
Contributor
SummaryBoth v4 test modules start This replaces the sleep in The same fixture change ran green on the v1–v4 matrix on my fork (TimeToBuildBob#1, since closed because it was bundled with the v1 xfail that #479 declined). Only the two fixture files change here. Test plan
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Both v4 test modules started anvil and then slept 3 seconds before connecting. On a slow fork that is not enough and the matrix fails with ConnectionRefusedError; on a fast machine it wastes time; and when anvil dies at genesis the fixture still waits out the sleep and then fails on the connection instead of the real cause. Poll the RPC port for up to 60s, fail immediately with the exit code if the process exits first, and kill it on timeout. Git-Session-Id: 9d44438c-8705-491c-9930-947968df9a94
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## master #486 +/- ## ======================================= Coverage 73.26% 73.26% ======================================= Files 12 12 Lines 2319 2319 ======================================= Hits 1699 1699 Misses 620 620 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Git-Session-Id: 0fead8e2-e37e-58e4-b158-56598d831c9d
There was an error while loading. Please reload this page.
- Restore @check_approval on make_trade/make_trade_output/add_liquidity/ remove_liquidity (P1: first token trades fail without router allowance) - Remove path overwrite after cost calculation in V2 exact-output branch (P1: custom route was silently replaced with default WETH route) - Raise ValueError when V3 route is given without fees in get_price and make_trade (P1: incomplete routes silently fell back to single-pool quote) - Fix async client init to derive provider URL from supplied AsyncWeb3 so PROVIDER env var is not required when web3 is given (P1) - Add asyncio.Lock (_nonce_lock) in AsyncUniswap4 and reserve nonce inside the lock before yielding to prevent concurrent trades sharing a nonce (P1) - Remove incorrect await on bytes32 _name.decode()/_symbol.decode() in AsyncUniswap4.get_token — decode() returns str, not awaitable (P2) - Restore Anvil startup readiness poll in test_uniswap4.py fixture, replacing sleep(3) that was reverted from uniswap-python#486 (P2) - Cache get_weth_address result per client instance to avoid repeated RPC calls on every quote/swap path (P2) Co-Authored-By: Bob <[email protected]> Git-Session-Id: d44b7f42-192e-588b-98db-435d6ad11d1c
…(clean branch) (#491) * feat(v4): UF grant work — async clients, ReservesLens, CI/test fixes Clean branch off master containing liquid-8's changes from dev/v4-fin: - Async Uniswap v2/v3/v4 clients (asyncuniswap.py, asyncuniswap4.py) - ReservesLens support and getPoolTVLBatch improvements - Universal Router and single/multi-hop swap fixes - Test suite fixes (RPC switch, Anvil startup, fixture fixes) - Adoption metrics snapshot script + daily workflow (UF grant D3/D4) - README updates Clean squash of dev/v4-fin changes reapplied on top of current master, resolving the 244-commit ancestry confusion from the original v4-fin squash merge (4c42f1f). Also fixes duplicate Generator import in tests/test_uniswap.py (ruff F811). Git-Session-Id: 15b18137-18fa-53a4-92e2-759ce27705c7 * fix: address Greptile P1/P2 findings from review - Restore @check_approval on make_trade/make_trade_output/add_liquidity/ remove_liquidity (P1: first token trades fail without router allowance) - Remove path overwrite after cost calculation in V2 exact-output branch (P1: custom route was silently replaced with default WETH route) - Raise ValueError when V3 route is given without fees in get_price and make_trade (P1: incomplete routes silently fell back to single-pool quote) - Fix async client init to derive provider URL from supplied AsyncWeb3 so PROVIDER env var is not required when web3 is given (P1) - Add asyncio.Lock (_nonce_lock) in AsyncUniswap4 and reserve nonce inside the lock before yielding to prevent concurrent trades sharing a nonce (P1) - Remove incorrect await on bytes32 _name.decode()/_symbol.decode() in AsyncUniswap4.get_token — decode() returns str, not awaitable (P2) - Restore Anvil startup readiness poll in test_uniswap4.py fixture, replacing sleep(3) that was reverted from #486 (P2) - Cache get_weth_address result per client instance to avoid repeated RPC calls on every quote/swap path (P2) Co-Authored-By: Bob <[email protected]> Git-Session-Id: d44b7f42-192e-588b-98db-435d6ad11d1c * fix(typecheck): remove unused type: ignore[return-value] on get_weth_address _weth_address_cache is typed as ChecksumAddress (same as return type), so the ignore comment is now redundant and mypy correctly flags it. Git-Session-Id: c95ac4a4-64bd-42b3-9f79-c55ca4dfb9cf
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.