[Deluge] #3491: Console UI should not depend on core modules

1 view
Skip to first unread message

Deluge

unread,
Dec 19, 2021, 4:21:11 AM12/19/21
to delug...@googlegroups.com
#3491: Console UI should not depend on core modules
------------------------+-------------------
Reporter: Cas | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.0.6
Component: Console UI | Version: 2.0.0
Keywords: |
------------------------+-------------------
While looking at a PR removing dependency on core.rpcserver in Web UI I
wondered if any other UI components also had core module dependency and
found:

{{{
from deluge.core.preferencesmanager import DEFAULT_PREFS
}}}

https://github.com/deluge-
torrent/deluge/blob/develop/deluge/ui/console/widgets/statusbars.py#L14

This means that it is harder to package console UI without including the
core code so should be replaced

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

Deluge

unread,
Dec 20, 2021, 1:27:36 AM12/20/21
to delug...@googlegroups.com
#3491: Console UI should not depend on core modules
-------------------------+-------------------

Reporter: Cas | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.0.6
Component: Console UI | Version: 2.0.0
Resolution: | Keywords:
-------------------------+-------------------

Comment (by DjLegolas):

To change this, we should have a way to get the default values from
`preferencesmanager`.[[br]]
There are 2 ways that I can think of right now:
1. Move the defaults to a different file, outside of
`core.preferencesmanager`.
2. Add an exported function that will return it.
I have a feeling that there might be a better solution for this.

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

Deluge

unread,
Dec 20, 2021, 5:08:00 PM12/20/21
to delug...@googlegroups.com
#3491: Console UI should not depend on core modules
-------------------------+-------------------

Reporter: Cas | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.0.6
Component: Console UI | Version: 2.0.0
Resolution: | Keywords:
-------------------------+-------------------

Comment (by Cas):

Since it's only used for the unchanging daemon_port I would just hard-code
it to 58846.

If you wanted a better change we would set a common DEFAULT_DAEMON_PORT
constant to be used throughout the code but we don't really gain anything.

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

Deluge

unread,
Dec 22, 2021, 6:18:26 PM12/22/21
to delug...@googlegroups.com
#3491: Console UI should not depend on core modules
-------------------------+--------------------
Reporter: Cas | Owner:
Type: bug | Status: closed

Priority: major | Milestone: 2.0.6
Component: Console UI | Version: 2.0.0
Resolution: Fixed | Keywords:
-------------------------+--------------------
Changes (by Cas):

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


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

Reply all
Reply to author
Forward
0 new messages