The usual minor fixes for unicode/bytes for library calls.
The minimum Twisted version is now 16 for Python 3 support so remove old
code and start replacing deprecated methods.
Raised the minimum TLS version to 1.2 for the web server.
* In Py3 base64.encodestring is deprecated so rather than use the
Py3 only encodebytes instead use b64encode. The other advantage is
that with issue a consistent TypeError is raised that we can catch.
Will the change to deluge.svg all the icons need recreated. I also
updated the script to losslessly compress the png files with zopflipng.
hicolor theme changes:
- Added a 512px icon.
- Added a deluge-panel.png for systray theming.
Added extra webui icons and updated index.html to use them
correctly.
Trying to connect to daemon B while still connected to A will cause
the torrents from A to be shown after connecting to B.
Therefor, checking if connected to any daemon before connecting to B.
The sort function used when no column is being sorted was a lambda
function that had no effect and had a bug. Instead default to sort by
the added date.
Also fixed the name column sort to lowercase and uppercase properly.
It can be useful to have the build folder available so zip it up for
download as an artifact.
Although the 7z has an exclude for the installer exe it doesn't seem to
be working.
There was a misunderstand about outgoing interface setting in libtorrent
and instead of being able to take both IP and adapater names, it only
accepts adapter names and errors with an IP address, which was the
default of '0.0.0.0' in code.
This fixes the code to not accept IP address and use empty string if it
is given one.
Also includes a bit of code cleanup.
Some new flake8 checkers were added so fix these new warnings and
any issues uncovered.
Use add-trailing-comma to fix missing trailing commas. It does not
format it as well as I would like however it was fast to change and
helps with git changes in future.
Removed pylint from tox due to large number of warnings.
Switching to Pipenv will speed up developement. See the docs for
details on using Pipenv.
- Added more flake8 checks.
- Added `detox` for running tests in parallel locally.
The tests on Python revealed a bug with comparing dev versions.
Switch to comparing by integers and setting non-dev version to infinity.
There is still an issue with suffix release comparisons beyond single
digits but will leave that for now.
Use a sha1 of time.time() can result in identical host_id. This was
evident with Travis tests randomly failing due to host_id collision
returning the wrong host details.
Using uuid4 to generate a random UUID in hex form should fix this issue.
The use of `{env:PWD}` is not available on Windows so switch to
`{toxworkdir}` which is the directory where virtual environments
are created and sub directories for packaging reside.
Instances of libtorrent with Local Service Discovery enabled are leaving
many sockets fd open with every test run and will fail with 'Too many files
open' if ulimit is >=1024.
Config values are either wrong, unused or default is better.
Disable logging of deluge log output in testing.
Newer versions of pytest now use `pytest` cmd so rename.
The synchonous add torrent method was replaced with async but this
break backward compatibility with 3rd party plugins and clients.
Added a new add_torrent_file_async method for adding single torrent.
Torrent manager has a new add_async method and split up code to prevent
duplication.
Update any use of add_torrent_file to add_torrent_file_async. Future
refactoring could use add_torrent_files instead.