Skip to content

Commit

Permalink
Merge pull request #318 from michaelhly/update-solders
Browse files Browse the repository at this point in the history
Update solders
  • Loading branch information
kevinheavey authored Oct 31, 2022
2 parents 32119e6 + d399f7e commit 7aaa598
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 163 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.27.2
current_version = 0.28.0
commit = True
tag = True

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Changelog

## [0.27.3] - Unreleased
## [0.28.0] - 2022-10-31

## Changed

- Use latest `solders`. Note that the parsed fields of jsonParsed responses are now dicts rather than strings. [(#318)](https://github.com/michaelhly/solana-py/pull/318)
- Remove `requests` dependency [(#315)](https://github.com/michaelhly/solana-py/pull/315)

## Fixed
Expand Down
320 changes: 170 additions & 150 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "solana"
version = "0.27.2"
version = "0.28.0"
description = "Solana Python API"
authors = ["Michael Huang <michaelhly@gmail.com>", "Kevin Heavey <heaveykevin2@gmail.com>"]
license = "MIT"
Expand Down Expand Up @@ -29,7 +29,7 @@ typing-extensions = ">=4.2.0"
cachetools = "^4.2.2"
types-cachetools = "^4.2.4"
websockets = "^10.3"
solders = "^0.9.3"
solders = "^0.10.0"

[tool.poetry.dev-dependencies]
black = "^22.3"
Expand Down
4 changes: 1 addition & 3 deletions tests/integration/test_async_token_client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# pylint: disable=R0401
"""Tests for the SPL Token Client."""
from json import loads

import pytest

import spl.token._layouts as layouts
Expand Down Expand Up @@ -281,7 +279,7 @@ async def test_get_accounts(stubbed_sender, test_token): # pylint: disable=rede
assert len(resp.value) == 2
for resp_data in resp.value:
assert resp_data.pubkey
parsed_data = loads(resp_data.account.data.parsed)["info"]
parsed_data = resp_data.account.data.parsed["info"]
assert parsed_data["owner"] == str(stubbed_sender.public_key)


Expand Down
4 changes: 1 addition & 3 deletions tests/integration/test_memo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
"""Tests for the Memo program."""
from json import loads

import pytest
from solders.transaction_status import ParsedInstruction

Expand Down Expand Up @@ -46,5 +44,5 @@ def test_send_memo_in_transaction(stubbed_sender: Keypair, test_http_client: Cli
assert log_message[1] == raw_message
ixn = resp2_transaction.transaction.message.instructions[0]
assert isinstance(ixn, ParsedInstruction)
assert loads(ixn.parsed) == raw_message
assert ixn.parsed == raw_message
assert ixn.program_id == MEMO_PROGRAM_ID.to_solders()
4 changes: 1 addition & 3 deletions tests/integration/test_token_client.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# pylint: disable=R0401
"""Tests for the SPL Token Client."""
from json import loads

import pytest

import spl.token._layouts as layouts
Expand Down Expand Up @@ -274,7 +272,7 @@ def test_get_accounts(stubbed_sender, test_token): # pylint: disable=redefined-
assert len(resp.value) == 2
for resp_data in resp.value:
assert PublicKey(resp_data.pubkey)
parsed_data = loads(resp_data.account.data.parsed)["info"]
parsed_data = resp_data.account.data.parsed["info"]
assert parsed_data["owner"] == str(stubbed_sender.public_key)


Expand Down

0 comments on commit 7aaa598

Please sign in to comment.