> > > > filename = '/tmp/delete_me' > > > > > > This reminds me: we need a portable way to handle test-files :) > > Yeah, I noticed that this test failed on Windows -- fixed now. > > > The test_support module exports TESTFN; there's also tempfile.mktemp() > > which should generate temporary files on all platforms. > > Is that enough? > > Well, there is one more issue, which we can't fix terribly easy: test_fcntl > tries to flock() the file. flock() doesn't work on all filesystems (like > NFS) :P If we cared a lot, we could try several alternatives (current dir, > /tmp, /var/tmp) in the specific case of flock, but personally I don't want to > bother, and real sysadmins (who should care about the test failure) are more > likely to build Python on a local disk than in their NFS-mounted > homedirectory. At least that's how we do it :-) These days, I would think that it's a pretty sure bet that the system's tmp directory is not on NFS. Then we could just use tempfile.mktemp() in that module, right? Or does the /tmp filesystem on Linux (which AFAIK is a RAM disk implemented in virtual memory so it uses swap space when it runs out of RAM) not support locking? I don't particularly care about fixing this -- I haven't seen bug reports about this. --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4