[issue12786] subprocess wait() hangs when stdin is closed

2011-08-25 Thread Ross Lagerwall
Ross Lagerwall added the comment: Patch looks good after Victor's comment. -- ___ Python tracker <http://bugs.python.org/issue12786> ___ ___ Python-bugs-l

[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD

2011-08-29 Thread Ross Lagerwall
Ross Lagerwall added the comment: Does it always segfault? Try: ./python -c 'import os; print(os.fdlistdir(os.open("/tmp", os.O_RDONLY)))' with various values for /tmp. >From what I can see, the code for fdlistdir is basically the same as >os.listdir(). If possible

[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD

2011-08-29 Thread Ross Lagerwall
Ross Lagerwall added the comment: > It looks like a kernel bug !? That's what I thought given that it appears to be working on all the other platforms. -- ___ Python tracker <http://bugs.python.org

[issue12852] test_posix.test_fdlistdir() segfault on OpenBSD

2011-08-29 Thread Ross Lagerwall
Ross Lagerwall added the comment: I'm not sure what the status of Python and OpenBSD support is but I just tried the latest stable version of OpenBSD (4.9) in VirtualBox and it won't compile fully. It segfaults while trying to run setup.py (I think). I see you're running OpenB

[issue12801] C realpath not used by os.path.realpath

2011-08-29 Thread Ross Lagerwall
Ross Lagerwall added the comment: > I've been quite disappointed by POSIX lately... POSIX the standard, or the implementers?? -- ___ Python tracker <http://bugs.python.org

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-08-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: The second patch looks good. Tests? I think it would be better to kill the process than to let it carry on. But, it *probably* shouldn't be applied to 2.7 & 3.2 given that it is a behaviour change. -- _

[issue12494] subprocess: check_output() doesn't close pipes on error

2011-09-01 Thread Ross Lagerwall
Ross Lagerwall added the comment: > I consider that this issue is a bug, so it should be fixed in 2.7 and > 3.2. I agree that *killing* the process is a behaviour change, but we > can just close pipes on error for 2.7 and 3.2. Yeah, that se

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: Also see fdopendir(3) which allows you to pass an open file descriptor to get a C dirent struct. This is implemented in the os module too but instead of returning a struct, it returns a list. -- ___ Python

[issue12898] add opendir() for POSIX platforms

2011-09-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: opendir opens a C dirent structure with an underlying file descriptor. However, to open a directory file descriptor, simple use: os.open("/tmp", os.O_RDONLY) This can then be used as the fd to the functions which require a directory fd like

[issue12899] Change os.utimensat() and os.futimens() to use float for atime & mtime

2011-09-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: See #11457 for a long discussion about the API and whether to use decimal or not to get the full precision. -- nosy: +rosslagerwall ___ Python tracker <http://bugs.python.org/issue12

[issue10882] Add os.sendfile()

2011-02-22 Thread Ross Lagerwall
Ross Lagerwall added the comment: Yes I agree it can go in now. Unless someone wants to do some tests on more OS's like FreeBSD 7.2, Solaris, etc. (I've only checked on Linux 2.6, FreeBSD 8.1, OpenIndiana and OS X 10.5). -- ___ Pyth

[issue10866] Add sethostname()

2011-02-26 Thread Ross Lagerwall
Ross Lagerwall added the comment: Here is a simplified version. -- Added file: http://bugs.python.org/file20904/sethostname_v2.patch ___ Python tracker <http://bugs.python.org/issue10

[issue10866] Add sethostname()

2011-02-26 Thread Ross Lagerwall
Ross Lagerwall added the comment: The patch looks good. Just to be clear, on my system running "autoreconf" adds the correct stuff to pyconfig.h.in Isn't it best to leave it up to the committer to generate "configure" and "pyconfig.h.in", especially si

[issue10866] Add sethostname()

2011-02-26 Thread Ross Lagerwall
Ross Lagerwall added the comment: > Ah, strange. I used "autoconf" and it didn't... >From the man page of autoreconf: Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' (formerly `gettextize'), and `libtoolize'

[issue11372] Remove xrange from argparse docs

2011-03-02 Thread Ross Lagerwall
New submission from Ross Lagerwall : As the title says, this patch replaces xrange with range for the 3.3 docs. -- assignee: docs@python components: Documentation files: doc.patch keywords: patch messages: 129876 nosy: docs@python, rosslagerwall priority: normal severity: normal status

[issue11404] support /dev/null for subprocess.call() and friends

2011-03-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: I think this is a duplicate of issue5870. -- nosy: +rosslagerwall ___ Python tracker <http://bugs.python.org/issue11

[issue11454] urllib.request import time

2011-03-09 Thread Ross Lagerwall
New submission from Ross Lagerwall : While importing most modules has little effect on the start up time, importing urllib.request seems to take a considerable time. E.g.: without importing urllib.request: real0m0.072s user0m0.070s sys 0m0.000s with importing urllib.request: real

[issue11454] urllib.request import time

2011-03-09 Thread Ross Lagerwall
Ross Lagerwall added the comment: Ubuntu 10.10. I haven't investigated whether it is actually urllib.request that is causing the long import time or a module that it is dependent on. -- ___ Python tracker <http://bugs.python.org/is

[issue11459] Python select.select does not correctly report read readyness

2011-03-10 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker <http://bugs.python.org/issue11459> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue11454] urllib.request import time

2011-03-10 Thread Ross Lagerwall
Ross Lagerwall added the comment: OK, running this: import base64 import bisect import hashlib import io import os import posixpath import random import re import socket import sys import time import collections import io import os import socket import collections import warnings import

[issue11454] email.message import time

2011-03-11 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- title: urllib.request import time -> email.message import time ___ Python tracker <http://bugs.python.org/issue11454> ___ ___ Py

[issue10885] multiprocessing docs

2011-03-14 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- assignee: docs@python -> rosslagerwall resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3 ___ Python tracker <http://bugs.python

[issue11459] Python select.select does not correctly report read readyness

2011-03-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: The Charles' patch fixes the problem but breaks [test_os test_poll test_popen test_select test_uuid] when running make test. Those two lines were introduced by Guido in [1f7891d84d93] but that was back in 2007 when subprocess used os.fdopen and the n

[issue10812] Add some posix functions

2011-03-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: PyParse_off_t was already added when sendfile() was added as was the iovec_setup stuff. I'll upload a patch soon which updates it to take this and the other comments into account. -- ___ Python tracker

[issue11459] Python select.select does not correctly report read readyness

2011-03-16 Thread Ross Lagerwall
Ross Lagerwall added the comment: > to get that behavior, change the =1 default to =io.DEFAULT_BUFFER_SIZE in > ross's patch. The problem is, it doesn't seem like you can import and use io.DEFAULT_BUFFER_SIZE from inside os.py. Python fails to start. You can import _io.DEF

[issue5870] subprocess.DEVNULL

2011-03-16 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- assignee: gregory.p.smith -> rosslagerwall resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pytho

[issue10812] Add some posix functions

2011-03-16 Thread Ross Lagerwall
Ross Lagerwall added the comment: This new patch, updated against the tip for 3.3: Shares the iov_setup and iov_cleanup code, py_parse_off_t with sendfile(). Removes gethostid and sethostid since they're deprecated. I think I was correct with referring to utime() since I was referring t

[issue10812] Add some posix functions

2011-03-16 Thread Ross Lagerwall
Ross Lagerwall added the comment: Forgot to attach the patch -- Added file: http://bugs.python.org/file21250/10812_v7.patch ___ Python tracker <http://bugs.python.org/issue10

[issue10812] Add some posix functions

2011-03-17 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- assignee: -> rosslagerwall resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python

[issue11592] Compilation warnings in os module

2011-03-17 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue11459] Python select.select does not correctly report read readyness

2011-03-19 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is a patch which uses -1 for the buffer size of popen(). This gets translated by the io.open() to the default io buffer size. -- Added file: http://bugs.python.org/file21290/11459_v2.patch ___ Python

[issue11615] sporadic failure in test_posix

2011-03-20 Thread Ross Lagerwall
Ross Lagerwall added the comment: Thanks for pointing that out. I'll just use waitpid() instead to wait on the desired pid only. -- ___ Python tracker <http://bugs.python.org/is

[issue11616] reap_children should not use WNOHANG

2011-03-20 Thread Ross Lagerwall
Ross Lagerwall added the comment: I'm not sure. Was reap_children() meant to just reap zombie processes or wait for all children to finish? It seems like it was written to just reap zombie processes. Might this not cause hangs during testing sometimes if a subprocess that was starte

[issue11615] sporadic failure in test_posix

2011-03-20 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- assignee: -> rosslagerwall resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python

[issue11651] Improve test targets in Makefile

2011-03-23 Thread Ross Lagerwall
Ross Lagerwall added the comment: The patch seems to work. I agree that quicktest and memtest should be removed as well as the duplicate test. The only thing I would change is to create the number of jobs to be double the cpu count - I think this works quicker. I don't think the leng

[issue9344] please add posix.getgrouplist()

2011-03-24 Thread Ross Lagerwall
Ross Lagerwall added the comment: Ronald, does it have the same problem as #7900 on OS X or can I commit? -- ___ Python tracker <http://bugs.python.org/issue9

[issue11659] Fix ResourceWarning in test_subprocess

2011-03-26 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- assignee: -> rosslagerwall nosy: +rosslagerwall resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python

[issue11692] subprocess demo functions

2011-03-27 Thread Ross Lagerwall
New submission from Ross Lagerwall : Running subprocess as a module invokes some demo functions. On posix, one of these doesn't work: $ ./python -m subprocess Process list: b' PID TTY TIME CMD\n 9003 pts/600:00:00 python\n 9004 pts/6 00:00:00 ps\n23760 pts/600:

[issue9929] subprocess.Popen unbuffered not work

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: Unbuffered subprocess was fixed in 1dc52ecb8949 Closing this as a duplicate of #11459. -- nosy: +rosslagerwall resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue11284] slow close file descriptors in subprocess, popen2, os.popen*

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: Closing this as a duplicate of #8052 -- nosy: +rosslagerwall resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue8052] subprocess close_fds behavior should only close open fds

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: See #11284 (a duplicate) for more discussion about this issue. -- nosy: +haypo, loewis, neologix, s7v7nislands ___ Python tracker <http://bugs.python.org/issue8

[issue8006] os.popen in Python 3.1

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: Closing as invalid - believed to be a buffering issue. -- nosy: +rosslagerwall resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue8052] subprocess close_fds behavior should only close open fds

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: I don't think setting the cloexec flag is a viable solution, especially since fds can be opened in custom c modules. For what its worth, an strace of Java's Process class appears to "cheat" by opening /proc/self/fd i

[issue11692] subprocess demo functions

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: OK, I simply removed the functions. -- assignee: -> rosslagerwall resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python

[issue8976] subprocess module causes segmentation fault

2011-03-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: Without more information and a way of reproducing on a recent version of Python, this can't progress. Closing as "works for me". -- nosy: +rosslagerwall resolution: -> works for me stat

[issue11711] socketpair does not accept AF_INET family argument [Linux]

2011-03-29 Thread Ross Lagerwall
Ross Lagerwall added the comment: It is noted in the Linux man page for socketpair: On Linux, the only supported domain for this call is AF_UNIX (or synonymously, AF_LOCAL). (Most implementations have the same restriction.) -- nosy: +rosslagerwall

[issue10963] "subprocess" can raise OSError (EPIPE) when communicating with short-lived processes

2011-03-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: I'd argue that this is not a feature request but a bug. I did some testing of this issue and the problem is that EPIPE is only generated sometimes depending on the time the process takes to finish, the size of the data sent, the underlying mechanism

[issue6457] subprocess.Popen.communicate can lose data from output/error streams when broken input pipe occures

2011-03-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: Closing as duplicate of #10963. See #10963 for more discussion. -- nosy: +rosslagerwall resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue10963] "subprocess" can raise OSError (EPIPE) when communicating with short-lived processes

2011-03-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: Marked #6457 as a duplicate. See #6457 for more discussion. -- nosy: +Yaniv.Aknin, amaury.forgeotdarc, dwalczak, mcrute ___ Python tracker <http://bugs.python.org/issue10

[issue10963] "subprocess" can raise OSError (EPIPE) when communicating with short-lived processes

2011-04-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: Committed, thanks. -- assignee: -> rosslagerwall resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: feature request -> behavior ___ Python tracker <http

[issue4112] Subprocess: Popen'ed children hang due to open pipes

2011-04-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: This has been fixed with all the subprocess improvements in between 3.1 and 3.2 but the decision has been taken (msg125910) not to backport the fix to 3.1 and 2.7 which would involve a C extension. However, a workaround on 2.7 and 3.1 is to set close_fds

[issue2320] Race condition in subprocess using stdin

2011-04-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: Closing this as fixed since it has been fixed on 3.2 and decided not to be backported on 3.1 and 2.7. -- nosy: +rosslagerwall resolution: out of date -> fixed status: open -> closed ___ Python tracker

[issue9861] subprocess module changed exposed attributes

2011-04-05 Thread Ross Lagerwall
Ross Lagerwall added the comment: This changes seems to have been made from 2.5 to 2.6 which are security fix only. Closing as "wont fix". -- nosy: +rosslagerwall resolution: -> wont fix status: open -> closed ___ Pytho

[issue11779] test_mmap timeout (30 min) on "AMD64 Snow Leopard 3.x" buildbot

2011-04-09 Thread Ross Lagerwall
Ross Lagerwall added the comment: OS X filesystem does not support seeking ahead to create sparse files. The test is supposed to skip the LargeMmapTests on OS X and Windows with (line 679 of test_mmap.py): if sys.platform[:3] == 'win' or sys.platform == 'darwin':

[issue11719] test_msilib skip unexpected on non-Windows platforms

2011-04-09 Thread Ross Lagerwall
Ross Lagerwall added the comment: Thanks for the patch. -- assignee: -> rosslagerwall nosy: +rosslagerwall resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.1, Python 3.2 ___ Py

[issue11818] tempfile.TemporaryFile example in docs doesnt work

2011-04-10 Thread Ross Lagerwall
Ross Lagerwall added the comment: Fixed the examples for Python 3. It writes and reads bytes now. Also fixed the old Python 2 print statement. -- assignee: docs@python -> rosslagerwall nosy: +rosslagerwall resolution: -> fixed status: open -> closed versions: +P

[issue11818] tempfile.TemporaryFile example in docs doesnt work

2011-04-11 Thread Ross Lagerwall
Ross Lagerwall added the comment: http://docs.python.org/release/3.1.3/library/tempfile.html doesn't to have an "Examples" section like 3.2 and 3.3. It appears to have been introduced in b172d7537b99 with #5178. -- ___ Python

[issue11827] mention of list2cmdline() in docs of subprocess.Popen

2011-04-11 Thread Ross Lagerwall
Ross Lagerwall added the comment: #10838 has a bit of discussion about list2cmdline and being part of the public api (generally agreeing that it should be made private, I think). -- nosy: +rosslagerwall ___ Python tracker <http://bugs.python.

[issue11847] OSError importing antigravity module

2011-04-14 Thread Ross Lagerwall
Ross Lagerwall added the comment: As an extra, presumably if you just do: import webbrowser webbrowser.open("http://www.python.org";) it also fails? -- nosy: +rosslagerwall status: pending -> open type: crash -> behavior ___ Pytho

[issue11457] Expose nanosecond precision from system calls

2011-04-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: Closed #11941 as a duplicate of this. -- nosy: +rosslagerwall ___ Python tracker <http://bugs.python.org/issue11457> ___ ___

[issue11941] Support st_atim, st_mtim and st_ctim attributes in os.stat_result

2011-04-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: I think this is a duplicate of #11457. -- nosy: +rosslagerwall resolution: -> duplicate status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue11941] Support st_atim, st_mtim and st_ctim attributes in os.stat_result

2011-04-28 Thread Ross Lagerwall
Ross Lagerwall added the comment: Ok, that's true, reopening. -- resolution: duplicate -> status: closed -> open ___ Python tracker <http://bugs.python.

[issue11457] Expose nanosecond precision from system calls

2011-04-28 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- dependencies: +Support st_atim, st_mtim and st_ctim attributes in os.stat_result ___ Python tracker <http://bugs.python.org/issue11

[issue1615158] POSIX capabilities support

2011-05-14 Thread Ross Lagerwall
Ross Lagerwall added the comment: Adding this to the posix module would enforce linking with lcap and lattr always. The development headers for these are not installed by default on some distributions. I think it would be better if they are added to a separate module (especially since all

[issue12081] Remove distributed copy of libffi

2011-05-15 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker <http://bugs.python.org/issue12081> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue1615158] POSIX capabilities support

2011-05-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: > > I think it would be better if they are added to a separate module > Can you propose a name for the module? I would say either posixcap or capabitilies. -- ___ Python tracker <http://bug

[issue1615158] POSIX capabilities support

2011-05-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: > I would say either posixcap or capabitilies. The problem with capabilities is that it's easy to misspell, as I did :-) -- ___ Python tracker <http://bugs.python.org/i

[issue12102] mmap requires file to be synced

2011-05-18 Thread Ross Lagerwall
Ross Lagerwall added the comment: > I don't think that Python should guess what the user expects (i.e. Python > should not sync the file *implicitly*). Agreed. The documentation patch looks good. -- nosy: +rosslagerwall ___ Python tra

[issue12102] mmap requires file to be synced

2011-05-21 Thread Ross Lagerwall
Ross Lagerwall added the comment: > Looked at it again and i think it's much better english with an > additional ..to ensure "that" local... > @Ross, aren't you a native english speaker? What do you say? Yes I am, but that doesn't make me any good ;-) I'

[issue9344] please add posix.getgrouplist()

2010-12-12 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is a patch (against the latest revision, 87178) which adds the functionality to the posix module as well as adds a testcase for it. I haven't added it to the os module, I'm not sure if that should be done. I tested it on Linux & FreeBS

[issue6791] httplib read status memory usage

2010-12-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is a unit test which tests the issue. Unfortunately, since it uses the resource module to limit memory to a workable size, it will only work on Unix. The given patch appears to fix the issue well. I think this should be taken as a security issue

[issue6791] httplib read status memory usage

2010-12-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: A py3k patch against revision 87228. -- Added file: http://bugs.python.org/file20049/i6791_py3k.patch ___ Python tracker <http://bugs.python.org/issue6

[issue6791] httplib read status memory usage

2010-12-15 Thread Ross Lagerwall
Ross Lagerwall added the comment: That's true. Near the bottom of the code, it says: # The status-line parsing code calls readline(), which normally # get the HTTP status line. For a 0.9 response, however, this is # actually the first line of the body! Limiting the length of the s

[issue10714] httpserver request length

2010-12-15 Thread Ross Lagerwall
New submission from Ross Lagerwall : BaseHTTPRequestHandler in http.server does not limit the length of the request line so a malicious client can cause the server to run out of memory with a malicious request. This patch limits the length to 64K (like Apache) and sends Error 414 if it

[issue10714] httpserver request length

2010-12-15 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue10714> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10714] httpserver request length

2010-12-16 Thread Ross Lagerwall
Ross Lagerwall added the comment: OK, here is an updated patch using threading & 0 as a port number. -- Added file: http://bugs.python.org/file20076/httpserver_py3k_v2.patch ___ Python tracker <http://bugs.python.org/iss

[issue10739] Subprocess behavior on Windows

2010-12-19 Thread Ross Lagerwall
New submission from Ross Lagerwall : On Windows, creating a subprocess does not work when stdin (or stdout or stderr) is set as a file object created from socket.makefile(). An IOError is thrown. This works fine on Unix so I assume it is a platform limitation rather than a Python bug. If

[issue10739] Subprocess behavior on Windows

2010-12-19 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is a patch to document this. -- keywords: +patch Added file: http://bugs.python.org/file20116/subprocessdoc.diff ___ Python tracker <http://bugs.python.org/issue10

[issue10739] Subprocess behavior on Windows

2010-12-20 Thread Ross Lagerwall
Ross Lagerwall added the comment: Since the code in subprocess gets the underlying fileno of the file-like object (line 819 of subprocess.py), I presume it is an example of the general problem of files and sockets not mixing very well on Windows. So, I have attached a patch to document this

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is a patch that adds: faccessat, fchmodat, fchownat, fstatat, futimesat, linkat, mkdirat, mknodat, openat, readlinkat, renameat, symlinkat, unlinkat, utimensat and mkfifoat. Each function has documentation and a unit test and is conditionally

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is an updated patch which: - fixes badly indented C code - uses support.unlink consistently - cleans up tests better using finally -- Added file: http://bugs.python.org/file20133/i4761_v2.patch ___ Python

[issue4761] create Python wrappers for openat() and others

2010-12-21 Thread Ross Lagerwall
Ross Lagerwall added the comment: Ok, attached is a patch with the documentation updated as per recommendation. -- Added file: http://bugs.python.org/file20135/i4761_v3.patch ___ Python tracker <http://bugs.python.org/issue4

[issue10755] Add posix.fdlistdir

2010-12-21 Thread Ross Lagerwall
New submission from Ross Lagerwall : Along with #4761, the *at wrappers, it would be nice to have a patch adding the use of fdopendir. This patch adds a function fdlistdir, a unittest and documentation. -- components: Extension Modules files: i_fdlistdir.patch keywords: patch messages

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall added the comment: When maintaining an fd to implement a per thread current directory, you can use it to get a list of files in the directory. For security reasons, instead of a named path, you can keep an fd to a directory so that if the path is changed externally while

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall added the comment: New patch *should* have fixed up reference counting and version tags. I standardized all the error calls to posix_error. -- Added file: http://bugs.python.org/file20137/i4761_v4.patch ___ Python tracker <h

[issue4761] create Python wrappers for openat() and others

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall added the comment: This new patch has proper octal mode strings and another doc update. I'll leave faccessat until #10758 has been resolved. -- Added file: http://bugs.python.org/file20138/i4761_v5.patch ___ Python tracker

[issue10758] posix_access swallows all errors

2010-12-22 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker <http://bugs.python.org/issue10758> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10755] Add posix.fdlistdir

2010-12-22 Thread Ross Lagerwall
Ross Lagerwall added the comment: Hi, Attached is a slightly updated patch that improves doc and changes fdlistdir to always return strings, not bytes. -- Added file: http://bugs.python.org/file20145/i10755.patch ___ Python tracker <h

[issue10784] os.getpriority() and os.setpriority()

2010-12-27 Thread Ross Lagerwall
Ross Lagerwall added the comment: Patch looks good, just one thing: In setpriority(), it should be possible to use the Py_RETURN_NONE; macro instead of INCREFing manually. -- components: +Extension Modules nosy: +rosslagerwall type: -> feature requ

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-30 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is a patch (the original one in patch form) against py3k with unit test. It seems to work well - tested on Linux & FreeBSD. -- keywords: +patch nosy: +rosslagerwall Added file: http://bugs.python.org/file20201/7995_v1.p

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: Attached is a patch which fixes the issue. Instead of allowing the readline method to lose data, it adds a check to SocketIO.readinto() to ensure that the socket does not have a timeout and throws an IOError if it does. Also does the same for SocketIO.write

[issue7322] Socket timeout can cause file-like readline() method to lose data

2010-12-31 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +loewis, pitrou ___ Python tracker <http://bugs.python.org/issue7322> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: issue1515839 seems to be a duplicate of this one. -- ___ Python tracker <http://bugs.python.org/issue7995> ___ ___ Python-bug

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2010-12-31 Thread Ross Lagerwall
Ross Lagerwall added the comment: >From what I coud see, the same applied to NetBSD so I enabled it for NetBSD as >well - if there are any other OSes that need it enabled, they can be added. The updated patch checks for fcntl() failing and simply leaves the socket as is if it fails

[issue5870] subprocess.DEVNULL

2011-01-01 Thread Ross Lagerwall
Ross Lagerwall added the comment: Here is a fairly simple patch that adds the subprocess.DEVNULL constant. -- keywords: +patch nosy: +rosslagerwall versions: +Python 3.3 -Python 2.7 Added file: http://bugs.python.org/file20215/5870_v1.patch

[issue9905] subprocess.Popen fails with stdout=PIPE, stderr=PIPE if standard descriptors (0, 1, 2) are closed.

2011-01-02 Thread Ross Lagerwall
Ross Lagerwall added the comment: OK here is a patch + tests. Basically, it makes sure that the fd that it is closing is not 0, 1 or 2. I've set it for 2.7, 3.1 and 3.2. -- keywords: +patch nosy: +rosslagerwall versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 Added

[issue5870] subprocess.DEVNULL

2011-01-02 Thread Ross Lagerwall
Ross Lagerwall added the comment: I think if you look closely at the patch, the fd does not stay open the whole time. It is opened if necessary in _get_handles() with e.g.: elif stdin == DEVNULL: p2cread = self._get_devnull() and then closed in _execute_child() with: if hasattr(self

[issue7995] On Mac / BSD sockets returned by accept inherit the parent's FD flags

2011-01-02 Thread Ross Lagerwall
Ross Lagerwall added the comment: OK try this one, it's now opt-out. -- Added file: http://bugs.python.org/file20222/7995_v3.patch ___ Python tracker <http://bugs.python.org/i

[issue10806] Subprocess error if fds 0,1,2 are closed

2011-01-02 Thread Ross Lagerwall
New submission from Ross Lagerwall : There is an issue where if a python program closes all the std. file descriptors (e.g. a daemon) and then uses the subprocess module, the file descriptors may not be set up properly in the subprocess. This may actually be a fairly common use case in a

[issue10806] Subprocess error if fds 0,1,2 are closed

2011-01-02 Thread Ross Lagerwall
Ross Lagerwall added the comment: Updated patch for debug mode. Does this also need to be applied for 3.1? -- Added file: http://bugs.python.org/file20228/subprocess_v2.patch ___ Python tracker <http://bugs.python.org/issue10

<    1   2   3   4   5   >