Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/base_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: ./.github/actions/setup-hathor-env
name: Setup Hathor node environment
with:
python: 3.11
python: 3.12
os: ubuntu-22.04
- name: Set env vars
run: cat ./extras/benchmarking/sync_v2/.env >> $GITHUB_ENV
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
python-impl:
- python
python-version:
- '3.10'
- '3.11'
- '3.12'
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
import os
import json
full_matrix = {
'python': ['3.10', '3.11', '3.12'],
'python': ['3.11', '3.12'],
# available OS's: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
'os': ['ubuntu-22.04', 'macos-13'],
}
Expand Down Expand Up @@ -83,6 +83,6 @@ jobs:
run: poetry run make tests
- name: Upload coverage
uses: codecov/codecov-action@v4
if: matrix.python == 3.11 && startsWith(matrix.os, 'ubuntu')
if: matrix.python == 3.12 && startsWith(matrix.os, 'ubuntu')
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/pr_benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- uses: ./.github/actions/setup-hathor-env
name: Setup Hathor node environment
with:
python: 3.11
python: 3.12
os: ubuntu-22.04
- name: Set env vars
run: cat ./extras/benchmarking/sync_v2/.env >> $GITHUB_ENV
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# before changing these variables, make sure the tag $PYTHON-alpine$ALPINE exists first
# before changing these variables, make sure the tag $PYTHON-slim-$DEBIAN exists first
# list of valid tags hese: https://hub.docker.com/_/python
ARG PYTHON=3.11
ARG PYTHON=3.12
ARG DEBIAN=bullseye

# stage-0: copy pyproject.toml/poetry.lock and install the production set of dependencies
Expand Down
4 changes: 2 additions & 2 deletions extras/github/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from extras.github.docker import prep_base_version, prep_tags

DEFAULT_PYTHON_VERSION = '3.11'
NON_DEFAULT_PYTHON_VERSION = '3.10'
DEFAULT_PYTHON_VERSION = '3.12'
NON_DEFAULT_PYTHON_VERSION = '3.11'


class DockerWorkflowTest(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
shellHook = ''
export CFLAGS="-I${pkgs.rocksdb}/include"
export LDFLAGS="-L${pkgs.rocksdb}/lib"
poetry env use python3.10
poetry env use python3.11
'';
};
});
Expand Down
6 changes: 3 additions & 3 deletions hathor/cli/run_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,9 @@ def check_unsafe_arguments(self) -> None:

def check_python_version(self) -> None:
# comments to help grep's
MIN_VER = (3, 10) # Python-3.10
MIN_STABLE = (3, 10) # Python-3.10
RECOMMENDED_VER = (3, 10) # Python-3.10
MIN_VER = (3, 11) # Python-3.11
MIN_STABLE = (3, 12) # Python-3.12
RECOMMENDED_VER = (3, 12) # Python-3.12
cur = sys.version_info
cur_pretty = '.'.join(map(str, cur))
min_pretty = '.'.join(map(str, MIN_VER))
Expand Down
5 changes: 0 additions & 5 deletions hathor/p2p/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,6 @@ def recv_message(self, cmd: ProtocolMessages, payload: str) -> None:
self.peer.info.last_seen = now

if not self.ratelimit.add_hit(self.RateLimitKeys.GLOBAL):
# XXX: on Python 3.11 the result of the following expression:
# '{}'.format(HathorProtocol.RateLimitKeys.GLOBAL)
# is not 'global' but 'RateLimitKeys.GLOBAL', even though the enum value *is* a string, but it seems
# that something like `str(value)` is called which results in a different value (usually not the case
# for regular strings, but it is for enum+str), using `enum_variant.value` side-steps this problem
self.state.send_throttle(self.RateLimitKeys.GLOBAL.value)
return

Expand Down
56 changes: 3 additions & 53 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ homepage = "https://hathor.network/"
repository = "https://github.com/HathorNetwork/hathor-core/"
# https://pypi.org/classifiers/
classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: OS Independent",
Expand Down Expand Up @@ -51,7 +50,7 @@ types-pyopenssl = "=22.1.0.2"
types-pyyaml = "=6.0.12.9"

[tool.poetry.dependencies]
python = ">=3.10,<4"
python = ">=3.11,<4"
twisted = "~24.7.0"
autobahn = "~24.4.2"
base58 = "~2.1.1"
Expand Down