Skip to content

Commit

Permalink
Merge branch 'release/4.0.0rc3'
Browse files Browse the repository at this point in the history
* release/4.0.0rc3:
  Bump version: 4.0.0rc2 → 4.0.0rc3
  Fix star agent bug and upgrade xmpp server.
  • Loading branch information
javipalanca committed Dec 5, 2024
2 parents aa2d9be + b155159 commit 5886e5e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 23 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jinja2-time==0.2.0
timeago==1.0.16
singletonify==0.2.4
pytz==2022.1
pyjabber==0.1.6
pyjabber==0.1.8
uvloop>=0.21.0; platform_system != "Windows"
winloop>=0.1.7; platform_system == "Windows"

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 4.0.0rc2
current_version = 4.0.0rc3
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)((?P<release>[a-z]+)(?P<rc>\d+))?
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def parse_requirements(filename):

setup(
name='spade',
version='4.0.0rc2',
version='4.0.0rc3',
description="Smart Python Agent Development Environment",
long_description=readme + '\n\n' + history,
author="Javi Palanca",
Expand Down
2 changes: 1 addition & 1 deletion spade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

__author__ = """Javi Palanca"""
__email__ = "[email protected]"
__version__ = "4.0.0rc2"
__version__ = "4.0.0rc3"

__all__ = ["agent", "behaviour", "message", "template"]

Expand Down
2 changes: 1 addition & 1 deletion spade/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ async def _async_connect(self) -> None: # pragma: no cover
)
self.client.add_event_handler("message", self._message_received)

self.client.connect(self.jid.host, self.xmpp_port)
self.client.connect(address=(self.jid.host, self.xmpp_port))

done, pending = await asyncio.wait(
[connected_task, disconnected_task, failed_auth_task],
Expand Down
15 changes: 14 additions & 1 deletion spade/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import os
import click
import spade
import socket
Expand All @@ -25,7 +26,17 @@ def cli():
@click.option("--client_port", default=5222, help="Client port")
@click.option("--server_port", default=5269, help="Server port")
@click.option("--debug", is_flag=True, default=False, help="Enables debug mode")
def run(host, client_port, server_port, debug):
@click.option(
"--db",
type=str,
default=os.path.join("server.db"),
show_default=True,
help="Path for database file",
)
@click.option(
"--purge", is_flag=True, help="Restore database file to default state (empty)"
)
def run(host, client_port, server_port, debug, db, purge, log_path):
"""Launch an XMPP server"""
if check_port_in_use(client_port, host):
click.echo(f"Error: The port {client_port} is already in use.")
Expand All @@ -39,6 +50,8 @@ def run(host, client_port, server_port, debug):
client_port=client_port,
server_port=server_port,
connection_timeout=600,
database_path=db,
database_purge=purge,
)
server.start(debug=debug)

Expand Down
2 changes: 1 addition & 1 deletion spade/templates/internal_tpl_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ <h3 class="box-title">Agent Friends</h3>

<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Version</b> 4.0.0rc2
<b>Version</b> 4.0.0rc3
</div>
<strong>Copyright © {% now 'local', '%Y' %} <a href="http://github.com/javipalanca/spade">SPADE</a>.</strong>
</footer>
Expand Down
16 changes: 0 additions & 16 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,6 @@ def iq():
}
return iq

# @pytest.fixture(autouse=True, scope="function")
# async def run_around_tests(event_loop):
# container = Container()
# container.reset()
# if not container.is_running:
# container.__init__()
# container.loop = event_loop
# yield
# # Cancel tasks and close loop after testing
# tasks = asyncio.all_tasks(loop=container.loop)
# for task in tasks:
# task.cancel()
# from contextlib import suppress
# with suppress(asyncio.CancelledError):
# await task


@pytest.fixture(scope="module", autouse=True)
def cleanup(request):
Expand Down

0 comments on commit 5886e5e

Please sign in to comment.