Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#3257 closed bug (Fixed)

'module' object has no attribute 'SimpleNamespace' with Python 2.7

Reported by: thoradia Owned by:
Priority: minor Milestone: 2.0.2
Component: Core Version: master
Keywords: Cc:

Description

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 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 

Change History (8)

comment:1 Changed 5 years ago 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?

comment:2 Changed 5 years ago 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?

comment:3 Changed 5 years ago by Cas

  • Milestone changed from 2.0.0 to 2.1.x

Ticket retargeted after milestone closed

comment:4 Changed 5 years ago 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.

comment:5 Changed 5 years ago by Cas

  • Milestone changed from 2.1.x to 2.0.2

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 :)

comment:7 Changed 5 years ago by Cas

  • Resolution set to Fixed
  • Status changed from new to closed

comment:8 Changed 5 years ago by thoradia

Thanks!

Note: See TracTickets for help on using tickets.