Bug#947260: pluma: unable to enable externaltools plugin: AttributeError: 'module' object has no attribute 'UniqueById'
Source: pluma
Version: 1.22.2-1
Severity: normal
While using pluma to test a libpeas upload, I noticed that the
externaltools plugin cannot be enabled (at least with libpeas
from experimental):
> user@host:~$ DISPLAY=:0 pluma
>
> ** (pluma:5402): WARNING **: 18:39:22.167: Failed to run internal Python hook 'find_extension_type':
> Traceback (most recent call last):
> File "peas-python-internal.py", line 71, in call
> File "peas-python-internal.py", line 130, in find_extension_type
> AttributeError: 'module' object has no attribute 'UniqueById'
>
> ** (pluma:5402): WARNING **: 18:39:22.168: Failed to run internal Python hook 'find_extension_type':
> Traceback (most recent call last):
> File "peas-python-internal.py", line 71, in call
> File "peas-python-internal.py", line 130, in find_extension_type
> AttributeError: 'module' object has no attribute 'UniqueById'
This appears to be because the externaltools plugin lists UniqueById in
__all__, but does not actually have that global name:
> % ack UniqueBy
> plugins/externaltools/tools/outputpanel.py
> 20:__all__ = ('OutputPanel', 'UniqueById')
> 30:class UniqueById:
> 44:class OutputPanel(UniqueById):
> 46: if UniqueById.__init__(self, window):
>
> plugins/externaltools/tools/__init__.py
> 19:__all__ = ('ExternalToolsPlugin', 'Manager', 'OutputPanel', 'Capture', 'UniqueById')
Recent versions of libpeas use __all__ (if present) or __dict__ (otherwise)
to locate exported names in a Python plugin.
Regards,
smcv
-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 5.3.0-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8), LANGUAGE=en_GB.utf8 (charmap=UTF-8) (ignored: LC_ALL set to C.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages pluma depends on:
ii gir1.2-peas-1.0 1.24.1-1
ii gir1.2-pluma-1.0 1.22.2-1
ii iso-codes 4.4-1
ii libatk1.0-0 2.34.1-1
ii libc6 2.29-6
ii libcairo2 1.16.0-4
ii libenchant1c2a 1.6.0-11.3
ii libgdk-pixbuf2.0-0 2.40.0+dfsg-1
ii libgirepository-1.0-1 1.62.0-2
ii libglib2.0-0 2.62.3-2
ii libgtk-3-0 3.24.13-1
ii libgtksourceview-3.0-1 3.24.11-2
ii libice6 2:1.0.9-2
ii libpango-1.0-0 1.42.4-7
ii libpeas-1.0-0 1.24.1-1
ii libpeas-1.0-python2loader 1.24.1-1
ii libsm6 2:1.2.3-1
ii libx11-6 2:1.6.8-1
ii libxml2 2.9.4+dfsg1-8
ii mate-desktop-common 1.22.2-1
ii pluma-common 1.22.2-1
Versions of packages pluma recommends:
ii zenity 3.32.0-4
pluma suggests no packages.
-- no debconf information
Reply to: