Opened 3 years ago
Closed 3 years ago
#3476 closed bug (Fixed)
GTKUI logs error when enabling plugin.
Reported by: | mhertz | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.6 |
Component: | GTK UI | Version: | 2.0.0 |
Keywords: | Cc: |
Description
In latest python-setuptools 1.57 there's a metadata change causing the description being added to actual payload of generated PKG-INFO and not as header-field like previously. The metadata-spec states it CAN do this, but always does in my tests when using this version. Whenever enabling a plugin, then will show an error in log/terminal about 'None' not supported as first argument, as now is in payload and not in a 'Description' header field anymore, and per spec returns None in that case. I guess can be changed to check for this circumstance, but I quickly just changed line 1147 in deluge/ui/gtk3/preferences.py from: '
self.builder.get_object('label_plugin_details').set_text( plugin_info['Description'] )
Into instead:
self.builder.get_object('label_plugin_details').set_text( plugin_info['Summary'] )
Which works for old and new PKG-INFO generated files.
Here's two examples of generated AutoAdd.egg-info/PKG-INFO files from unmodified deluge git clone and built with 'python setup.py bdist_egg', first with latest python-setuptools 1.57, and next with previous python-setuptools 1.56.2(both python3, as on arch, python means python3, and btw using latest python 3.9.5 also):
Metadata-Version: 2.1 Name: AutoAdd Version: 1.8 Summary: Monitors folders for .torrent files. Home-page: http://dev.deluge-torrent.org/wiki/Plugins/AutoAdd Author: Chase Sterling, Pedro Algarvio Author-email: chase.sterling@gmail.com, pedro@algarvio.me License: GPLv3 Platform: UNKNOWN Monitors folders for .torrent files.
Metadata-Version: 2.1 Name: AutoAdd Version: 1.8 Summary: Monitors folders for .torrent files. Home-page: http://dev.deluge-torrent.org/wiki/Plugins/AutoAdd Author: Chase Sterling, Pedro Algarvio Author-email: chase.sterling@gmail.com, pedro@algarvio.me License: GPLv3 Description: Monitors folders for .torrent files. Platform: UNKNOWN
Thanks in advance.
Change History (5)
comment:1 by , 3 years ago
Component: | Unknown → GTK UI |
---|
comment:2 by , 3 years ago
Milestone: | needs verified → 2.0.6 |
---|
comment:3 by , 3 years ago
comment:4 by , 3 years ago
Thanks for reporting!
This needing fixing when parsing the metadata in the Pluginmanagerbase so that all UIs would not encounter this error.
Fixed in [2351d658449] and [c3cd7f5e5cd1]
comment:5 by , 3 years ago
Resolution: | → Fixed |
---|---|
Status: | new → closed |
Some links to get further details on the issue:
https://packaging.python.org/en/latest/specifications/core-metadata/#description
A related warehouse issue: https://github.com/pypa/warehouse/issues/8174