Skip to content

[data_interfaces] JujuVersion.from_environ() is deprecated since Ops 2.19 #217

@dwilding

Description

@dwilding

Recently I noticed the following warning when using data_interfaces:

data_interfaces.py:998: DeprecationWarning: JujuVersion.from_environ() is deprecated, use self.model.juju_version instead
    self._jujuversion = JujuVersion.from_environ()

In Ops 2.19.0 we added Model.juju_version and marked JujuVersion.from_environ() as deprecated.

Since data_interfaces requires Ops 2.0.0 or above (in PYDEPS), I'm not sure whether it would be possible to drop support for JujuVersion.from_environ() in data_interfaces. But I thought it would be useful to ask a couple of questions:

  • Is there a minimum Ops version that needs to be supported by data_interfaces?

  • If data_interfaces needs to support Ops versions prior to 2.19.0, would it be worth adding conditional logic to avoid the warning in newer Ops versions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions