- Create new status entry `time_since_transfer` and getter that is
calculated from lt time_since_upload and time_since_download.
- Add/update all UIs and formatters.
- Included update to console layout to match other uis
- Preparation work for using six or future module for Py2/3 compat. The
code will be written in Python 3 with Python 2 fallbacks.
- Added some Py3 imports with Py2 fallbacks to make it easier to remove
Py2 code in future.
- Replace xrange with range (sort out import as top of files in future).
- Workaround Py2to3 basestring issue with inline if in instances. This means
every usage of basestring is more considered.
- Replace iteritems and itervalues for items and values. There might be a
performance penalty on Py2 so might need to revisit this change.
- An ImportError is raised if a module is listed in the entrypoint
but is not actually installed. The code will now catch this and
will de-list the ui module that failed.
There is a bug in Py2 setuptools where the build fails if unicode dict keys
are passed to package_data:
`package_data must be a dictionary mapping package names to lists of wildcard patterns`
The easiest workaround is to remove unicode_literals use in setup.py as it is not that important.
- Python 3 renames `unicode` type to `str` and introduces `bytes` type.
- Python 2.7 has `bytes` but is only an alias for `str` so restricted
to comparisons but helps keep compatibility.
- To test for unicode string on Py2 and Py3 uses the "''.__class__" type.
- Remove usage of utf8encode and just encode, problems with bytes being passed
in code will be picked up faster.
- Where possible refactor out isinstance for try..except duck-typing.
- Switch to using Python 3 naming convention where str now refers to unicode
and bytes are encoded strings.
- Cleanup docs and code
- Also rename convert_to_utf8 to utf8_encode_structure to clarify functionality.
* 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.