[issue14848] Use shutil.move instead of os.rename in packaging

2012-06-13 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: glad to help -- ___ Python tracker <http://bugs.python.org/issue14848> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue14848] Use shutil.move instead of os.rename in packaging

2012-06-13 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Sorry, no traceback by default, had to augment with "raise" :) Now output looks like this: nekto0n@ya-darkstar /var/tmp/mypackage $ pysetup remove pygraphviz u'workflow': u'1.01' is not a valid version (field 'Version'

[issue14848] os.rename should not be used

2012-05-18 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: pysetup install. strace of removal looks like this: stat("/home/nekto0n/workspace/pillar/penv/lib/python2.7/site-packages/ygroup/__init__.py", {st_mode=S_IFREG|0664, st_size=0, ...}) = 0 rename("/home/nekto0n/workspace/pillar/penv/lib/python2.

[issue14848] os.rename should not be used

2012-05-18 Thread Vetoshkin Nikita
New submission from Vetoshkin Nikita : When I attempt to remove package with pysetup remove 'package-name' on Fedora 17 - it fails with: 'my-package' cannot be removed Error: [Errno 18] Invalid cross-device link strace'ing showed that there was an attempt to call rena

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-11-06 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: > The same value as for other non-blocking sockets, IMO. There are three possible values I think: 1. parent's current sock_timeout 2. global default socket timeout 3. 0 Can you please tell which one? I assume it should be

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-11-06 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: up? -- ___ Python tracker <http://bugs.python.org/issue10115> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-10-27 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Started implementing accept4() socket method and stuck on socket object's timeout attribute. What value should we assign to sock->sock_timeout if SOCK_NONBLOCK was specified in accept4() call? And in socket.py should we check as in original ac

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2011-10-27 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Sorry, wrong ticket. Right one is 10115 -- ___ Python tracker <http://bugs.python.org/issue7523> ___ ___ Python-bugs-list m

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2011-10-27 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Started implementing accept4() socket method and stuck on socket object's timeout attribute. What value should we assign to sock->sock_timeout if SOCK_NONBLOCK was specified in accept4() call? And in socket.py should we check as in original ac

[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2011-10-26 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: added some tests (not sure if in appropriate place). -- Added file: http://bugs.python.org/file23529/issue_8036_1.patch ___ Python tracker <http://bugs.python.org/issue8

[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2011-10-25 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: against py3k branch? -- ___ Python tracker <http://bugs.python.org/issue8036> ___ ___ Python-bugs-list mailing list Unsub

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-06-07 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Yes, I can. We decided to expose accept4() as another socket method, not accept() replacement? -- ___ Python tracker <http://bugs.python.org/issue10

[issue7978] SocketServer doesn't handle syscall interruption

2011-05-31 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: I don't think we should block signals - we can sleep on select for about forever. -- ___ Python tracker <http://bugs.python.org/i

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2011-03-17 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: up! -- ___ Python tracker <http://bugs.python.org/issue1195> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5421] Irritating error message by socket's sendto method

2011-03-17 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: ping? -- ___ Python tracker <http://bugs.python.org/issue5421> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8036] Interpreter crashes on invalid arg to spawnl on Windows

2011-03-11 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Attached first attempt to close this issue. Are there enough checks? It passes: os.spawnl(os.P_WAIT, '') os.spawnl(os.P_WAIT, 'path') os.spawnl(os.P_WAIT, 'path', '') -- keywords: +patch nosy: +nvetoshkin Adde

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2011-03-11 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: My benchmarks show that xlistdir() gives the only memory usage advantage on large directories. No speed gain so far - maybe my patch is wrong. -- ___ Python tracker <http://bugs.python.org/issue11

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2011-03-10 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: >BTW, can you publish your xlistdir implementation somewhere? http://pastebin.com/Qnni5HBa Tests show 10 times smaller memory footprint during directory listing - 25Mb against 286Mb on directory with 800K entr

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2011-03-09 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: >We could, but someone must: >1) provide a patch While working on a straightforward patch for linux, I had to make a lot of copy-paste job. posixmodule.c is quite a mess already :( >2) demonstrate a significant improvement in some real-world

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2011-03-08 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Can't we simply add os.xlistdir() leaving listdir() as is? -- ___ Python tracker <http://bugs.python.org/issue11406> ___ ___

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2011-03-07 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Glibc's readdir() and readdir_r() already do caching, so getdents() syscall is called only once on my '/etc' directory. Should we include another caching level in xlistdir() function? On the other hand, we don't know anything about cac

[issue11406] There is no os.listdir() equivalent returning generator instead of list

2011-03-06 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Generator listdir() could be useful if I have a directory with several millions of files and I what to process just a hundred. -- nosy: +nvetoshkin ___ Python tracker <http://bugs.python.org/issue11

[issue11266] asyncore does not handle EINTR in recv, send, connect, accept,

2011-03-04 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Here's a similar bug: http://bugs.python.org/issue7978. >EINTR may occur if SA_RESTART is not specified in sigaction. Some syscalls (like select) will generate EINTR despite SA_RESTART. man 7 signal -- nosy: +nv

[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: >It's also possible using existing wrapped os system calls. That's right, on linux we can use ioctls but windows would require win api calls like this one: http://stackoverflow.com/questions/166506/finding-local-ip-addresses-in-python/

[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Maybe I understood and ctypes ImportError simply must be handled and fallbacked to something else. But there are only 3 ways of getting MAC address: 1. using popen 2. using ctypes and native calls 3. using C API and performing native calls in extension And

[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: >uuid should work even when ctypes is not available A bit of offtopic: why can't we assume that ctypes is available? -- ___ Python tracker <http://bugs.python.org

[issue11063] uuid.py module import has heavy side effects

2011-02-05 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: I think launching external tools like ifconfig and ipconfig can be avoided pretty easily. There are many recipes around the net how to use native API's. About ctypes' horrible logic during find_library call - don't know yet. -- no

[issue1633941] for line in sys.stdin: doesn't notice EOF the first time

2010-12-16 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: I guess http://bugs.python.org/issue1195 might be related -- nosy: +nvetoshkin ___ Python tracker <http://bugs.python.org/issue1633

[issue5421] Irritating error message by socket's sendto method

2010-11-18 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Here's a patch, which performs argument checking in a way to be able to provide better error message like that: >>> my_socket.sendto("No Umlaut", ("localhost", 514)) Traceback (most recent call last): File "", l

[issue1195] Problems on Linux with Ctrl-D and Ctrl-C during raw_input

2010-11-09 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Confirming that issue is present in latest svn checkout and Ralf's fix helps. -- nosy: +nvetoshkin ___ Python tracker <http://bugs.python.org/i

[issue7978] SocketServer doesn't handle syscall interruption

2010-11-09 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Any news on this? Could we possibly apply patch as is? If I'm not mistaken timeout issue is the only one left unresolved. About timeout. The most elegant way, would be to use select's syscall timeout parameter, but man 2 select says: "On

[issue1467929] %-formatting and dicts

2010-10-20 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Updated patch: some tests added. -- Added file: http://bugs.python.org/file19307/issue1467929_py3k.diff ___ Python tracker <http://bugs.python.org/issue1467

[issue1467929] %-formatting and dicts

2010-10-20 Thread Vetoshkin Nikita
Changes by Vetoshkin Nikita : Removed file: http://bugs.python.org/file19271/issue1467929_py3k.diff ___ Python tracker <http://bugs.python.org/issue1467929> ___ ___ Pytho

[issue1467929] %-formatting and dicts

2010-10-18 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Updated patch to capture another patological case: '%(a)s %' % {'a':'xyz'} - incomplete formatter at the end of the line -- Added file: http://bugs.python.org/file19271/issue1467929_py3k.diff

[issue1467929] %-formatting and dicts

2010-10-18 Thread Vetoshkin Nikita
Changes by Vetoshkin Nikita : Removed file: http://bugs.python.org/file19270/issue1467929_py3k.diff ___ Python tracker <http://bugs.python.org/issue1467929> ___ ___ Pytho

[issue9344] please add posix.getgrouplist()

2010-10-18 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: @Alexander, it was just a note, that implementation in posixmodule.c won't be the same across all flavours of Unix :) -- ___ Python tracker <http://bugs.python.org/i

[issue1467929] %-formatting and dicts

2010-10-18 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Updated patch against py3k. Fixing last reported issue with '%(a)s %%' % {'a':'xyz'} -- nosy: +nvetoshkin Added file: http://bugs.python.org/file19270/issue1467929_py3k.diff ___

[issue10115] accept4 can fail with errno 90

2010-10-17 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: >What is it meant for? And why does it come right after a "return" statement? @Antoine, if fd was supplied and it was correct (not returned with -1), let's drop flags that can't be inherited. It's a mistake, at that level we

[issue10115] accept4 can fail with errno 90

2010-10-16 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Made a proof of concept patch (no doc updates yet). Decided to implement separate accept4() method, cause we have already spent enough time dealing with it and rollback would be pity. -- keywords: +patch Added file: http://bugs.python.org/file19253

[issue9344] please add posix.getgrouplist()

2010-10-15 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Did a bit of digging and found that getgrouplist signature differs on (at least) Linux and Mac OS: - http://www.kernel.org/doc/man-pages/online/pages/man3/getgrouplist.3.html -http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Weekend is coming, so I can lend a hand in implementing whatever you choose. Summary: * remove accept4() as default and expose it as separate method * add runtime fallback if accept4() returns ENOSYS

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: What about exposing accept4() to python level? -- ___ Python tracker <http://bugs.python.org/issue10115> ___ ___ Python-bug

[issue10115] accept4 can fail with errno 90

2010-10-15 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Falling back on result 90 is not that difficult, I think I can submit a patch today. What should be checked ENOSYS or 90? -- ___ Python tracker <http://bugs.python.org/issue10

[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Agree. Already written code won't suffer, new code should be ready to use new linux kernel. -- ___ Python tracker <http://bugs.python.org/is

[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Here's the patch from debian's issue http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=529920 Patch URL: https://patches.ubuntu.com/by-release/extracted/ubuntu/n/neon27/0.28.4-2/01_runtime_detect_sock_cloe

[issue10104] test_socket failures on Debian unstable

2010-10-14 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: What about kernel version? As far as I know 2.6.27 is minimum requirement. -- ___ Python tracker <http://bugs.python.org/issue10

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-13 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: @Antoine already found that myself, patched and tested :) thanks! -- Added file: http://bugs.python.org/file19226/issue7523_py3k_accept4_2.diff ___ Python tracker <http://bugs.python.org/issue7

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-13 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Here's what strace on FAIL shows (print "in alarm_handler" added) alarm(2)= 0 poll([{fd=3, events=POLLIN}], 1, 5000) = ? ERESTART_RESTARTBLOCK (To be restarted) --- SIGALRM (Alarm clock) @ 0 (0) --- rt_sigre

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-13 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Another patch with: - testInitBlocking method - no c++ style comments - a newly generated configure script (almost 1.5k lines diff) - proper accept4 availability check With this patch I've got Traceback (most recent call last): File "/

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-12 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Thanks! I can see the problem now, but I think checking should be done like this: >>> fcntl.fcntl(c, fcntl.F_GETFD) & fcntl.FD_CLOEXEC 0 >>> fcntl.fcntl(s, fcntl.F_GETFD) & fcntl.FD_CLOEXEC 1 and with accept4() call I've

[issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module

2010-10-12 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Made an attempt to port lekma's patch to py3k-trunk. No (logical) changes needed. Don't know about accept4() issue. As I saw in Qt sources, they ifdef'ed CLOEXEC by default on file descriptors. Don't think it's acceptable :) in

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-08 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: I vote for making a global wrapper. As neologix pointed - many other modules can be (or are) affected. Futher found bugs could be fixed using that global wrapper. -- ___ Python tracker <http://bugs.python.

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-07 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: According to "man 7 signal" select must be explicitely restarted, regardless of the SA_RESTART flag. -- ___ Python tracker <http://bugs.python.

[issue7978] SocketServer doesn't handle syscall interruption

2010-04-04 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: > What kind of signals can be received in real-life? We use SIGUSR1 to reopen log files after rotation. sighandler works just fine, but after that Paste crashes. I suppose that implementing silent syscall restart at select.select() level is a bad i

[issue5166] ElementTree and minidom don't prevent creation of not well-formed XML

2010-03-16 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: What about this example? >>> from xml.dom import minidom >>> doc = minidom.Document() >>> el = doc.createElement("Test") >>> el.setAttribute("with space", "False") >>> doc.appendChi

[issue7978] SocketServer doesn't handle syscall interruption

2010-03-08 Thread Vetoshkin Nikita
Vetoshkin Nikita added the comment: Wrapping select in (taken from twisted sources) can help: def untilConcludes(f, *a, **kw): while True: try: return f(*a, **kw) except (IOError, OSError), e: if e.args[0] == errno.EINTR: continue