refactor(deps): migrate web3 from 6.11.0 to 7.14.1#211
refactor(deps): migrate web3 from 6.11.0 to 7.14.1#211s0wa48 wants to merge 2 commits intoPolymarket:mainfrom
Conversation
|
The original text 'self.web3.middleware_onion.inject(geth_poa_middleware, layer=0)' exists verbatim in the file, and the edit correctly updates the usage to match the already-imported ExtraDataToPOAMiddleware name, fixing the NameError described in the review comment. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| virtualenv==20.26.3 | ||
| watchfiles==0.22.0 | ||
| web3==6.11.0 | ||
| web3==7.14.1 |
There was a problem hiding this comment.
Incompatible eth-typing and eth-utils versions for web3 v7
High Severity
Bumping web3 to 7.14.1 without updating its sub-dependencies causes an installation or runtime failure. web3==7.14.1 requires eth-typing>=5 and eth-utils>=5, but requirements.txt still pins eth-typing==4.4.0 and eth-utils==4.1.1. This version conflict will prevent the application from starting. The PR description even acknowledges these packages "may also need version updates" but doesn't actually apply them.


Changes
Dependency version bump
web3from6.11.0to7.14.1inrequirements.txtBreaking API changes addressed
geth_poa_middlewarerenamed toExtraDataToPOAMiddlewaregeth_poa_middlewarewas removed and replaced withExtraDataToPOAMiddlewareagents/polymarket/polymarket.pyfromgeth_poa_middlewaretoExtraDataToPOAMiddlewarew3.middleware_onion.inject(geth_poa_middleware, layer=0)), that call should also be updated to useExtraDataToPOAMiddlewareand the newadd/injectAPI as appropriate for web3 v7Notes
Web3,Web3.HTTPProvider, andWeb3.constants.MAX_INTAPIs remain compatibleeth-account,eth-keys,eth-utils, and relatedeth-*packages inrequirements.txtmay also need version updates to stay compatible with web3 v7; review their changelogs if runtime errors occurutils.py,trade.py,executor.py, ortests/test.pyas they do not directly import fromweb3This PR was auto-generated by Gittensor upgrade bot using Claude AI
Note
Medium Risk
Bumps
web3across a major version and updates the Polygon POA middleware hook, which can introduce runtime incompatibilities in transaction/signing or provider behavior.Overview
Upgrades the Python
web3dependency from6.11.0to7.14.1.Updates
agents/polymarket/polymarket.pyto replace the removedgeth_poa_middlewarewithExtraDataToPOAMiddleware, and injects the new middleware into the Web3 middleware stack to keep Polygon POA RPC compatibility.Written by Cursor Bugbot for commit f5b08a1. This will update automatically on new commits. Configure here.