the apt_pkg interface is not stable across releases, hence charm-helpers has implemented it's own version and triggers this deprecation warning because the charm may have expected apt_pkg.init() to have been called by charmhelpers which it would no longer do although currently it still makes the call as it would lead to a segfault if not.
So actual impact is low but the log message is annoying and the there is an upstream_version method implemented in charmhelpers so we should be able to simply switch to that.
The only usage of apt_pkg in ceph-mon appears to be from charms.ceph:
lib/charms_ ceph/utils. py
708: import apt_pkg as apt
It's being used for a simple call to apt.upstream_ version to get the upstream version number.
Based on the following commit message: /github. com/juju/ charm-helpers/ commit/ d2ea1b8d8c2fb5b c80b8ff2f7f81c8 2a02bd611b
https:/
the apt_pkg interface is not stable across releases, hence charm-helpers has implemented it's own version and triggers this deprecation warning because the charm may have expected apt_pkg.init() to have been called by charmhelpers which it would no longer do although currently it still makes the call as it would lead to a segfault if not.
So actual impact is low but the log message is annoying and the there is an upstream_version method implemented in charmhelpers so we should be able to simply switch to that.