[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-16 Thread Neil Schemenauer
Neil Schemenauer added the comment: Okay, feel free to close this bug. I had heard that HFS+ counts files but I don't have a way to verify that. -- ___ Python tracker

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, what I read, HFS+ counts files. st_ntlink is a number of files and directories + 2 (perhaps for fake "." and ".."). This value never less than 2 + number_of_subdirectories, hence the code should work. Just an optimization has no any effect (as well as

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: AFAIK the filesystem either counts directory references, in this case st_nlink >= 2, and st_nlink == 2 only for empty directory. The exception is a root directory, but it is not relevant. Or it doesn't count directory references, in this case st_nlink == 1.

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: st_nlink is not related to the number of messages in a folder. It is a number of hard links. If the filesystem supports hard links counting for directories, every directory (except /) has at least two links: one from its parent directory, and one from

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-13 Thread Neil Schemenauer
Neil Schemenauer added the comment: So what happens for the filesystems that doesn't count '.' and '..'? It looks to me like if there are exactly two messages in a folder then the revised code will return [] (i.e. it will think the folder is empty). Probably we should revise the unit test

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-12 Thread Neil Schemenauer
Neil Schemenauer added the comment: I don't see how that patch can be correct. The logic is now if the directory has two links inside it then skip it. The filesystems that don't count '.' and '..' will have zero links when empty and will have two links when two real files exist in them. I

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-11 Thread R. David Murray
R. David Murray added the comment: Sure, why not. Having buildbots be green is good, and I doubt anyone is using mhlib any more even in python2. And if they are the chances this will break something seems extremely small. -- nosy: +r.david.murray

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The test now is passed. -- resolution: wont fix -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 37431d9abbcd by Serhiy Storchaka in branch '2.7': Issue #7759: Fixed the mhlib module on filesystems that doesn't support https://hg.python.org/cpython/rev/37431d9abbcd -- nosy: +python-dev ___ Python

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is even simpler and more reliable patch. It works even if the subfolder is a symlink to the directory on the filesystem that doesn't support links counting for directories. -- Added file: http://bugs.python.org/file41011/mhlib_nlinks_3.patch

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2015-11-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The new buildbot edelsohn-sles-z is red from its setting at 19 Aug 2015. test_mhlib is the only failed test. http://buildbot.python.org/all/builders/s390x%20SLES%202.7/builds/114/steps/test/logs/stdio

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-10-18 Thread Neil Schemenauer
Neil Schemenauer nas-pyt...@arctrix.com added the comment: Closing this bug. I don't think it makes sense to change the mhlib module in bugfix release. My patch is fairly simple but not simple enough to make me feel comfortable. -- resolution: - wont fix status: open - closed

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-07-28 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: Since mhlib has gone from py3k is there any interest in applying this to 2.6 or 2.7, given that there's been no response to msg98232? -- components: +Library (Lib) nosy: +BreamoreBoy ___

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Neil Schemenauer
Neil Schemenauer nas-pyt...@arctrix.com added the comment: On Sun, Jan 24, 2010 at 01:25:18AM +, Antoine Pitrou wrote: That wasn't really my question. What I ask is: since mhlib is deprecated, why do we need to fix it while people are encouraged to use mailbox instead? Sorry, I don't

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Sorry, I don't understand what you are proposing. Do you mean we should just let the test fail for people who develop on HFS+ and Btrfs filesystems? That seems not so good. Hmm, you are right. From a quick glance, the patch looks ok. I assume

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Chris Withers
Changes by Chris Withers ch...@simplistix.co.uk: -- nosy: -cjw296 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7759 ___ ___ Python-bugs-list

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Chris Withers
Chris Withers ch...@simplistix.co.uk added the comment: Please can you write a test for your patch? -- nosy: +cjw296 stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7759

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The documentation mentions that mhlib is deprecated and mailbox should be used instead. Is there any point in trying to fix it? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: test needed - patch review versions: +Python 2.6 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7759 ___

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +akuchling ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7759 ___ ___ Python-bugs-list mailing

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Neil Schemenauer
Neil Schemenauer nas-pyt...@arctrix.com added the comment: On Sat, Jan 23, 2010 at 06:09:33PM +, Antoine Pitrou wrote: The documentation mentions that mhlib is deprecated and mailbox should be used instead. Is there any point in trying to fix it? It looks like Btrfs will eventually

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The documentation mentions that mhlib is deprecated and mailbox should be used instead. Is there any point in trying to fix it? It looks like Btrfs will eventually conform to traditional st_nlink behavior. However, that still leaves HFS+.

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-22 Thread Neil Schemenauer
New submission from Neil Schemenauer nas-pyt...@arctrix.com: Btrfs does not maintain a link count for directories (MacOS does the same I think). That confuses mhlib.py because it uses os.stat().st_nlinks as an optimization. The attached patch removes the optimization and make test_mhlib pass