Package Details: python-torf 4.2.6-1

Git Clone URL: https://aur.archlinux.org/python-torf.git (read-only, click to copy)
Package Base: python-torf
Description: Python module to create, parse and edit torrent files and magnet links
Upstream URL: https://github.com/rndusr/torf/
Licenses: GPL-3.0-or-later
Submitter: dbermond
Maintainer: dbermond
Last Packager: dbermond
Votes: 2
Popularity: 0.60
First Submitted: 2019-11-30 17:25 (UTC)
Last Updated: 2024-04-27 13:39 (UTC)

Latest Comments

GabeDM commented on 2024-12-03 01:42 (UTC)

I'm getting a bunch of errors when installing this, seems like its trying to run tests, and the tests are failing, all for similar reasons:

[...]
ERROR tests/test_magnet.py::test_getting_info__xs_times_out - torf._errors.PieceSizeError: Piece size must be divisible by 16 KiB: 2048
ERROR tests/test_magnet.py::test_getting_info_from_ws - torf._errors.PieceSizeError: Piece size must be divisible by 16 KiB: 4096
ERROR tests/test_magnet.py::test_getting_info_from_tr - torf._errors.PieceSizeError: Piece size must be divisible by 16 KiB: 4096
=============================================== 36 failed, 1687 passed, 10 errors in 5.10s ================================================
==> ERROR: A failure occurred in check().
    Aborting...
error: failed to build 'python-torf-4.2.6-1':
error: packages failed to build: python-torf-4.2.6-1

Commenting out the test line on check() seems to "fix" it, but I'm not sure why its failing (or if its okay to fail)

check() {
    cd "torf-${pkgver}"
    # pytest --file-counts='1' --piece-counts='1'
}

dbermond commented on 2021-02-09 17:51 (UTC)

@soundtoxin Allright. The problem is that you didn't rebuild the python packages that you installed from AUR when repository python got a new point release (3.8.x->3.9.0). Every time that repository python gets a new point release you need to rebuild all your AUR python-based packages, otherwise they will be all broken because they would still be pointing to the previous python version. It's user responsibility to manage the needed rebuilds.

soundtoxin commented on 2021-02-09 16:32 (UTC)

@dbermond Yep, all good now! Interesting that everything with a problem was something you're maintaining. I wonder why I haven't had similar issues with other stuff before. Anyway, thanks for the help.

dbermond commented on 2021-02-09 16:06 (UTC)

@soundtoxi First of all, using makepkg is not "my rules", but it's what you should use to install AUR packages on Arch Linux. If you are reporting problems with an AUR helper, you are for yourself, since you're using an unsupported tool. Arch Linux does not support AUR helpers, so there is no "my rules" about this. See the big red warning about this on the Wiki:

https://wiki.archlinux.org/index.php/AUR_helpers

If you solved the error "No module named 'flatbencode'" by rebuilding python-flatbencode, probably you missed the python 3.9 rebuild on it.

Your new error log indicates that you have a problem with python-pytest-httpserver. Supposing that you probably missed the python 3.9 rebuild on python-flatbencode, likewise you probably missed the python 3.9 rebuild for python-pytest-httpserver too. Rebuild it.

soundtoxin commented on 2021-02-09 09:28 (UTC)

@dbermond

AUR helpers are not supported, use makepkg

Okay, I will try to play by your rules.

I had flatbencode installed already (FYI this was working before, something broke in an update or after a reboot at some point). I re-installed it via makepkg. I get the same error now installing python-torf with makepkg

ImportError while loading conftest '/home/soundtoxin/downloads/python-torf/src/torf-3.1.3/tests/conftest.py'.
tests/__init__.py:7: in <module>
    import torf
torf/__init__.py:25: in <module>
    from ._torrent import Torrent
torf/_torrent.py:28: in <module>
    import flatbencode as bencode
E   ModuleNotFoundError: No module named 'flatbencode'
==> ERROR: A failure occurred in check().
    Aborting...

I removed python-torf and python-flatbencode after this and started over again with makepkg in case there were issues from lingering deps installed by an AUR helper.

New log is very long, you can find it here:

http://ix.io/2OOS

P.S. the version (of torf-cli) that can be installed with pipx works, but I'd ideally find the problem with the AUR version and use that instead.

dbermond commented on 2021-02-07 14:50 (UTC)

@soundtoxin Package is building fine.

AUR helpers are not supported, use makepkg.

By your log, it looks like that you don't have python-flatbencode installed. Install it firstly.

soundtoxin commented on 2021-02-07 11:42 (UTC)

Got this error trying to update python-torf.

==> Starting check()...                          
ImportError while loading conftest '/tmp/trizen-soundtoxin/python-torf/src/torf-3.1.3/tests/conftest.py'.
tests/__init__.py:7: in <module>
    import torf                                  
torf/__init__.py:25: in <module>
    from ._torrent import Torrent
torf/_torrent.py:28: in <module>
    import flatbencode as bencode
E   ModuleNotFoundError: No module named 'flatbencode'                                             
==> ERROR: A failure occurred in check().
    Aborting...                                  
:: Unable to build python-torf - makepkg exited with code: 4