[Deluge] #3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7

14 views
Skip to first unread message

Deluge

unread,
Jun 7, 2019, 12:32:53 PM6/7/19
to delug...@googlegroups.com
#3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7
----------------------+--------------------------
Reporter: thoradia | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.0.0
Component: Core | Version: master (git)
Keywords: |
----------------------+--------------------------
I am trying to run deluged 2.0.0 with Python 2.7.15, and it logs the
errors below.

Do deluged and deluge-web 2.0.0 run with Python 2.7, or is Python 3.5
required?

I found
[https://review.opendev.org/#/c/514315/2/ospurge/tests/test_main.py this]
to add SimpleNamespace to Python 2.7, just in case.

{{{
Unhandled error in Deferred:
[CRITICAL][twisted :154 ] Unhandled error in
Deferred:
Traceback (most recent call last):
File ".../deluge-2.0.0-py2.7.egg/deluge/component.py", line 126, in
on_start
File ".../deluge-2.0.0-py2.7.egg/deluge/component.py", line 120, in
_component_start_timer
File ".../Twisted-19.2.1-py2.7-linux-
x86_64.egg/twisted/internet/task.py", line 194, in start
File ".../Twisted-19.2.1-py2.7-linux-
x86_64.egg/twisted/internet/task.py", line 239, in __call__
--- <exception caught here> ---
File ".../Twisted-19.2.1-py2.7-linux-
x86_64.egg/twisted/internet/defer.py", line 151, in maybeDeferred
File ".../deluge-2.0.0-py2.7.egg/deluge/core/alertmanager.py", line 62,
in update
File ".../deluge-2.0.0-py2.7.egg/deluge/core/alertmanager.py", line 129,
in handle_alerts
exceptions.AttributeError: 'module' object has no attribute
'SimpleNamespace'
[CRITICAL][deluge.log :205 ] twisted.internet.defer
}}}

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

Deluge

unread,
Jun 8, 2019, 6:57:44 AM6/8/19
to delug...@googlegroups.com
#3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7
-----------------------+--------------------------

Reporter: thoradia | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.0.0
Component: Core | Version: master (git)
Resolution: | Keywords:
-----------------------+--------------------------

Comment (by Cas):

It seems with that change I have quietly dropped support for Python 2.7.
It is end-of-life in 6 months and I do feel that Deluge 2.0 should be
Python 3 only.

Is that okay?

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3257#comment:1>

Deluge

unread,
Jun 8, 2019, 10:33:19 AM6/8/19
to delug...@googlegroups.com
#3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7
-----------------------+--------------------

Reporter: thoradia | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.0.0
Component: Core | Version: master
Resolution: | Keywords:
-----------------------+--------------------

Comment (by thoradia):

Thank you for your reply.

You decide what version of Python you want to support. Python 3 is a
reasonable choice.

If you decide for Python 3, then I will stick to deluge 1.3.15 until the
systems for which I build (LibreELEC/CoreELEC) ship it.

May I suggest to drop Python 2 support less quietly, as it would save
everyone's time and energy?

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3257#comment:2>

Deluge

unread,
Jun 8, 2019, 12:08:32 PM6/8/19
to delug...@googlegroups.com
#3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7
-----------------------+--------------------

Reporter: thoradia | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.1.x

Component: Core | Version: master
Resolution: | Keywords:
-----------------------+--------------------

Comment (by Cas):

I have been hesitant about completely dropping Python 2 and that commit is
the only breaking change.

Perhaps with that knowledge about Kodi I could keep support for it until a
later 2.x release.

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3257#comment:4>

Deluge

unread,
Jun 8, 2019, 12:13:12 PM6/8/19
to delug...@googlegroups.com
#3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7
-----------------------+--------------------

Reporter: thoradia | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.0.2

Component: Core | Version: master
Resolution: | Keywords:
-----------------------+--------------------
Changes (by Cas):

* milestone: 2.1.x => 2.0.2


Comment:

Ok I will fix this and make a patch release soon.

> May I suggest to drop Python 2 support less quietly, as it would save
everyone's time and energy?

You are totally right and I am in the middle of writing release notes that
are a bit delayed.

I shall also remember when going Python 3 only to ensure setup.py stops
installing on Python 2...

Thanks for the suggestions :)

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3257#comment:5>

Deluge

unread,
Jun 8, 2019, 5:31:35 PM6/8/19
to delug...@googlegroups.com
#3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7
-----------------------+--------------------

Reporter: thoradia | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.0.2
Component: Core | Version: master
Resolution: | Keywords:
-----------------------+--------------------

Comment (by Cas):

Fixed: 957cd5dd9c82ddc75d3bb5626057cbee7b059c2c

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3257#comment:6>

Deluge

unread,
Jun 8, 2019, 5:31:44 PM6/8/19
to delug...@googlegroups.com
#3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7
-----------------------+--------------------
Reporter: thoradia | Owner:
Type: bug | Status: closed

Priority: minor | Milestone: 2.0.2
Component: Core | Version: master
Resolution: Fixed | Keywords:
-----------------------+--------------------
Changes (by Cas):

* status: new => closed
* resolution: => Fixed


--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3257#comment:7>

Deluge

unread,
Jun 8, 2019, 7:07:41 PM6/8/19
to delug...@googlegroups.com
#3257: 'module' object has no attribute 'SimpleNamespace' with Python 2.7
-----------------------+--------------------
Reporter: thoradia | Owner:

Type: bug | Status: closed
Priority: minor | Milestone: 2.0.2
Component: Core | Version: master
Resolution: Fixed | Keywords:
-----------------------+--------------------

Comment (by thoradia):

Thanks!

--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3257#comment:8>

Reply all
Reply to author
Forward
0 new messages