Problem
PR #944 split EventQueue into an abstract base + concrete EventQueueLegacy, with EventQueue.__new__ redirecting EventQueue(...) to EventQueueLegacy(...) at runtime for backwards compatibility. The docstring of EventQueue shows queue = EventQueue() as typical usage.
However, mypy correctly flags this pattern as an error because EventQueue is declared abstract via ABC + @abstractmethod on enqueue_event:
error: Cannot instantiate abstract class "EventQueue" with abstract attribute "enqueue_event" [abstract]
error: "EventQueue" has no attribute "dequeue_event"; maybe "enqueue_event"? [attr-defined]
The methods dequeue_event, tap, close, task_done, is_closed only exist on EventQueueLegacy, not on the abstract EventQueue interface.
Result: downstream type-checked codebases (we ship a Python SDK that strict-mode-mypys every commit across 3.10–3.13) must keep importing EventQueueLegacy explicitly — the class name advertises its own deprecation, but it remains the only typeable option in a2a-sdk 1.0.1.
a2a-sdk 1.0.1 internal usage
Even a2a-sdk's own modules never instantiate EventQueue() — they all use EventQueueLegacy():
a2a/server/events/in_memory_queue_manager.py: queue = EventQueueLegacy()
a2a/server/events/queue_manager.py: typed as EventQueueLegacy
a2a/server/events/event_consumer.py: typed as EventQueueLegacy
a2a/server/request_handlers/default_request_handler.py: queue = EventQueueLegacy()
Only the docstring of EventQueue itself shows queue = EventQueue().
Requested
One of:
- Promote
EventQueue to a concrete (non-abstract) class that owns the full method surface (dequeue_event, tap, close, task_done, is_closed), making EventQueueLegacy a thin alias for the deprecation window.
- Add a
DefaultEventQueue (or similar) concrete class that downstream users can import and instantiate without the *Legacy name, with the same method surface as EventQueueLegacy.
- Document that
EventQueueLegacy is the supported instantiation surface for the foreseeable future and update the EventQueue docstring's queue = EventQueue() example accordingly so users (and type-checkers) aren't misled.
We don't have a preference on which path — any of the three unblocks the rename downstream.
Downstream tracking
adcontextprotocol/adcp-client-python#699 (left a TODO in our harness pointing at this issue).
Problem
PR #944 split
EventQueueinto an abstract base + concreteEventQueueLegacy, withEventQueue.__new__redirectingEventQueue(...)toEventQueueLegacy(...)at runtime for backwards compatibility. The docstring ofEventQueueshowsqueue = EventQueue()as typical usage.However, mypy correctly flags this pattern as an error because
EventQueueis declared abstract viaABC+@abstractmethodonenqueue_event:The methods
dequeue_event,tap,close,task_done,is_closedonly exist onEventQueueLegacy, not on the abstractEventQueueinterface.Result: downstream type-checked codebases (we ship a Python SDK that strict-mode-
mypys every commit across 3.10–3.13) must keep importingEventQueueLegacyexplicitly — the class name advertises its own deprecation, but it remains the only typeable option in a2a-sdk 1.0.1.a2a-sdk 1.0.1 internal usage
Even a2a-sdk's own modules never instantiate
EventQueue()— they all useEventQueueLegacy():a2a/server/events/in_memory_queue_manager.py:queue = EventQueueLegacy()a2a/server/events/queue_manager.py: typed asEventQueueLegacya2a/server/events/event_consumer.py: typed asEventQueueLegacya2a/server/request_handlers/default_request_handler.py:queue = EventQueueLegacy()Only the docstring of
EventQueueitself showsqueue = EventQueue().Requested
One of:
EventQueueto a concrete (non-abstract) class that owns the full method surface (dequeue_event,tap,close,task_done,is_closed), makingEventQueueLegacya thin alias for the deprecation window.DefaultEventQueue(or similar) concrete class that downstream users can import and instantiate without the*Legacyname, with the same method surface asEventQueueLegacy.EventQueueLegacyis the supported instantiation surface for the foreseeable future and update theEventQueuedocstring'squeue = EventQueue()example accordingly so users (and type-checkers) aren't misled.We don't have a preference on which path — any of the three unblocks the rename downstream.
Downstream tracking
adcontextprotocol/adcp-client-python#699 (left a TODO in our harness pointing at this issue).