The SPARQLWrapper.queries method is a sync wrapper around async code and intended to be a convenience method for users how wish to execute multiple operations concurrently but do not want to write async code themselves.
SPARQLWrapper.queries internally creates a SPARQLWrapper instance with a shared httpx.AsyncClient that is then used in an async context manger for calls to SPARQLWrapper.aquery.
SPARQLWrapper.queries ergo is a managed application of SPARQLWrapper.aquery that uses the context manager API of SPARQLWrapper internally.
This application causes the sparqlx ClientManager to emit a warning about an open client though. While this is actually intended behavior, it is superfluos and potentially misleading for SPARQLWrapper.queries which actually manages the client through the context manager.
It is therefore preferable to suppress client warnings for SPARQLWrapper.queries.
The
SPARQLWrapper.queriesmethod is a sync wrapper around async code and intended to be a convenience method for users how wish to execute multiple operations concurrently but do not want to write async code themselves.SPARQLWrapper.queriesinternally creates aSPARQLWrapperinstance with a sharedhttpx.AsyncClientthat is then used in an async context manger for calls toSPARQLWrapper.aquery.This application causes the sparqlx
ClientManagerto emit a warning about an open client though. While this is actually intended behavior, it is superfluos and potentially misleading forSPARQLWrapper.querieswhich actually manages the client through the context manager.It is therefore preferable to suppress client warnings for
SPARQLWrapper.queries.