Skip to content

Commit 0fc1129

Browse files
author
Neo
committed
fix: CI failures — remove phantom A2AProtocol import, fix asyncio event loop in tests
- Remove non-existent A2AProtocol from runtime/a2a/__init__.py import (fixes pdoc API docs build) - Replace deprecated asyncio.get_event_loop().run_until_complete() with asyncio.run() in test fixtures (fixes Python 3.10+ compatibility)
1 parent 0c59e8a commit 0fc1129

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

runtime/a2a/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@
55
and purchase services from other agents.
66
"""
77

8-
from runtime.a2a.protocol import A2AProtocol, ServiceListing, JobRequest, JobResult
8+
from runtime.a2a.protocol import ServiceListing, JobRequest, JobResult
99
from runtime.a2a.marketplace import A2AMarketplace
1010
from runtime.a2a.coordinator import A2ACoordinator
1111

1212
__all__ = [
13-
"A2AProtocol",
1413
"A2AMarketplace",
1514
"A2ACoordinator",
1615
"ServiceListing",

tests/test_badges.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def fake_db():
4848
def badge_manager(fake_db):
4949
"""Provide an initialised BadgeManager."""
5050
mgr = BadgeManager(fake_db)
51-
asyncio.get_event_loop().run_until_complete(mgr.initialize())
51+
asyncio.run(mgr.initialize())
5252
return mgr
5353

5454

tests/test_referrals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def fake_db():
5959
def manager(fake_db):
6060
"""Provide an initialised ReferralManager."""
6161
mgr = ReferralManager(fake_db)
62-
asyncio.get_event_loop().run_until_complete(mgr.initialize())
62+
asyncio.run(mgr.initialize())
6363
return mgr
6464

6565

tests/test_subscriptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def fake_db():
5757
def usage_tracker(fake_db):
5858
"""Provide an initialised UsageTracker."""
5959
tracker = UsageTracker(fake_db)
60-
asyncio.get_event_loop().run_until_complete(tracker.initialize())
60+
asyncio.run(tracker.initialize())
6161
return tracker
6262

6363

@@ -71,7 +71,7 @@ def feature_gate(fake_db, usage_tracker):
7171
def sub_store(fake_db):
7272
"""Provide an initialised SubscriptionStore."""
7373
store = SubscriptionStore(fake_db)
74-
asyncio.get_event_loop().run_until_complete(store.initialize())
74+
asyncio.run(store.initialize())
7575
return store
7676

7777

0 commit comments

Comments
 (0)