As of twisted 16.7.0, `twisted.web.client.HTTPDownloader` have been
marked as deprecated.
This caused the tests results to show many lines of warnings about it.
This refactor uses `twisted.web.client.Agent`, as suggested by Twisted.
- Replace usage of single char variable.
- Use max function to prevent negate lengths when calculating trim.
- Remove usage of insstr as the addstr exception when writing offscreen is
excpected behaviour so needs caught and passed. This fixes a similar
error with insstr.
The following error occured on Windows when switching to using HTTPS
url with Twisted Agent:
```
<class 'twisted.web._newclient.ResponseNeverReceived'>: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]>
```
The fix is to install certifi and provide the path to the trust store as
env var for OpenSSL to pick up.
Also includes a simplication of the core test_listen_port code.
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.