Closed Lord-Kamina closed 5 months ago
Thanks for the report! I'll investigate this weekend.
I accidentally mixed the traceback from the python3.9 run with the python3.11 environment, but the error was the same.
This was run a plug-in package for Deluge. I suspect the reason is that the entry-points are defined in a hacky way:
#
# Copyright (C) 2009 GazpachoKing <chase.sterling@gmail.com>
# Copyright (C) 2011 Pedro Algarvio <pedro@algarvio.me>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2009 Damien Churchill <damoxc@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
from setuptools import find_packages, setup
__plugin_name__ = 'AutoAdd'
__author__ = 'Chase Sterling, Pedro Algarvio'
__author_email__ = 'chase.sterling@gmail.com, pedro@algarvio.me'
__version__ = '1.8'
__url__ = 'http://dev.deluge-torrent.org/wiki/Plugins/AutoAdd'
__license__ = 'GPLv3'
__description__ = 'Monitors folders for .torrent files.'
__long_description__ = """"""
__pkg_data__ = {'deluge_' + __plugin_name__.lower(): ['data/*', 'data/*/*']}
setup(
name=__plugin_name__,
version=__version__,
description=__description__,
author=__author__,
author_email=__author_email__,
url=__url__,
license=__license__,
long_description=__long_description__ if __long_description__ else __description__,
packages=find_packages(),
package_data=__pkg_data__,
entry_points="""
[deluge.plugin.core]
%s = deluge_%s:CorePlugin
[deluge.plugin.gtk3ui]
%s = deluge_%s:Gtk3UIPlugin
[deluge.plugin.web]
%s = deluge_%s:WebUIPlugin
"""
% ((__plugin_name__, __plugin_name__.lower()) * 3),
)
If a better solution cannot be realistically found, even just directly copy-pasting as a comment or a warning would be much preferable to crashing.
Well yes, of course emitting a warning would be better than crashing, but this is one of the cases we didn't anticipate at all (in fact I'm not sure we even knew it was possible to define entry points as a string) so we didn't even have an opportunity to catch the error. Anyway, now that we know, we should be able to do something about it.
Ouch… hacky indeed.
The question I suppose is how do we even interpret this stringy mess? Or do we just dump it in the output and hope for the best?
https://stackoverflow.com/questions/69111347/python-setup-py-entry-points-syntax-with-triple-single-quotes/69125407#69125407 ← looks like the official word is it's "INI-style" syntax.
Yeah, I'm hoping setuptools does the parsing and we can just access the parsed result if we find the right attribute or method.
It might do… but it wasn't difficult to do it manually anyway.
I wanted to try this app but I'm getting the above error. Tried it in a python3.11 environment, as well as a 3.9 one.
Following is the traceback, along with the python3 and pip versions, as well as the output of pip3 list: