GitHub pytest runner stalling with the following error:
[Errno 2] No such file or directory: '/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages/deluge/plugins'
This is related to the editable install of Deluge via pip
pip install -e .
and the custom resource_filename in deluge.common is the source of the
problem where a DistInfoDistribution returns a different path to
EggInfoDistribution.
Working egg-info install
>>> pkg_resources.get_distribution('Deluge')
deluge 2.1.1.dev8 (/home/user/deluge)
>>> type(pkg_resources.get_distribution('Deluge'))
<class 'pkg_resources.EggInfoDistribution'>
>>> pkg_resources.resource_filename('deluge', 'plugins')
'/home/user/deluge/deluge/plugins'
This can identified by the `deluge.egg-info` directory in source
directory.
Broken dist-info install
>>> pkg_resources.get_distribution('Deluge')
deluge 2.1.1.dev8 (/opt/hostedtoolcache/Python/3.10.8/x64/lib/python3.10/site-packages)
>>> type(pkg_resources.get_distribution('Deluge'))
<class 'pkg_resources.DistInfoDistribution'>
>>> pkg_resources.resource_filename('deluge', 'plugins')
'/home/user/deluge/deluge/plugins'
This can be worked around by setting an env var that enables legacy mode
but long-term need to replace the custom resource_filename and replace
usage of pkg_resources.
https://setuptools.pypa.io/en/latest/userguide/development_mode.html#legacy-behaviorhttps://setuptools.pypa.io/en/latest/pkg_resources.html
A recent dependency change caused the tests running on GitHub Actions
under Python 3.10.5 on Windows to fail when starting pytest run:
...
INTERNALERROR> File "<frozen importlib._bootstrap>", line 123, in acquire
INTERNALERROR> KeyError: xxxx
The cause seems to have been a newer version of chardet package released
recently.
* Fixed by pinning chardet to v4
* Also pin Windows version to 2019 to match packaging workflow
See-also: https://github.com/deluge-torrent/deluge/actions/runs/2578427588
Issue: https://github.com/chardet/chardet/issues/265
Up until now, the linux installation source of libtorrent was launchpad,
because there was no other source, and we wanted a debug version of lt.
With pypi wheel versions now available use lt in the requirements.txt
file.
Closes: https://github.com/deluge-torrent/deluge/pull/364
We cannot add python 3.6 because there is no precompiled version of it to used.
Therefor, will be using 3.7 as the minimum version in CI.
In addition, dropped version limits from pytest.
With this change, we drop a core dependency from the UI. This will help group together
all related functionality in one place, i.e. all security related functions.
Also updated testssl.sh version to 3.0.6 (SECURITY_TEST)
Closes: deluge-torrent/deluge#288
* Added required dependency setuptools to install_requires
* Remove optional dependency ipaddress from install_requires
* Created extras_require in setup.py. The optional dependencies should
not be included in install_requires so that users can either install
forked dependencies or remove problematic ones. Updated documentation to
detail how to install these optional dependencies.
* Fixed README badge
Refs:
* https://dev.deluge-torrent.org/ticket/3470
* https://dev.deluge-torrent.org/ticket/3282
* https://dev.deluge-torrent.org/ticket/3353
Due to new limitations for open-source projects on Travis we are
switching to GitHub actions.
* Notes about system site-packages
We had many problems with accessing system python packages on Travis for
libtorrent and GTK and the problems are harder on Github since there is
no more access. For now copying the python libtorrent binary into the
deluge source is the workaround. There is a pip package that could be
used in future.
Fixed failing tests with libtorrent 1.2 which required a non-zero length
file in torrent and workarounds for async alert delay.