* Added a new convert_to_utf8 function to common that is handy for
any nested dictionaries etc.
* Small refactor to get rid of duplicate code and comment will be
encoded by convert_to_utf8 function.
* Passes test_maketorrent.
* Twisted methods require byte-string arguments.
* The headers str conversion in httpdownloader _download_file was
incorrent and left the dict key still as unicode so replaced with
a dict comprehension (py2.7 requirement).
* Added `from __future__ import unicode_literals` to every file so
now all strings in code are forced to be unicode strings unless
marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`.
This is a large change but we have been working towards the goal of unicode
strings passed in the code so decoding external input and encoding
output as byte strings (where applicable).
Note that in Python 2 the `str` type still refers to byte strings.
* Replaced the use of `str` for `basestring` in isinstance comparison as
this was the original intention but breaks code when encoutering unicode strings.
* Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly
related to gobject signal names.
- Using DYLD_LIBRARY_PATH seems to have the unintended effect of making associated apps
unusable (unable to locate dylds) when opening a file from within Deluge. The workaround
for now is to switch to using DYLD_FALLBACK_LIBRARY_PATH.
* There is a problem with Twisted 17 and the setup for travis and tox
using site-packages with an old openssh package.
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'
* The simplest workaround for now is to pin Twisted to 16.6.
- With libtorrent 1.1 dht is enabled from startup and the returned status
contains DHT node values (i.e. non-zero). Should be sufficient to only test for start
and end of the status string to be correct.
- libtorrent 1.1 changes default piece priorty to 4 so changes to
the UIs are required. Some refactoring and improvements were made as well:
- A new 'Low' priority introduced that is values 1-3.
- 'Normal' priority is now value 4.
- Removed 'Highest' with the addition of 'Low' and 'High' is now values 5-7.
- Renamed 'Do not download' to 'Ignore' so it is more succinct.
- Moved file priority constant to ui.common.
* With new version of Sphinx 1.5 the warning below was generated, caused
by incorrect formatting of return type in docstring.
docstring of deluge.config.find_json_objects:None:
WARNING: more than one target found for cross-reference u'start'
* Revert changes made to fix 'too many files open' as Image.open does
not return a file descriptor and generated the following error:
exceptions.AttributeError: 'NoneType' object has no attribute 'startswith'