8000 Support newer solana-py APIs while retaining older compatibility by EfeDurmaz16 · Pull Request #168 · kevinheavey/anchorpy · GitHub
[go: up one dir, main page]

Skip to content

Support newer solana-py APIs while retaining older compatibility - #168

Draft
EfeDurmaz16 wants to merge 1 commit into
kevinheavey:mainfrom
EfeDurmaz16:fix/modern-solana-compat
Draft

EfeDurmaz16 wants to merge 1 commit into
kevinheavey:mainfrom
EfeDurmaz16:fix/modern-solana-compat

Conversation

@EfeDurmaz16
Copy link
Copy Markdown

AnchorPy's construct-typing<0.6 requirement conflicts with newer solana-py releases, as reported in #164. Relaxing the requirement alone also breaks imports after solana-py moves RPC/token parameter types and removes AsyncToken.

This allows Construct Typing 0.5.1 through 0.8.x and handles both Solana API layouts. Token/mint parser results keep their tuple contract. Token-account creation reuses the existing instruction builder, and legacy simulation preserves the signed transaction bytes.

Draft dependency prerequisite: published Borsh Construct 0.1.0 still requires construct-typing<0.6, and its upstream repository is archived. The newer-version tests used a local Borsh patch that only widens this requirement. A compatible Borsh distribution is still needed for a registry-only modern installation.

Validation:

  • python -m pytest tests/unit: 22 passed with Solana 0.36.1, 0.38.0, and 0.40.3. Python 3.9 was also tested with Solana 0.36.1.
  • ruff src tests and mypy src tests: passed with the repository's pinned tools.
  • RPC regression tests use the real request serializers with intercepted local requests. The full validator/client-generation integration suite was not run.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0