We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instantiating a FastStream instance with a RabbitBroker fails in version 0.5.25:
FastStream
RabbitBroker
How to reproduce
from faststream import FastStream from faststream.rabbit import RabbitBroker broker = RabbitBroker("amqp://guest:guest@localhost/") app = FastStream(broker)
Expected behavior app is a valid object
app
Observed behavior I get the following error:
In [1]: from faststream import FastStream ...: from faststream.rabbit import RabbitBroker ...: ...: broker = RabbitBroker("amqp://guest:guest@localhost/") ...: app = FastStream(broker) --------------------------------------------------------------------------- AsyncLibraryNotFoundError Traceback (most recent call last) Cell In[1], line 5 2 from faststream.rabbit import RabbitBroker 4 broker = RabbitBroker("amqp://guest:guest@localhost/") ----> 5 app = FastStream(broker) File /opt/conda/lib/python3.11/site-packages/faststream/_internal/application.py:74, in Application.__init__(self, broker, logger, lifespan, title, version, description, terms_of_service, license, contact, tags, external_docs, identifier, on_startup, after_startup, on_shutdown, after_shutdown) 50 def __init__( 51 self, 52 broker: Optional["BrokerUsecase[Any, Any]"] = None, (...) 70 after_shutdown: Sequence[Callable[P_HookParams, T_HookReturn]] = (), 71 ) -> None: 72 context.set_global("app", self) ---> 74 self._should_exit = anyio.Event() 75 self.broker = broker 76 self.logger = logger File /opt/conda/lib/python3.11/site-packages/anyio/_core/_synchronization.py:79, in Event.__new__(cls) 78 def __new__(cls) -> Event: ---> 79 return get_asynclib().Event() File /opt/conda/lib/python3.11/site-packages/anyio/_core/_eventloop.py:147, in get_asynclib(asynclib_name) 145 def get_asynclib(asynclib_name: str | None = None) -> Any: 146 if asynclib_name is None: --> 147 asynclib_name = sniffio.current_async_library() 149 modulename = "anyio._backends._" + asynclib_name 150 try: File /opt/conda/lib/python3.11/site-packages/sniffio/_impl.py:93, in current_async_library() 90 if curio_running(): 91 return 'curio' ---> 93 raise AsyncLibraryNotFoundError( 94 "unknown async library, or not in async context" 95 ) AsyncLibraryNotFoundError: unknown async library, or not in async context
Additional context This is probably due to #1683.
The text was updated successfully, but these errors were encountered:
It is interesting, could you please provide information about faststream, anyio versions and your platform?
Just an output of faststream --version command and anyio
faststream --version
Sorry, something went wrong.
fix (#1837): explicit asyncio.Event usage
4af443e
Are you really using curio? With default setup your example works as expected
fix: correct CLI factory behavior (#1838)
810b3bc
* fix (#1837): explicit asyncio.Event usage * fix: correct CLI object import in factory case * chore: bump version * chore: revert anyio * fix: respect extra reload extensions CLI option
No branches or pull requests
Instantiating a
FastStream
instance with aRabbitBroker
fails in version 0.5.25:How to reproduce
Expected behavior
app
is a valid objectObserved behavior
I get the following error:
Additional context
This is probably due to #1683.
The text was updated successfully, but these errors were encountered: