Package Details: python2-scandir 1.10.0-8

Git Clone URL: https://aur.archlinux.org/python2-scandir.git (read-only, click to copy)
Package Base: python2-scandir
Description: Better directory iterator and faster os.walk() alternative
Upstream URL: https://github.com/benhoyt/scandir
Licenses: BSD
Submitter: hexd
Maintainer: hexd
Last Packager: hexd
Votes: 3
Popularity: 0.052894
First Submitted: 2022-06-12 05:39 (UTC)
Last Updated: 2022-06-18 04:43 (UTC)

Dependencies (2)

Required by (1)

Sources (1)

Latest Comments

1 2 3 Next › Last »

hexd commented on 2022-06-24 15:15 (UTC)

@funkmuscle, when it failed without :$PWD, have you used makepkg directly or an AUR helper? What's your distro (Arch/Manjaro/Endeavour)? What's the error message?

funkmuscle commented on 2022-06-23 20:40 (UTC)

@hexd, I had to add :$PWD back in for it to work.

lucian commented on 2022-06-18 20:27 (UTC)

just tested and no error message anymore.

thx - super support.

hexd commented on 2022-06-18 04:49 (UTC)

@lucian, I found a way to reproduce the issue you described. Namely, calling this from the src/scandir-1.10.0/ directory (the one created by makepkg):

LC_ALL=C.UTF-8 PYTHONPATH="$PWD/build/lib.linux-x86_64-2.7:$PWD" python2 -m unittest discover -v

Removing the :$PWD solved the issue for me. It seems the reason has to do with mixing the built shared object _scandir.so with two distinct Python source versions (the directory with the shared object and the current working directory). If for some reason the new approach of v1.10.0-8 doesn't work for you, please tell what's the content of src/scandir-1.10.0/ and src/scandir-1.10.0/build/lib.linux-x86_64-2.7/ after the error.

lucian commented on 2022-06-17 08:53 (UTC)

on manjaro, tried with yay and manual. same result.

currently 1.10.0-4 is installed, so its not a new install.

using os.symlink("src","lnsrc") in python2 result is:

File: lnsrc -> src Size: 3 Blocks: 0 IO Block: 4096 symbolic link Device: 259,2 Inode: 19661835 Links: 1 Access: (0777/lrwxrwxrwx) Uid: ( 1000/ user) Gid: ( 1000/ user)

hexd commented on 2022-06-17 07:40 (UTC)

@lucian, it seems that os.symlink isn't creating the symbolic link in your system, or it's creating something not as a directory.

Are you running makepkg or an AUR helper? What's the filesystem type? Can you try os.symlink(target, link) in Python 2 for some actual target and link that are in the same filesystem, and send the result of calling stat link in shell (replacing "link" by the actual link name) afterwards?

lucian commented on 2022-06-17 06:49 (UTC)

deleted - didn't change the outcome. all other python packages are updated.

hexd commented on 2022-06-16 20:46 (UTC)

@MarsSeed thanks for this research on the UTF-8 issue! I've switched it to C.UTF-8.

@lucian, the error has to do with mixed context between the two TestWalkSymlink tests, it seems the temp directory was not emptied from a previous run of the tests (or something similar). Can you please clean the directory and try again?

lucian commented on 2022-06-16 17:06 (UTC)

I have got a different error, cant trace back this message via goodle:

test_traversal (test.test_walk.TestWalk) ... ok test_symlink_to_directory (test.test_walk.TestWalkSymlink) ... FAIL test_symlink_to_file (test.test_walk.TestWalkSymlink) ... ok

====================================================================== FAIL: test_symlink_to_directory (test.test_walk.TestWalkSymlink)


Traceback (most recent call last): File "test/test_walk.py", line 191, in test_symlink_to_directory self.assertEqual(dirs, ['dir', 'link_to_dir']) AssertionError: Lists differ: ['dir'] != ['dir', 'link_to_dir']

Second list contains 1 additional elements. First extra element 1: 'link_to_dir'

  • ['dir']
  • ['dir', 'link_to_dir']

Ran 34 tests in 0.003s

FAILED (failures=1, skipped=3) ==> ERROR: A failure occurred in check(). Aborting...

MarsSeed commented on 2022-06-16 11:59 (UTC)

Just re-read the comments carefully. So thanks also goes out to @Daerun and @robertc for their valuable feedback!