From 1c84f63247cff50b08ed15dec59b1c6b4a81c9d0 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 10 Apr 2024 16:51:24 +0200 Subject: [PATCH] replace deprecated get_element() which was removed in 4.x /usr/lib/python3/dist-packages/androguard/core/bytecodes/apk.py:884: DeprecationWarning: This method is deprecated since 3.3.5. It was added in 3.3.5. Debian/bullseye and Ubuntu/20.04/focal both include new enough versions. Debian/buster's is too old (3.3.3). --- fdroidserver/update.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index be3824bd..1c38ff90 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -1778,7 +1778,7 @@ def scan_apk_androguard(apk, apkfile): if maxSdkVersion is not None: apk['maxSdkVersion'] = maxSdkVersion - icon_id_str = apkobject.get_element("application", "icon") + icon_id_str = apkobject.get_attribute_value("application", "icon") if icon_id_str: try: icon_id = int(icon_id_str.replace("@", "0x"), 16) diff --git a/setup.py b/setup.py index 94e43e98..8e4e2452 100755 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ setup( ], install_requires=[ 'appdirs', - 'androguard >= 3.3.3', + 'androguard >= 3.3.5', 'clint', 'defusedxml', 'GitPython',