- Add new requirements files to make it easier to install deps.
- Tox changes
- Update tox to use new requirements files.
- Tweak heading styles.
- Add development environment command `devenv`.
- Remove testenv command as it would run on devenv creation.
- Travis changes
- Now uses xenial as trusty is very old now.
- Trial run disabled to speed up tests.
- Add tox-venv for Python 3 support.
- Only install testssl if running security tests.
- Appveyor
- Add tox-venv for Python 3 support.
- Use requirements file for non-tox.
- Remove trial run to speed up testing.
- Added a pre-commit config for code linting and formatting. It will
auto-format python, javascript, CSS, YAML and markdown files to save
manually doing so. To install:
pip install pre-commit
pre-commit install
- Added a default virtual environment directory to gitignore.
- Use recommonmark to enable use of markdown files in docs.
- Fix theme not specified
- Remove unused spelling module.
- Cleanup mocking modules in conf so building docs requires only Sphinx.
- Simplify tox section, including use of requirements-docs file. Added
slimit dependency for sdist-ing deluge package.
With non-English languages this lookup would fail without gettext
translation of the column name.
A better solution is to not use the translatable column title as an
index but this is a quick fix for now.
The move to using auto-formatter makes it easier to read, submit and
speeds up development time. https://github.com/ambv/black/
Although I would prefer 79 chars, the default line length of 88 chars
used by black suffices. The flake8 line length remains at 120 chars
since black does not touch comments or docstrings and this will require
another round of fixes.
The only black setting that is not standard is the use of double-quotes
for strings so disabled any formatting of these. Note however that
flake8 will still flag usage of double-quotes. I may change my mind on
double vs single quotes but for now leave them.
A new pyproject.toml file has been created for black configuration.
Simplify the methods by initialising the session_status dict using
libtorrent session_stats_metrics and rate keys.
Instead of first looking for deprecated keys use exception then lookup.
Added a few more tests.
If a magnet is added to new Deluge state, then deleted, it will reappear
on restart.
The problem results from torrents requiring both state and torrent file
but magnet only rely on the state file and the save_state code not
saving if the torrent list is empty. So torrents won't be loaded as
their torrent files have been deleted but magnets details remain in
state file and are loaded again on restart.
The fix is to always save the state file even if the state is empty.
- Fix a potential scoping issue with callback function by moving to
class method and adding requried parameters.
- Remove unneeded return statements and variable.
- Disable the magnet from being auto_managed so it starts immediately.
- Reduce the default timeout to 30secs.
- Use the generic tempfile dir.
- Move callback method to be class method
A magnet that prefetched the metadata is added as a normal torrent but
with the filename set to the magnet URI. So we need to assign the URI to
magnet arg and set filename to None before creating Torrent object.
Updated the is_magnet function to prevent AttributeError with None type.
The file priorities were not updating correctly in the UI and it was
found that in lt 1.1 file priorities are now updated asynchonously so we
cannot get the values immediately. So only update the options
file_priorities if they are empty.
Python 3 raised a decoding error with the google page which appears to be
encoded with 'latin-1', so extract the content charset to decode and
re-encode in 'utf-8'.
This applies the following for both WebUI and Daemon:
1. Raised minimal TLS version to TLSv1.2
2. Added specific cipher suite list
3. Added support for ECDSA auth keys
4. Added support for ECDHE key exchange algorithm
We disabled the ability to perform TLS/SSL renegotiation and therefore
will prevent the clients from renegotiating, which can be exploit for
DoS attacks.
New security tests now will be skipped when running `pydef` and `trial`
testenvs. To run the test, use the testenv `security` or add the environment
variable `SECURITY_TESTS` before running the tests. Also should only run when
adding to the commit message the string `SECURITY_TEST`.
Add CSS background position and size for sidebar icons.
Without this change tracker icons that are too big, render as too big.
This restrains them to fit into the sidebar list item.
If the torrent_id argument received in the pause or resume methods is not a string, the methods execute with the un-parsed input and then with parsed input on a second call. A key error exception is thrown from the first call, and the second call succeeds.
Likely that the deprecation warning from cryptography is causing the
setup.py sphinx build command to return an error so the tox/travis job
is marked as failing. Changing to calling the sphinx-build command
directly solves this.
Also updated the sphinx config for built-in napoleon and faster builds
using jobs option.
Floor division will return a float if a float is provided so ensure int
when dividing by the stop_ratio. All other status values from libtorrent
are ints.
Added tests.