Skip to content

Commit

Permalink
Update to Oxfordnet and Octez 19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
droserasprout committed Feb 4, 2024
1 parent a6b8e0c commit 42b13ce
Show file tree
Hide file tree
Showing 12 changed files with 357 additions and 223 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### Added

* Compatibility with Oxfordnet protocol

## [3.10.3](https://github.com/baking-bad/pytezos/compare/3.10.2...3.10.3) (2023-11-27)

### Fixed
Expand Down
249 changes: 130 additions & 119 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ skip-string-normalization = true

[tool.ruff]
line-length = 120
ignore = [
lint.ignore = [
"B904",
"C417",
"C901",
Expand All @@ -120,16 +120,16 @@ ignore = [
"F811",
"F821",
"F841",
"R504",
"R505",
"R506",
"R507",
"RET504",
"RET505",
"RET506",
"RET507",
"SIM102",
"SIM108",
"SIM114",
]
target-version = "py311"
extend-select = ["B", "C", "R", "SIM"]
lint.extend-select = ["B", "C", "RET", "SIM"]

[build-system]
requires = ["poetry_core>=1.0.0"]
Expand Down
16 changes: 8 additions & 8 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ babel==2.14.0 ; python_version >= "3.8" and python_version < "3.12"
backcall==0.2.0 ; python_version >= "3.8" and python_version < "3.12"
base58==2.1.1 ; python_version >= "3.8" and python_version < "3.12"
beautifulsoup4==4.12.3 ; python_version >= "3.8" and python_version < "3.12"
black==24.1.0 ; python_version >= "3.8" and python_version < "3.12"
black==24.1.1 ; python_version >= "3.8" and python_version < "3.12"
bleach==6.1.0 ; python_version >= "3.8" and python_version < "3.12"
bump2version==1.0.1 ; python_version >= "3.8" and python_version < "3.12"
cached-property==1.5.2 ; python_version >= "3.8" and python_version < "3.12"
cattrs==23.2.3 ; python_version >= "3.8" and python_version < "3.12"
certifi==2023.11.17 ; python_version >= "3.8" and python_version < "3.12"
certifi==2024.2.2 ; python_version >= "3.8" and python_version < "3.12"
cffi==1.16.0 ; python_version >= "3.8" and python_version < "3.12"
chardet==5.2.0 ; python_version >= "3.8" and python_version < "3.12"
charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "3.12"
Expand Down Expand Up @@ -64,7 +64,7 @@ jupyter-events==0.9.0 ; python_version >= "3.8" and python_version < "3.12"
jupyter-server-terminals==0.5.2 ; python_version >= "3.8" and python_version < "3.12"
jupyter-server==2.12.5 ; python_version >= "3.8" and python_version < "3.12"
jupyterlab-pygments==0.3.0 ; python_version >= "3.8" and python_version < "3.12"
markupsafe==2.1.4 ; python_version >= "3.8" and python_version < "3.12"
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "3.12"
matplotlib-inline==0.1.6 ; python_version >= "3.8" and python_version < "3.12"
mistune==3.0.2 ; python_version >= "3.8" and python_version < "3.12"
mnemonic==0.20 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -87,7 +87,7 @@ pathspec==0.12.1 ; python_version >= "3.8" and python_version < "3.12"
pexpect==4.9.0 ; python_version >= "3.8" and python_version < "3.12" and sys_platform != "win32"
pickleshare==0.7.5 ; python_version >= "3.8" and python_version < "3.12"
pkgutil-resolve-name==1.3.10 ; python_version >= "3.8" and python_version < "3.9"
platformdirs==4.1.0 ; python_version >= "3.8" and python_version < "3.12"
platformdirs==4.2.0 ; python_version >= "3.8" and python_version < "3.12"
pluggy==1.4.0 ; python_version >= "3.8" and python_version < "3.12"
ply==3.11 ; python_version >= "3.8" and python_version < "3.12"
prometheus-client==0.19.0 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -105,17 +105,17 @@ pytest-xdist==3.5.0 ; python_version >= "3.8" and python_version < "3.12"
pytest==8.0.0 ; python_version >= "3.8" and python_version < "3.12"
python-dateutil==2.8.2 ; python_version >= "3.8" and python_version < "3.12"
python-json-logger==2.0.7 ; python_version >= "3.8" and python_version < "3.12"
pytz==2023.3.post1 ; python_version >= "3.8" and python_version < "3.9"
pytz==2024.1 ; python_version >= "3.8" and python_version < "3.9"
pywin32==306 ; python_version >= "3.8" and python_version < "3.12" and sys_platform == "win32"
pywinpty==2.0.12 ; python_version >= "3.8" and python_version < "3.12" and os_name == "nt"
pyyaml==6.0.1 ; python_version >= "3.8" and python_version < "3.12"
pyzmq==24.0.1 ; python_version >= "3.8" and python_version < "3.12"
referencing==0.32.1 ; python_version >= "3.8" and python_version < "3.12"
referencing==0.33.0 ; python_version >= "3.8" and python_version < "3.12"
requests==2.31.0 ; python_version >= "3.8" and python_version < "3.12"
rfc3339-validator==0.1.4 ; python_version >= "3.8" and python_version < "3.12"
rfc3986-validator==0.1.1 ; python_version >= "3.8" and python_version < "3.12"
rpds-py==0.17.1 ; python_version >= "3.8" and python_version < "3.12"
ruff==0.1.14 ; python_version >= "3.8" and python_version < "3.12"
ruff==0.2.0 ; python_version >= "3.8" and python_version < "3.12"
secp256k1==0.14.0 ; python_version >= "3.8" and python_version < "3.12"
send2trash==1.8.2 ; python_version >= "3.8" and python_version < "3.12"
setuptools==69.0.3 ; python_version >= "3.8" and python_version < "3.12"
Expand Down Expand Up @@ -156,7 +156,7 @@ types-simplejson==3.19.0.2 ; python_version >= "3.8" and python_version < "3.12"
types-tabulate==0.9.0.20240106 ; python_version >= "3.8" and python_version < "3.12"
typing-extensions==4.9.0 ; python_version >= "3.8" and python_version < "3.12"
uri-template==1.3.0 ; python_version >= "3.8" and python_version < "3.12"
urllib3==2.1.0 ; python_version >= "3.8" and python_version < "3.12"
urllib3==2.2.0 ; python_version >= "3.8" and python_version < "3.12"
wcwidth==0.2.13 ; python_version >= "3.8" and python_version < "3.12"
webcolors==1.13 ; python_version >= "3.8" and python_version < "3.12"
webencodings==0.5.1 ; python_version >= "3.8" and python_version < "3.12"
Expand Down
6 changes: 3 additions & 3 deletions requirements.slim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ attrs==23.2.0 ; python_version >= "3.8" and python_version < "3.12"
base58==2.1.1 ; python_version >= "3.8" and python_version < "3.12"
cached-property==1.5.2 ; python_version >= "3.8" and python_version < "3.12"
cattrs==23.2.3 ; python_version >= "3.8" and python_version < "3.12"
certifi==2023.11.17 ; python_version >= "3.8" and python_version < "3.12"
certifi==2024.2.2 ; python_version >= "3.8" and python_version < "3.12"
cffi==1.16.0 ; python_version >= "3.8" and python_version < "3.12"
charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "3.12"
click==8.1.7 ; python_version >= "3.8" and python_version < "3.12"
Expand Down Expand Up @@ -31,7 +31,7 @@ pycparser==2.21 ; python_version >= "3.8" and python_version < "3.12"
pysodium==0.7.17 ; python_version >= "3.8" and python_version < "3.12"
python-dateutil==2.8.2 ; python_version >= "3.8" and python_version < "3.12"
pywin32==306 ; python_version >= "3.8" and python_version < "3.12" and sys_platform == "win32"
referencing==0.32.1 ; python_version >= "3.8" and python_version < "3.12"
referencing==0.33.0 ; python_version >= "3.8" and python_version < "3.12"
requests==2.31.0 ; python_version >= "3.8" and python_version < "3.12"
rpds-py==0.17.1 ; python_version >= "3.8" and python_version < "3.12"
secp256k1==0.14.0 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -45,7 +45,7 @@ testcontainers==3.7.1 ; python_version >= "3.8" and python_version < "3.12"
toolz==0.12.1 ; python_version >= "3.8" and python_version < "3.12" and (implementation_name == "pypy" or implementation_name == "cpython")
tqdm==4.66.1 ; python_version >= "3.8" and python_version < "3.12"
typing-extensions==4.9.0 ; python_version >= "3.8" and python_version < "3.12"
urllib3==2.1.0 ; python_version >= "3.8" and python_version < "3.12"
urllib3==2.2.0 ; python_version >= "3.8" and python_version < "3.12"
websocket-client==1.7.0 ; python_version >= "3.8" and python_version < "3.12"
wrapt==1.16.0 ; python_version >= "3.8" and python_version < "3.12"
zipp==3.17.0 ; python_version >= "3.8" and python_version < "3.9"
10 changes: 5 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ beautifulsoup4==4.12.3 ; python_version >= "3.8" and python_version < "3.12"
bleach==6.1.0 ; python_version >= "3.8" and python_version < "3.12"
cached-property==1.5.2 ; python_version >= "3.8" and python_version < "3.12"
cattrs==23.2.3 ; python_version >= "3.8" and python_version < "3.12"
certifi==2023.11.17 ; python_version >= "3.8" and python_version < "3.12"
certifi==2024.2.2 ; python_version >= "3.8" and python_version < "3.12"
cffi==1.16.0 ; python_version >= "3.8" and python_version < "3.12"
charset-normalizer==3.3.2 ; python_version >= "3.8" and python_version < "3.12"
click==8.1.7 ; python_version >= "3.8" and python_version < "3.12"
Expand Down Expand Up @@ -52,7 +52,7 @@ jupyter-events==0.9.0 ; python_version >= "3.8" and python_version < "3.12"
jupyter-server-terminals==0.5.2 ; python_version >= "3.8" and python_version < "3.12"
jupyter-server==2.12.5 ; python_version >= "3.8" and python_version < "3.12"
jupyterlab-pygments==0.3.0 ; python_version >= "3.8" and python_version < "3.12"
markupsafe==2.1.4 ; python_version >= "3.8" and python_version < "3.12"
markupsafe==2.1.5 ; python_version >= "3.8" and python_version < "3.12"
matplotlib-inline==0.1.6 ; python_version >= "3.8" and python_version < "3.12"
mistune==3.0.2 ; python_version >= "3.8" and python_version < "3.12"
mnemonic==0.20 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -72,7 +72,7 @@ parso==0.8.3 ; python_version >= "3.8" and python_version < "3.12"
pexpect==4.9.0 ; python_version >= "3.8" and python_version < "3.12" and sys_platform != "win32"
pickleshare==0.7.5 ; python_version >= "3.8" and python_version < "3.12"
pkgutil-resolve-name==1.3.10 ; python_version >= "3.8" and python_version < "3.9"
platformdirs==4.1.0 ; python_version >= "3.8" and python_version < "3.12"
platformdirs==4.2.0 ; python_version >= "3.8" and python_version < "3.12"
ply==3.11 ; python_version >= "3.8" and python_version < "3.12"
prometheus-client==0.19.0 ; python_version >= "3.8" and python_version < "3.12"
prompt-toolkit==3.0.43 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -90,7 +90,7 @@ pywin32==306 ; python_version >= "3.8" and python_version < "3.12" and sys_platf
pywinpty==2.0.12 ; python_version >= "3.8" and python_version < "3.12" and os_name == "nt"
pyyaml==6.0.1 ; python_version >= "3.8" and python_version < "3.12"
pyzmq==24.0.1 ; python_version >= "3.8" and python_version < "3.12"
referencing==0.32.1 ; python_version >= "3.8" and python_version < "3.12"
referencing==0.33.0 ; python_version >= "3.8" and python_version < "3.12"
requests==2.31.0 ; python_version >= "3.8" and python_version < "3.12"
rfc3339-validator==0.1.4 ; python_version >= "3.8" and python_version < "3.12"
rfc3986-validator==0.1.1 ; python_version >= "3.8" and python_version < "3.12"
Expand All @@ -116,7 +116,7 @@ traitlets==5.14.1 ; python_version >= "3.8" and python_version < "3.12"
types-python-dateutil==2.8.19.20240106 ; python_version >= "3.8" and python_version < "3.12"
typing-extensions==4.9.0 ; python_version >= "3.8" and python_version < "3.12"
uri-template==1.3.0 ; python_version >= "3.8" and python_version < "3.12"
urllib3==2.1.0 ; python_version >= "3.8" and python_version < "3.12"
urllib3==2.2.0 ; python_version >= "3.8" and python_version < "3.12"
wcwidth==0.2.13 ; python_version >= "3.8" and python_version < "3.12"
webcolors==1.13 ; python_version >= "3.8" and python_version < "3.12"
webencodings==0.5.1 ; python_version >= "3.8" and python_version < "3.12"
Expand Down
25 changes: 12 additions & 13 deletions src/michelson_kernel/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
from typing import Dict
from typing import List
from typing import Optional
from typing import TextIO
from typing import Tuple
from typing import Type
from typing import Union
from typing import cast

import traitlets
from ipykernel.iostream import OutStream
from ipykernel.kernelbase import Kernel
from tabulate import tabulate

Expand Down Expand Up @@ -199,25 +201,15 @@ class MichelsonKernel(Kernel):
banner = 'Michelson (Tezos VM language)'
help_links = traitlets.List(
[
'https://michelson.nomadic-labs.com/',
'https://tezos.gitlab.io/whitedoc/michelson.html',
{'Guide': 'https://michelson.nomadic-labs.com/'},
{'Reference': 'https://tezos.gitlab.io/whitedoc/michelson.html'},
]
)

def __init__(self, **kwargs):
super().__init__(**kwargs)
self.interpreter = Interpreter()

def _stdout(self, text: str) -> None:
self.send_response(
self.iopub_socket,
'stream',
{
'name': 'stdout',
'text': text,
},
)

def _find_stack_items(
self,
instructions: MichelineSequence,
Expand Down Expand Up @@ -336,7 +328,14 @@ def do_execute(
interpreter_result = self.interpreter.execute(code)

if not silent and interpreter_result.stdout:
self._stdout('\n'.join(interpreter_result.stdout))
self.send_response(
self.iopub_socket,
'stream',
{
'name': 'stdout',
'text': '\n'.join(interpreter_result.stdout),
},
)

if not interpreter_result.error:
if not silent:
Expand Down
2 changes: 2 additions & 0 deletions src/pytezos/block/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
from pytezos.sandbox.parameters import protocol_version
from pytezos.sandbox.parameters import sandbox_params

bson.encoder.encoders[int] = bson.encoder.encoders[float]


class BlockHeader(ContextMixin):
"""Representation of block creation call"""
Expand Down
1 change: 1 addition & 0 deletions src/pytezos/context/mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
'limanet': ['https://rpc.tzkt.io/limanet'],
'mumbainet': ['https://rpc.tzkt.io/mumbainet'],
'nairobinet': ['https://rpc.tzkt.io/nairobinet'],
'oxfordnet': ['https://rpc.tzkt.io/oxfordnet'],
}
keys = {
'alice': alice_key,
Expand Down
2 changes: 1 addition & 1 deletion src/pytezos/sandbox/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from pytezos.sandbox.parameters import LATEST
from pytezos.sandbox.parameters import sandbox_addresses

DOCKER_IMAGE = 'bakingbad/sandboxed-node:v17.0-1'
DOCKER_IMAGE = 'bakingbad/sandboxed-node:v19.0-1'
MAX_ATTEMPTS = 100
ATTEMPT_DELAY = 0.1
TEZOS_NODE_PORT = 8732
Expand Down
Loading

0 comments on commit 42b13ce

Please sign in to comment.