# `version` — Software Version (XEP-0092) support

This subpackage provides support for querying and answering queries adhering to the XEP-0092 (Software Support) protocol.

New in version 0.10.

The protocol allows entities to find out the software version and operating system of other entities in the XMPP network.

class aioxmpp.VersionServer

  `Service` which handles inbound XEP-0092 Software Version requests.

  Warning

  Do not depend on this service in another service. This service exposes possibly private or sensitive information over the XMPP network without any filtering. Implicitly summoning this service via a dependency is thus discouraged.

  If you absolutely need to do this for the implementation of another published XEP, please file an issue against `aioxmpp` so that we can work out a good solution.

  Warning

  This service does answer version queries, no matter who asks. This may not be desirable, in which case this service is not for you.

  See also

  `query_version()`

    for a function to obtain another entities software version.

  Note

  By default, this service does not reply to version queries. The `name` attribute needs to be set first.

  The response can be configured with the following attributes:

  name = None

    The software name of this entity.

    Defaults to `None`.

    If this attribute is `None`, version requests are not answered but fail with a `service-unavailable` error.

  version = None

    The software version of this entity.

    Defaults to `None`.

    If this attribute is `None` or the empty string, the version will be shown as `"unspecified"` to other entities. This can be used to avoid disclosing the specific version of the software.

  os = distro.name() or platform.system()

    The operating system of this entity.

    Defaults to `distro.name()` or `platform.system()` (if `distro` is not available).

    This attribute can be set to `None` or deleted to prevent inclusion of the OS element in the reply.

async aioxmpp.version.query_version(stream: StanzaStream, target: JID) → Query

  Query the software version of an entity.

  Parameters:

    - stream (`aioxmpp.stream.StanzaStream`) – A stanza stream to send the query on.

    - target (`aioxmpp.JID`) – The address of the entity to query.

  Raises:

    - OSError – if a connection issue occurred before a reply was received

    - aioxmpp.errors.XMPPError – if an XMPP error was returned instead of a reply.

  Return type:

    `aioxmpp.version.xso.Query`

  Returns:

    The response from the peer.

  The response is returned as `Query` object. The attributes hold the data returned by the peer. Each attribute may be `None` if the peer chose to omit that information. In an extreme case, all attributes are `None`.

## XSO Definitions

class aioxmpp.version.xso.Query(*args, **kwargs)

  XEP-0092 Software Version query `XSO`.

  name

    Software name as string. May be `None`.

  version

    Software version as string. May be `None`.

  os

    Operating system as string. May be `None`.