#3476: GTKUI logs error when enabling plugin.
----------------------------+---------------------
 Reporter:  mhertz          |       Type:  bug
   Status:  new             |   Priority:  minor
Milestone:  needs verified  |  Component:  Unknown
  Version:  2.0.0           |   Keywords:
----------------------------+---------------------
 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: [email protected], [email protected]
 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: [email protected], [email protected]
 License: GPLv3
 Description: Monitors folders for .torrent files.
 Platform: UNKNOWN
 }}}
 Thanks in advance.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3476>
Deluge <https://deluge-torrent.org/>
Deluge Project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/deluge-dev/045.8c5e1e112fc56bd789d4250244df6029%40deluge-torrent.org.

Reply via email to