Skip to content

Possibly suppress warnings about open client in SPARQLWrapper.queries #124

@lu-pl

Description

@lu-pl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions