9118 Commits

Author SHA1 Message Date
Calum Lind
36cb4c5a4f [Docs] Updates to release checklist 2019-06-11 20:14:11 +01:00
Calum Lind
676bdb26e0 [Docs] Remove incomplete Windows install instructions
The instructions are in-progress and missing steps so instead point to
the issue ticket for now.
2019-06-11 12:35:04 +01:00
Calum Lind
dff778ceeb [i18n] Try loading intl.dll on Windows 2019-06-11 12:35:04 +01:00
Trav Easton
bdadd2b515 Fix typo in install instructions for macOS 2019-06-11 12:35:04 +01:00
thelamer
a34543100c [Web] Fix peers tab failing to set flag location
The request.country returns bytes not a string so decode.
2019-06-11 12:35:04 +01:00
Calum Lind
b8b044f451 [lint] Fix pre-commit config key name 2019-06-10 14:24:47 +01:00
Calum Lind
2d87cde887 Make a 2.0.2 release deluge-2.0.2 2019-06-08 21:34:27 +01:00
Calum Lind
212efc4f52 [Packaging] Move user out of systemd files and add to tarball
With the `deluge` user specified in the unit files it ties it to
that user and makes it unavailable for re-use by systemd user instance.

Remove the user and group from the unit files and put them in a separate
`user.conf` file that should be installed as an override file e.g. for
deluged.service this would be placed as follows:

    /etc/systemd/service/deluge.service.d/user.conf

Add the systemd files to the tarball for package maintainers.

Closes: #2034
2019-06-08 21:31:49 +01:00
Calum Lind
879a397215 [Packaging] Add updated launchd scripts
Copy from Trac UserGuide and updated with proper naming and deluge-web
version.

The bin location is default for brew with pip install.

Closes: #3073
2019-06-08 21:31:49 +01:00
Calum Lind
957cd5dd9c [Core] Fix SimpleNamespace on Python2 2019-06-08 21:31:49 +01:00
Calum Lind
25087d3f2d [Docs] Add release notes and update pages 2019-06-08 16:42:25 +01:00
Calum Lind
d24109f0a2 Update Changelog for 2.0.1 deluge-2.0.1 2019-06-07 20:27:02 +01:00
Calum Lind
647baebcf0 [Docs] Update release checklist 2019-06-07 14:47:49 +01:00
Calum Lind
98ce3cd385 [Packaging] Create tar.gz with sdist for PyPi
PyPi does not accept `tar.xz` source tarballs!
2019-06-07 14:47:02 +01:00
Calum Lind
0c87d9bd7d [Packaging] Fix get_version with no git command
An unhandled FileNotFoundError was encounted if git command was not available.
2019-06-07 14:45:49 +01:00
Calum Lind
aa35247e95 Back to dev 2019-06-06 17:27:49 +01:00
Calum Lind
0dc4e18ac4 Updates for 2.0.0 release deluge-2.0.0 2019-06-06 17:12:58 +01:00
Calum Lind
d4185505d1 [Docs] Cleanup changelog and docs 2019-06-06 17:12:58 +01:00
Calum Lind
04e58659fe Update translation files 2019-06-06 16:50:16 +01:00
Calum Lind
5e738cf73a Simplify the get_version method
Use post segment instead of dev for non-dev tags.
Default to 'deluge-' and '.dev0' to simplify getting version.
Refactor to use subprocess.check_output
Use deluge.common.get_version as fallback in docs conf.
2019-06-06 11:30:45 +01:00
Calum Lind
ce8595e8dd [Tests] Remove python2 from tox config 2019-06-06 11:30:45 +01:00
Calum Lind
be74d96c6a [Core] Copy lt alerts to avoid segfaults
Changes in libtorrent 1.1 mean that alerts are no longer allowed to be
accessed after the next call to pop_alerts.

> It is safe to call pop_alerts from multiple different threads, as
long as the alerts themselves are not accessed once another thread
calls pop_alerts. Doing this requires manual synchronization between
the popping threads.

The solution is to copy the alert attributes and pass that to the
handlers.

Refs: https://github.com/arvidn/libtorrent/issues/2779
      #3159
2019-06-05 15:10:35 +01:00
Calum Lind
4212bd6800 [Travis] Add unit test for libtorrent 1.2
Skip test_torrent_error_resume_original_state on libtorrent 1.2 as it
is failing for an unknown reason.

Refs: #3255
2019-06-05 15:09:40 +01:00
DjLegolas
d40d40af31 [Core] Update to support libtorrent 1.2
Some changes between lt 1.1 and 1.2 require updates to core code.
 - Switch from proxy_type to proxy_type_t
 - Replace hardcoded flag value with add_torrent_params_flags_t since
   1.2 uses different flag values.
 - add_torrent_params requires flags set instead of dict values.

Refs: #3255
2019-06-05 15:09:00 +01:00
Byeonghoon Yoo
cbf9ee8978 fix blurry icons in gnome
Fixed blurry icon by changing "StartupWMClass" value from "Deluge" to "deluge" in "deluge.desktop".
2019-06-04 17:39:06 +01:00
Calum Lind
7abeb4ee0f [packaging] sdist use xztar and exclude .mo files 2019-05-24 11:21:35 +01:00
Calum Lind
bd4a3cba38 [Docs] Update install details and add more pages 2019-05-23 15:41:58 +01:00
Calum Lind
3cfa39a2ad [macOS] Fix GTK windowing issues
On macOS the Quartz windowing is used instead of X11 so make ensure
that the X11 window calls are optional.

Also if gtkosx_application is not available then don't create osxapp.

It would be useful to find out how to pass window timestamps on Quartz.
2019-05-23 13:00:02 +01:00
Calum Lind
a3b6d8d8e5 [Appveyor] Switch to Python 3.6
- Change build from Python 2.7 to 3.6 64-bit.
 - Specify py36 for tox since using py3 will choose latest py3 e.g. 3.7!
 - Use python 3.6 libtorrent.pyd build
 - Use pre-installed OpenSSL 1.1 (matches libtorrent build)
 - Add python version output to tox.ini for debugging.
2019-05-23 00:15:49 +01:00
Calum Lind
7e3692bb5a [Docs] Fix missing path in RTD config 2019-05-22 18:01:05 +01:00
Calum Lind
aa3a9a15cc [Docs] Update readthedocs config
- Add the missing package install so pkg_resources can find version.
2019-05-22 17:48:33 +01:00
Calum Lind
0f92ea401f [Travis] Remove Python2 tests 2019-05-22 14:14:44 +01:00
Calum Lind
260d55aeae [Travis] Fix getting version from git tags
Travis clones the git repo with a shallow depth and the git describe
command cannot find the version tag. Setting depth to 1000 should be
enough but can be increased if required.

Refs:
  https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth
  https://stackoverflow.com/a/51727114/175584
2019-05-22 12:12:54 +01:00
Calum Lind
a9609a197d [Docs] Fix ReadTheDocs config path 2019-05-22 11:39:37 +01:00
Calum Lind
a8fac1381b [Packaging] Cleanup README for Pypi
- Set a minimal Python version 3.5 and remove universal wheels.
- Tidy up the README
- Add Project URL for issues and docs.
2019-05-22 11:15:32 +01:00
Calum Lind
65f6ede8b2 [Docs] Updates and fixes to build on Python 3
- Updates to the sphinx conf
  - Applied Mock fixes to build on Python 3.
  - Group patches at bottom of conf file.
  - Use just a major.minor for version.
  - Specify Sphinx 2.0 version requirement.
- Move requirements.txt to docs dir.
- Add readthedocs config
- Fix docstring code block rst formatting issue.
2019-05-21 15:23:45 +01:00
Serg
515dbcc5d9 Minor updates to log.py 2019-05-20 21:23:20 +01:00
Calum Lind
827987fe7d [GTK] Fix drag and drop files in files_tab
Encoutered an error reordering files by dragging in the files tab:
   TypeError: can't pickle TreePath objects

The issue was get_selected_row  now returns a list of TreePath objects which
cannot be pickled. Also the set_text method only accept unicode text to
pickled bytes cannot be used.

The fix is to convert the TreePaths to strings and use json to encode
the list of strings for set_text.
2019-05-20 21:14:42 +01:00
Calum Lind
1357ca7582 [i18n] Ignore non-translation dirs in get_languages
The `__pycache__` dir was showing up in list of available languages so
ensure only those directories with languages are returned.
2019-05-20 21:02:13 +01:00
Calum Lind
72d363968e [Logging] Fix line numbers missing on Python 3
The findCaller method returns a 4-element tuple on Python 3 whereas it
was a 3-element tuple on Python 2.
2019-05-20 16:49:49 +01:00
Calum Lind
c6b6902e9f [Core] Fix prefetch magnets missing trackers
When adding magnets that have been prefetched the tracker details were
lost. A result of returning only the lt.torrent_info.metadata which
does not contain full torrent details, such as trackers.

- Modified torrentmanager prefetch_metadata to return dict instead of
  base64 encoded bencoded metadata dict...
  - Used a namedtuple to ease identifying tuple contents.
  - Updated tests to reflect changes with mock trackers added to
    test_torrent.file.torrent.

- Refactor TorrentInfo to accept dict instead of bytes and add
  a class method to accept metadata dict with lists of trackers.
  - Rename class arg from metainfo to torrent_file, matching
    lt.torrent_info.
  - Rename metadata property to correct name; metainfo.
  - Simplify class variable naming with _filedata and _metainfo for
    torrent file contents encoded and decoded respectively.

- Update GTK Add torrent dialog to pass trackers to TorrentInfo.
2019-05-20 16:49:25 +01:00
Calum Lind
6a5bb44d5b [Core] Write torrent file with full magnet metainfo
The use of torrent_info.metadata misses saves trackers and other torrent
metainfo fields so use lt.create_torrent generate method to create this
data.
2019-05-18 16:15:27 +01:00
Calum Lind
cbcf8eb863 [GTK] Fix missing magnet trackers with Add dialog (non-prefetch)
When adding magnets (without prefetch) the trackers were missing.

The issue was that the magnet uri was being xml escaped twice so that
the ampersand was still escaped when passed to core and everything after
the magnet info_hash was ignored.

Also found unneeded call to core.add_torrent_files when only adding
magnets with core.add_torrent_magnet so check torrents_to_add before
calling.
2019-05-18 16:15:27 +01:00
Calum Lind
09cfd9b89e [bencode] Fix unhandled TypeError with string
Passing a non-bencoded dict to bdecode resulted in an unhandled
TypeError.

- Catch TypeError in decode_func.
- Add bdecode tests.
- Replace KeyError and IndexError with base LookupError.
2019-05-18 16:15:27 +01:00
Calum Lind
b961e11df6 [GTK] Fix handling failed magnet prefetching in Add dialog
If a torrent already exists when trying to prefetch magnet metadata the
exception is not handled and dialog does not update correctly.
2019-05-18 16:12:08 +01:00
Calum Lind
2ca683e8fe [Daemon] Fix showing translation warning messages
Disable the warn_msg in daemon_entry since the argparse option are all
marked for translation and warnings are being output. The original
intent of this warn_msg was to identify anything in core code that was
incorrectly marked for translation.
2019-05-17 10:32:07 +01:00
Calum Lind
fd20addead Raise Twisted minimum version to 17.1
The use of CertificateOptions with raiseMinimumTo requires this new
minimum version so update requirements and documents.
2019-05-17 10:08:48 +01:00
Calum Lind
535b13b5f1 [Plugins] Convert plugins to deluge_ module prefix convention
This commit reverts namespace for the plugins and uses a module prefix
"deluge_" in it's place. The distribution package name remains the same
for now but will also be considered to use a prefix to help find the
third-party plugins e.g. Deluge-{Plugin} and the pluginmanager will
strip the prefix for displaying.

The change is a result of problems trying to package Deluge with
pyinstaller and the pkg_resources namespaces is not compatible.
Testing alternatives to using the pkgutil or PEP420 (native) namespaces
did not yield any joy either as importing eggs with namespaces does not
work. [1]

At this point importable eggs are considered deprecated but there is no
viable alternative yet. [2]

[1] https://github.com/pypa/packaging-problems/issues/212
[2] https://github.com/pypa/packaging-problems/issues/244
2019-05-15 19:20:08 +01:00
Calum Lind
d6a0276a78 Update gitignore file
- pip install creates dist-info directories
- add __pycache__ for compelteness and other byte compiled file types.
2019-05-14 11:48:58 +01:00
Calum Lind
9c0325b129 [Plugins] Remove stray unneeded init files 2019-05-13 18:55:35 +01:00