Ross Lagerwall added the comment:
Patch looks good after Victor's comment.
--
___
Python tracker
<http://bugs.python.org/issue12786>
___
___
Python-bugs-l
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
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
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
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
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.
--
_
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
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
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
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
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
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
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
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'
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
Ross Lagerwall added the comment:
I think this is a duplicate of issue5870.
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue11
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
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
Changes by Ross Lagerwall :
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue11459>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Ross Lagerwall :
--
title: urllib.request import time -> email.message import time
___
Python tracker
<http://bugs.python.org/issue11454>
___
___
Py
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
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
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
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
Changes by Ross Lagerwall :
--
assignee: gregory.p.smith -> rosslagerwall
resolution: -> accepted
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pytho
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
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
Changes by Ross Lagerwall :
--
assignee: -> rosslagerwall
resolution: -> accepted
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python
Changes by Ross Lagerwall :
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
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
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
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
Changes by Ross Lagerwall :
--
assignee: -> rosslagerwall
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python
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
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
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
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:
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/
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
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
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/
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
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
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
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
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
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/
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
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
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
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
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
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':
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
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
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
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.
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
Ross Lagerwall added the comment:
Closed #11941 as a duplicate of this.
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue11457>
___
___
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
Ross Lagerwall added the comment:
Ok, that's true, reopening.
--
resolution: duplicate ->
status: closed -> open
___
Python tracker
<http://bugs.python.
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
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
Changes by Ross Lagerwall :
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue12081>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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'
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
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
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
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
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
Changes by Ross Lagerwall :
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue10714>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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
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
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
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
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
Changes by Ross Lagerwall :
--
nosy: +rosslagerwall
___
Python tracker
<http://bugs.python.org/issue10758>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
Changes by Ross Lagerwall :
--
nosy: +loewis, pitrou
___
Python tracker
<http://bugs.python.org/issue7322>
___
___
Python-bugs-list mailing list
Unsubscribe:
Ross Lagerwall added the comment:
issue1515839 seems to be a duplicate of this one.
--
___
Python tracker
<http://bugs.python.org/issue7995>
___
___
Python-bug
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
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
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
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
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
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
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
101 - 200 of 408 matches
Mail list logo