Skip to content

Commit

Permalink
Make 0.5.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjuhrich committed Sep 19, 2022
2 parents 7563ff8 + 7aeb7f6 commit 2915fbf
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ ifneq ($(MAKECMDGOALS),clean)
# -------- #

$(call add_substitution, PACKAGE_NAME, hades)
$(call add_substitution, PACKAGE_VERSION, 0.5.0)
$(call add_substitution, PACKAGE_VERSION, 0.5.1)
$(call add_substitution, PACKAGE_DESCRIPTION, Distributed AG DSN RADIUS MAC authentication. Site node agent and captive portal)
$(call add_substitution, PACKAGE_AUTHOR, Sebastian Schrader)
$(call add_substitution, PACKAGE_AUTHOR_EMAIL, [email protected])
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
hades (0.5.1) bullseye; urgency=high

* Fix bug breaking any RPC method call (GH-119)

-- <[email protected]> Mon, 19 Sep 2022 13:51:20 +0000

hades (0.5.0) bullseye; urgency=low

* Upgrade to Debian bullseye (GH-94, GH-99, GH-103, GH-113)
Expand Down
2 changes: 1 addition & 1 deletion src/hades/agent/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def wrap(
(cls,),
{
'name': name,
'run': f,
'run': staticmethod(f),
'_decorated': True,
'__doc__': f.__doc__,
'__module__': f.__module__,
Expand Down
33 changes: 33 additions & 0 deletions tests/test_agent_rpc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import pytest
from celery.utils.threads import LocalStack

from hades.agent.tasks import RPCTask, rpc_task


@pytest.fixture(autouse=True, scope="session")
def celery_request_context():
RPCTask.request_stack = LocalStack()


def test_rpc_task_nullary():
@rpc_task()
def const5() -> int:
return 5

assert const5() == 5


def test_rpc_task_unary():
@rpc_task()
def add1(i: int) -> int:
return i + 1

assert add1(1) == 2


def test_rpc_task_unary_kwonly():
@rpc_task()
def add1(*, i: int) -> int:
return i + 1

assert add1(i=1) == 2

0 comments on commit 2915fbf

Please sign in to comment.