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.
There are some blocklists with encoded names that break upon importing
so decode lines to unicode.
Need to use decode_bytes as not all encoded lines are utf8!
This reverts commit 7b87a93862.
After further discussion in the ticket this change is undesired.
> I wrongly assumed that private trackers will count how many bytes you
> download but they don't, they track how many parts(or chunks?) you
> have, when you announce it. So using total_done is fine, no change
> needed.
> Checking for private flag and using total_wanted_done for public
> enables users to be a bit more selfish. They can start a torrent,
> let it run for a bit then deselect the files they don't want and
> only upload enough to make up for what they wanted to download. This
> means they may upload less than they downloaded, hurting the swarm.
> So I personally don't think this would be a good change.
> Overall my suggestion is to close this as not a bug.
The parsing of the content-disposition in httpdownloader was not able to
handle missing parameters e.g. "Content-Disposition: attachment" and would
result in an IndexError. Added a test for this use-case.
Fixed the issue using the cgi.parse_header to extract the parameters.
The original fix was not correct as the strcoll function cannot
accept None only strings. This fix ensures that the value is an
empty string if None for comparison.
* The changes to core api now return a deferred instead of torrent_id
so need to update autoadd to use callbacks.
* Minor refactor to save one indentation level and reuse fail callback.
* Add exception handler for any errors from label plugin.
* setup.py sdist now creates a pristine tar which can be used for release.
* Uses the version currently checked-out in git.
* Removed unneeded lines in manifest.