The following error was encountered in GTK3 which is a result of trying
to cast a very large ETA value to C int and raising an Overlflow error.
<type 'exceptions.OverflowError'>: 3072227291 not in range -2147483648 to 2147483647
The solution is to limit the ETA to 1 year and represent any values over
that as -1 which the UIs can display as infinity.
Remove extra_requires since requirements-*.txt files provides these now
plus the extras_requires is for extras at installation time which does
not apply to docs or dev.
For test_requires include the minimal requirements for pytest to run.
This is not the same as the longer tox test requirements that include
linting, docs etcs.
Fix license field.
- Add an install_requires list to allow dependencies to be automatically
installed via setuptools or pip installation.
- Needed a workaround for twisted service_identity install.
- Tweaked the layout a bit with optional part of dependency description.
- Updated descriptions to help understand dependency usage.
- Made intltool and chardet packages optional. This will help with
installation where these might be missing and are not crucial.
- Remove gettext from dependency as is part of Python.
- License should be GPL3+.
- Use the Deluge HTTPS URLs.
- Wrap the description long lines.
- Add launchable tag to launch from software centre after install.
- Removed name tag to use .desktop file name field instead.
The new get_name method needs to function as it did in 1.3-stable so
when renaming a torrent file or top-level folder update torrent name
to reflect that. If UI supports renaming the torrent then the options
value with be used instead.
The refactoring of the options code didn't update to use the new status
key `auto_managed` and `is_auto_managed` is not a valid torrent option.
Related: 1637da84e4
The exclude 'deluge.tests' in setup.py is for excluding from package
installation but we want the files when distributing as source so
include the entire deluge/tests dir (excluding .pyc files).
Use markdown to aid readability.
Update the README and use it for the long_description in setup.py
Add detailed requirement information to the DEPENDS files.
When installed as a development version there was no way to load the
normal js scripts so improve the debug arg handling by parsing for false
values to force use of normal type scripts. Since debug arg overrides dev,
leave dev as is.
All of the non-standard docstring file headers were being added to
minified files, increasing the file size. Replace with jsdoc `/**`.
Remove ext-extensions from git as will be generated by minify script.
Prettier removed too many parentheses in asIPAdress and when minifying
the plus unary combined with the plus operator to create an incorrect
increment operator. So skip prettier formatting this secion of code.
Also fix an ECMA5 warning from closure about function scope in FilesTab.
- When both minifying modules are missing, creating a copy of the debug
file is not actually desirable, a missing file is more obvious than a copy.
WebUI can handle a missing 'normal' script and fallback to 'debug' script so
modified script to skip and warn instead.
Packaging:
- Decided that the debug files are useful for end-user so keep them in
package installation. For debug script_type to be usable all debug
file need to be avaialble so extjs debug files also included.
Script type selection:
- Fixed dev and debug request args to be properly decoded on Python 3,
otherwise comparison would fail and allowed any case for values.
- Modified the choosing of the script type to pick debug if specified
as previously always choosing dev type if dev version was True. A rare
scenario but useful but now debug is used if specified otherwise use dev.
- Changed the order when looking for alternative script types to start
with dev so that if debug is specified but missing it uses a similar
script type as previously would fallback to normal which is likely
undesired.
In TorrentView and PeersTabView, when moving the mouse pointer through
rows, the value in download and upload speed columns can be overwritten
by value from previous row cell.
The solution is to disable return by cached condition in function
cell_data_speed.
Discussion: https://github.com/deluge-torrent/deluge/pull/200#issuecomment-424907571
Removed debugging code.
Co-authored-by: Calum Lind <calumlind+deluge@gmail.com>
Refactoring for Python 3 did not account for the `self._files` using an
updated info_dict so simplify code by updating in the files for loop.
Added test that TorrentInfo.files returns the correct structure.
In a previous commit d4023e7dde removed a decode for Python 3 but
with translated text returned by gettext encoded on Python 2 the
escape function would raise a UnicodeDecodeError trying to use ascii
to decode.
The fix is to decode the message returned by gettext on Python 2.
- Use the apt addon for installing libtorrent package.
- Start the py3 test sooner as it is slow to complete.
- Add if conditions for gtkui test dependencies.
- Remove Appveyor tests that are taken care of by Travis.
Add a new `multiple` field to FileUploadField to allow selecting
multiple files. Include a fallback for if browser does not support
multiple file selection.
Update Add window to upload and parse multiple torrent files at once.
This will remove the setup dependency in "slimit" package.
In case "slimit" is missing, the non-minified JS files will be copied
as is to the build.
"slimit" is marked as a dependency for development process only.
- Add lint section to tox.
- Replace flake8 with lint on Travis and remove commented out sections.
- Remove flake8 from appveyor to reduce sequential testing time.
- When running pre-commit on all files it is picking up minified js and
css files. Since prettier will format correctly the source files ignore
them in end-of-file fixer.
- The template files in web docs can be ignored too.
- Removed the unneeded `pre-commit-hooks` dependency as pre-commit
resolves that itself.
- Include files fixed by pre-commit.
- 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.