[issue2271] msi installs to the incorrect location (C drive)

2008-03-10 Thread Ross

New submission from Ross <[EMAIL PROTECTED]>:

When installing Python using any of the following stand-alone installers:

python-2.5.2.amd64.msi
python-2.5.1.amd64.msi
python-2.5.2.msi

all the files and folders are installed in C:\ instead of C:\Python25\
as specified in the installer.  Creating C:\Python25\ before
installation, changing the folder name, and rebooting the machine did
not solve the problem.  The installation is being performed on Windows
Vista Enterprise 64 bit with an Intel Q6600 processor machine.

--
components: Installation, Windows
messages: 63455
nosy: rossmclendon
severity: normal
status: open
title: msi installs to the incorrect location (C drive)
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2271>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2271] msi installs to the incorrect location (C drive)

2008-03-11 Thread Ross

Ross <[EMAIL PROTECTED]> added the comment:

log now attached

Added file: http://bugs.python.org/file9655/python.zip

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2271>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2271] msi installs to the incorrect location (C drive)

2008-03-24 Thread Ross

Ross <[EMAIL PROTECTED]> added the comment:

Checking Progress.  This is a big of a show-stopper as it prevents me
from using a number of python dependent packages.

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2271>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2271] msi installs to the incorrect location (C drive)

2008-03-24 Thread Ross

Ross <[EMAIL PROTECTED]> added the comment:

using Orca, I modified the .msi file and python now appears to be
working.  I made the following change:

Property -> SecureCustomProperty
Changed value from
REMOVEOLDSNAPSHOT;REMOVEOLDVERSION
to
REMOVEOLDSNAPSHOT;REMOVEOLDVERSION;TARGETDIR;DLLDIR

Running the modified .msi file resulted in Python being installed in
C:\Python25 (the correct location).  Currently, the installation appears
to work properly.

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2271>
__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6818] remove/delete method for zipfile/tarfile objects

2009-09-01 Thread Ross

New submission from Ross :

It would be most helpful if a method could be included in the TarFile
class of the tarfile module and the ZipFile class of the zipfile module
that would remove a particular file (either given by a name or a
TarInfo/ZipInfo object) from the archive.

Usage to remove a single file from an archive would be as follows:

import zipfile
zipFileObject = zipfile.ZipFile(archiveName,'a')
zipFileObject.remove(fileToRemove)
zipFileObject.close()

Such a method should probably only apply to archives that are in append
mode as write mode would erase the original archive and read mode should
render the archive immutable.

One possible extra to be included is to allow a list of file names or
ZipInfo/TarInfo objects to be passed into the remove method, such that
all items in the list would be removed from the archive.

--
components: Library (Lib)
messages: 92154
nosy: rossmclendon
severity: normal
status: open
title: remove/delete method for zipfile/tarfile objects
type: feature request
versions: Python 3.2

___
Python tracker 
<http://bugs.python.org/issue6818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6818] remove/delete method for zipfile/tarfile objects

2009-09-01 Thread Ross

Changes by Ross :


--
components: +IO

___
Python tracker 
<http://bugs.python.org/issue6818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6818] remove/delete method for zipfile/tarfile objects

2009-09-01 Thread Ross

Ross  added the comment:

Slight change to:

"Such a method should probably only apply to archives that are in append
mode as write mode would erase the original archive and read mode should
render the archive immutable."

The method should probably still apply to an archive in write mode.  It
is conceivable that one may need to delete a file from the archive after
it has been written but before the archive object has been closed.

--

___
Python tracker 
<http://bugs.python.org/issue6818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6818] remove/delete method for zipfile/tarfile objects

2009-09-02 Thread Ross

Ross  added the comment:

In light of Lars's comment on the matter, perhaps this functionality
could be added to zip files only.  Surely it can be done, considering
that numerous utilities and even Windows Explorer provide such
functionality.  I must confess that I am unfamiliar with the inner
workings of file archives and compression, but seeing as it is
implemented in a number of places already, it seems logical that it
could be implemented in ZipFile as well.  I'll spend some time the next
few days educating myself about zip files and how this might be
accomplished.

--

___
Python tracker 
<http://bugs.python.org/issue6818>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-01-01 Thread Ross

New submission from Ross:

If convert_charrefs is set to true the final data section is not return by 
feed(). It is held until the next tag is encountered.

---
from html.parser import HTMLParser

class MyHTMLParser(HTMLParser):
def __init__(self):
HTMLParser.__init__(self, convert_charrefs=True)
self.fed = []
def handle_starttag(self, tag, attrs):
print("Encountered a start tag:", tag)
def handle_endtag(self, tag):
print("Encountered an end tag :", tag)
def handle_data(self, data):
print("Encountered some data  :", data)

parser = MyHTMLParser()

parser.feed("foo link bar")
print("")
parser.feed("spam link eggs")

---

gives

Encountered some data  : foo 
Encountered a start tag: a
Encountered some data  : link
Encountered an end tag : a

Encountered some data  :  barspam 
Encountered a start tag: a
Encountered some data  : link
Encountered an end tag : a


With 'convert_charrefs = False' it works as expected.

--
components: Library (Lib)
messages: 233291
nosy: xkjq
priority: normal
severity: normal
status: open
title: html.parser.HTMLParser: setting 'convert_charrefs = True' leads to 
dropped text
type: behavior
versions: Python 3.4

___
Python tracker 
<http://bugs.python.org/issue23144>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text

2015-01-01 Thread Ross

Ross added the comment:

That would make sense.

Might also be worth mentioning the difference in behaviour with 
convert_charrefs = True/False as that was what led me to think this was a bug.

--

___
Python tracker 
<http://bugs.python.org/issue23144>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2011-09-29 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Updated patch based on Eric's comments:
 Store _supports_safe_rmdir at the module level.
 Move imports up to module level
 Skip test on non-threading build

--
Added file: http://bugs.python.org/file23261/i4489_v4.patch

___
Python tracker 
<http://bugs.python.org/issue4489>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12797] io.FileIO and io.open should support openat

2011-09-29 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Attached is a patch which adds dirfd= as a keyword argument.

--
keywords: +patch
Added file: http://bugs.python.org/file23272/i12797.patch

___
Python tracker 
<http://bugs.python.org/issue12797>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2011-10-07 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

http://bugs.python.org/review/4489/diff/3383/10563#newcode319
Lib/test/test_shutil.py:319: @unittest.skipIf(threading == None, 'requires
threading')
On 2011/10/07 19:29:47, eric.araujo wrote:
> You can just say skipUnless(threading, 'msg')

Right.

http://bugs.python.org/review/4489/diff/3383/10563#newcode344
Lib/test/test_shutil.py:344: raise
On 2011/10/07 19:29:47, eric.araujo wrote:
> Shouldn’t this use self.fail?

I would have thought it's better if the original exception is passed through and
displayed rather than some sort of failure message that just says "OSError
occurred".

--

___
Python tracker 
<http://bugs.python.org/issue4489>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13150] Most of Python's startup time is sysconfig

2011-10-11 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

#11454 is another case where pre-parsing and pickling the regular expressions 
in the email module may improve import time considerably.

--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13150>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11715] Building Python on multiarch Debian and Ubuntu

2011-10-14 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

I see this requires dpkg-architecture which isn't always available. While it 
isn't hard to install it, it isn't very clear that this is the cause of the nis 
and crypt modules failing to build on a fresh install of 11.10.

What would be nice is if there were some way of determining this information 
without dpkg-architecture such as reading it from 
/etc/ld.so.conf.d/x86_64-linux-gnu.conf.

--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue11715>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13195] subprocess: args with shell=True is not documented on Windows

2011-10-17 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13195>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13196] subprocess: undocumented if shell=True is necessary to find executable in Windows PATH

2011-10-17 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13196>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13197] subprocess: move shell arguments to a separate keyword param

2011-10-17 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13197>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12797] io.FileIO and io.open should support openat

2011-10-18 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

I guess that would make it more general...

I'll play around with it for a bit. It mustn't become too hard to use though 
since the original point was to simplify the opening of files :-)

--

___
Python tracker 
<http://bugs.python.org/issue12797>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13263] Group some os functions in submodules

2011-10-25 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13263] Group some os functions in submodules

2011-10-25 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Some functions would be easy to split off into separate modules conceptually 
like the sched_* functions and the cap_* functions (see #1615158).

However, certain groups of functions like the *at functions cover a lot of 
different functionality and don't really belong together.

Perhaps the only grouping that should be done is for functions that start with 
a common prefix like sched_* since they are basically in a C "namespace".

--

___
Python tracker 
<http://bugs.python.org/issue13263>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12797] io.FileIO and io.open should support openat

2011-10-29 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

What would you envisage the API for the custom opener to look like?

--

___
Python tracker 
<http://bugs.python.org/issue12797>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12797] io.FileIO and io.open should support openat

2011-10-29 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Before I implement it properly, is this the kind of api that's desired?

"""
import os
import io

class MyOpener:
def __init__(self, dirname):
self.dirfd = os.open(dirname, os.O_RDONLY)

def open(self, path, flags, mode):
return os.openat(self.dirfd, path, flags, mode)

myop = MyOpener("/tmp")
f = open("testfile", "w", opener=myop.open)
f.write("hello")
"""

--

___
Python tracker 
<http://bugs.python.org/issue12797>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12797] io.FileIO and io.open should support openat

2011-10-29 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

The attached patch adds the opener keyword + tests.

--
Added file: http://bugs.python.org/file23550/opener.patch

___
Python tracker 
<http://bugs.python.org/issue12797>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12797] io.FileIO and io.open should support openat

2011-10-30 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Updated patch:
* checks for long overflow
* raises original exception if opener returns null
* makes it explicit that "opener" must return an open file descriptor.

I don't think that mode should be passed in since it is not specified in the 
parameters to open() (and always defaults to 0o666 anyway). Specifying the file 
mode should be left to the opener if needed.

--
Added file: http://bugs.python.org/file23562/opener_v2.patch

___
Python tracker 
<http://bugs.python.org/issue12797>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12797] io.FileIO and io.open should support openat

2011-10-31 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks (and for the English lesson ;-) )

--
assignee:  -> rosslagerwall
resolution:  -> fixed
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue12797>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

"""
import time
import sys

t = time.gmtime(time.time())
s = time.strftime('%Z', t)
print(s)

time.mktime((-1, 1, 1, 0, 0, 0, -1, -1, -1))

t = time.gmtime(time.time())
s = time.strftime('%Z', t)
print(s)
"""
outputs:
SAST
LMT

on my Gentoo box. I'm still figuring out why...

--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13309>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-01 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

It outputs:
SAST
LMT
LMT

An equivalent C program to the first test:
"""
#include 
#include 
#include 

int main() {

time_t t;
struct tm *tmp;

t = time(NULL);
tmp = localtime(&t);

char str[200];
strftime(str, sizeof(str), "%Z", tmp);

puts(str);

struct tm tmp2;
tmp2.tm_sec = 0;
tmp2.tm_min = 0;
tmp2.tm_hour = 0;
tmp2.tm_mday = 1;
tmp2.tm_mon = 1;
tmp2.tm_year = -1;
tmp2.tm_wday = -1;
tmp2.tm_yday = -1;
tmp2.tm_isdst = -1;
mktime(&tmp2);

t = time(NULL);
tmp = localtime(&t);

strftime(str, sizeof(str), "%Z", tmp);

puts(str);

return 0;
}
"""

Outputs (as expected):
SAST
SAST

Perhaps it's not mktime?

--

___
Python tracker 
<http://bugs.python.org/issue13309>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13339] Missing semicolon at Modules/posixsubprocess.c:4511

2011-11-03 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks!

--
assignee:  -> rosslagerwall
nosy: +rosslagerwall
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue13339>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6397] Implementing Solaris "/dev/poll" in the "select" module

2011-11-07 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue6397>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2011-11-07 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks Charles, I'll take your comments into account and take a look at making 
a general walker method.

--

___
Python tracker 
<http://bugs.python.org/issue4489>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6397] Implementing Solaris "/dev/poll" in the "select" module

2011-11-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

+   increases this value, c:func:`devpoll` will return a possible
+   incomplete list of active file descriptors.

I think this should change to:

+   increases this value, c:func:`devpoll` will return a possibly
+   incomplete list of active file descriptors.

or even better:

+   increases this value, c:func:`devpoll` may return an
+   incomplete list of active file descriptors.

Cheers

--

___
Python tracker 
<http://bugs.python.org/issue6397>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6397] Implementing Solaris "/dev/poll" in the "select" module

2011-11-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Is write()ing a devpoll fd a blocking operation in the kernel?
Does it need to have Py_BEGIN_ALLOW_THREADS around it?
The same question applies for open()ing it.

Obviously, the ioctl() call *is* blocking :-)

--

___
Python tracker 
<http://bugs.python.org/issue6397>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6397] Implementing Solaris "/dev/poll" in the "select" module

2011-11-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Also, you can use Py_RETURN_NONE instead of:
+Py_INCREF(Py_None);
+return Py_None;

--

___
Python tracker 
<http://bugs.python.org/issue6397>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6397] Implementing Solaris "/dev/poll" in the "select" module

2011-11-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

That was thorough :-) Seems OK though.

+if (n < size) {
+PyErr_SetString(PyExc_IOError, "failed to write all pollfds. "
+"Please, report in http://bugs.python.org/";);

If n < size, it's not a Python error is it? I would say it's the OS's fault.

Otherwise, it looks good... although I don't have currently access to a Solaris 
box to test it.

--

___
Python tracker 
<http://bugs.python.org/issue6397>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-10 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Has it been reported?

--

___
Python tracker 
<http://bugs.python.org/issue13309>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13424] Add examples for open’s new opener argument

2011-11-18 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13424>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13517] readdir() in os.listdir not threadsafe on OSX 10.6.8

2011-12-01 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13559] Use sendfile where possible in httplib

2011-12-10 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13559>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13564] ftplib and sendfile()

2011-12-10 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13564>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13530] Docs for os.lseek neglect to mention what it returns

2011-12-10 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13530>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13578] Add subprocess.iter_output() convenience function

2011-12-10 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13578>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError

2011-12-21 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

getstatusoutput() is broken given that it doesn't work on windows yet it should.

I'd also recommend leaving the behavior as is and deprecating the function (and 
getoutput() while we're at it).

A related bug (#10197) also recommends deprecating getstatusoutput.

--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue9922>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11006] warnings with subprocess and pipe2

2011-12-21 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Removed the warnings.

Thanks.

--
assignee:  -> rosslagerwall
nosy: +rosslagerwall
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.3

___
Python tracker 
<http://bugs.python.org/issue11006>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13684] httplib tunnel infinite loop

2012-01-02 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13684>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13694] asynchronous connect in asyncore.dispatcher does not set addr

2012-01-02 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue13694>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13609] Add "os.get_terminal_size()" function

2012-01-02 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Nice patch :-)

I think the two function approach works well.

Since you have already checked that termsize is not NULL, Py_DECREF can be used 
instead of Py_CLEAR.

Would it not be better to use sys.__stdout__ instead of 1 in the documentation 
and to use STDOUT_FILENO instead of 1 in the code?

A brief google suggested that Solaris requires sys/termios.h for TIOCGWINSZ. 
Perhaps also only define TERMSIZE_USE_IOCTL if TIOCGWINSZ is defined.
Like so:
#if defined(HAVE_SYS_IOCTL_H)
#include 
#if defined(TIOCGWINSZ)
#define TERMSIZE_USE_IOCTL
#else
#define TERMSIZE_USE_NOTIMPLEMENTED
#endif
#elif defined(HAVE_CONIO_H)
#include 
#include 
#define TERMSIZE_USE_CONIO
#else
#define TERMSIZE_USE_NOTIMPLEMENTED
#endif

(didn't check the windows parts)

--

___
Python tracker 
<http://bugs.python.org/issue13609>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13609] Add "os.get_terminal_size()" function

2012-01-02 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

I'll try & investigate Solaris a bit...

Also, what should be the default terminal size?

Gnome-terminal and xterm seem to default to 80x24, not 80x25.

--

___
Python tracker 
<http://bugs.python.org/issue13609>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12364] Deadlock in test_concurrent_futures

2012-01-02 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Retrieving the result of a future after the executor has been shut down can 
cause a hang.

It seems like this regression was introduced in a76257a99636. This regression 
exists only for ProcessPoolExecutor.

The problem is that even if there are pending work items, the processes are 
still signaled to shut down leaving the pending work items permanently 
unfinished. The patch simply removes the call to shut down the processes when 
there are pending work items.

Attached is a patch.

--
keywords: +patch
nosy: +rosslagerwall
Added file: http://bugs.python.org/file24128/issue.patch

___
Python tracker 
<http://bugs.python.org/issue12364>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12364] Deadlock in test_concurrent_futures

2012-01-02 Thread Ross Lagerwall

Changes by Ross Lagerwall :


Added file: http://bugs.python.org/file24129/itest.py

___
Python tracker 
<http://bugs.python.org/issue12364>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13713] Regression for http.client read()

2012-01-04 Thread Ross Lagerwall

New submission from Ross Lagerwall :

806cfe39f729 introduced a regression for http.client read(len).

To see this:
$ ./python test.py
$ wget http://archives.fedoraproject.org/pub/archive/fedora/linux/core/1/SRPMS/
$ diff index.html index2.html

This is a difference in the files (which there shouldn't be).

The change which introduced the problem was:
changeset:   73875:806cfe39f729
user:Antoine Pitrou 
date:Tue Dec 06 22:33:57 2011 +0100
summary: Issue #13464: Add a readinto() method to http.client.HTTPResponse.

--
components: Library (Lib)
files: test.py
messages: 150615
nosy: orsenthil, pitrou, rosslagerwall
priority: normal
severity: normal
stage: needs patch
status: open
title: Regression for http.client read()
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file24138/test.py

___
Python tracker 
<http://bugs.python.org/issue13713>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13713] Regression for http.client read()

2012-01-04 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

The patch looks right and seems to fix the issue. Thanks :-)

--

___
Python tracker 
<http://bugs.python.org/issue13713>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13734] Add a generic directory walker method to avoid symlink attacks

2012-01-07 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> Has there already been done any work? Ross mentioned he wanted to take a stab?

Unfortunately, I'm rather busy at the moment but when I get some free time and 
if no one else wants to work on it then I'll take a look.

--

___
Python tracker 
<http://bugs.python.org/issue13734>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4489] shutil.rmtree is vulnerable to a symlink attack

2012-01-07 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
dependencies: +Add a generic directory walker method to avoid symlink attacks

___
Python tracker 
<http://bugs.python.org/issue4489>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12364] Deadlock in test_concurrent_futures

2012-01-08 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks!

--
assignee:  -> rosslagerwall
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 
<http://bugs.python.org/issue12364>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13739] os.fdlistdir() is not idempotent

2012-01-08 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> I see two options:
> 1. rewind the directory stream in fdlistdir()
> 2. document this
> 
> Here's a patch for option 1.

Yeah, looks good.

--

___
Python tracker 
<http://bugs.python.org/issue13739>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13734] Add a generic directory walker method to avoid symlink attacks

2012-01-08 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> I'm currently leaning towards the simple 4-tuple approach

I would also take that approach. It seems simplest to me.

--

___
Python tracker 
<http://bugs.python.org/issue13734>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13757] os.fdlistdir() should not close the file descriptor given in argument

2012-01-10 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

The reason I made it like that was that it seemed "closer" to the fdopendir() 
function which steals the fd for internal use.

However, I agree that it makes more sense to dup() it.

Patch looks good.

--

___
Python tracker 
<http://bugs.python.org/issue13757>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13777] socket: communicating with Mac OS X KEXT controls

2012-01-12 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +ned.deily, ronaldoussoren

___
Python tracker 
<http://bugs.python.org/issue13777>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12158] platform: add linux_version()

2011-05-23 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12158>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12183] Document behaviour of shutil.copy2 and copystat with symlinks

2011-05-25 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Python 3.3 (as yet unreleased) supports the lutimes function:
  http://docs.python.org/dev/py3k/library/os.html#os.lutimes
Python 2.7 is not getting any more features so it will not be added.

I'm changing the title to the second part of your question, documenting the 
behaviour of shutil.copy2 and copytree.

--
nosy: +rosslagerwall
title: Python does not support lutime() function -> Document behaviour of 
shutil.copy2 and copystat with symlinks
versions: +Python 3.1, Python 3.2, Python 3.3 -Python 3.4

___
Python tracker 
<http://bugs.python.org/issue12183>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12196] add pipe2() to the os module

2011-05-28 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Out of interest, is there any reason that the configure check for pipe2 is a 
special case near the bottom of configure.in instead of with all the other 
function checks in the AC_CHECK_FUNCS[] section in the middle?
I know this patch didn't write the configure check but maybe it could be 
changed.

Also, the pure python implementation of subprocess for posix can now be updated 
to use pipe2 if it exists (previously on _posixsubprocess.c used it).

--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12196>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12196] add pipe2() to the os module

2011-05-28 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

>> Also, the pure python implementation of subprocess for posix can now >> be 
>> updated to use pipe2 if it exists (previously on _posixsubprocess.c
>> used it).

> I don't understand the last part :-)
> What do you suggest?

Perhaps, os.pipe2 can be used if available, then a modified version of 
_posixsubprocess.cloexec_pipe without the check for pipe2 could be used as a 
fallback.

I'm not sure why there exists both a python and c implementation.

--

___
Python tracker 
<http://bugs.python.org/issue12196>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12230] test_subprocess.test_pass_fds() failed on x86 Tiger 3.x

2011-05-31 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Could this be related to http://bugs.python.org/issue6559#msg123958?
Or Issue10826?

--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12230>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12230] test_subprocess.test_pass_fds() failed on x86 Tiger 3.x

2011-06-01 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> These failures were specific to Solaris/OpenIndiana: they were "door files"

Yeah, I saw that but thought maybe the reason was similar, some library 
function in the child process was opening a file and not closing it properly.

> using -m test -F test_io, and manually patched test_io

Isn't this test_subprocess?

--

___
Python tracker 
<http://bugs.python.org/issue12230>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11504] test_subprocess failure

2011-06-03 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

All stable buildbots appear to be green, so closing...

--
nosy: +rosslagerwall
resolution:  -> fixed
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue11504>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2011-06-03 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Attached is a patch for review.

It adds st_atim, st_ctim and st_mtim.

They are defined even when the underlying system does not have nanosecond 
precision.

--
keywords: +patch
stage:  -> patch review
Added file: http://bugs.python.org/file22237/issue11941.patch

___
Python tracker 
<http://bugs.python.org/issue11941>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2011-06-07 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Here is an updated patch that uses the atim, ctim and mtim variables (which are 
assigned based on various #ifdefs).

This should now work on Linux, BSD and Windows.

--
Added file: http://bugs.python.org/file22279/issue11941_2.patch

___
Python tracker 
<http://bugs.python.org/issue11941>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9344] please add posix.getgrouplist()

2011-06-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks!

--
resolution:  -> accepted
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue9344>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9344] please add posix.getgrouplist()

2011-06-10 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> Nit: when a patch gets committed and the issue closed, the preferred
> resolution is "fixed" ;)
> (see http://docs.python.org/devguide/triaging.html#resolution)

Sure, I will try remember that.

--

___
Python tracker 
<http://bugs.python.org/issue9344>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-13 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12326>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-20 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> That's exactly my point.
> Code checking sys.platform against 'linux2' is already broken, there's
> no point in complicating the code further, or adding a new constant.
> If you want to check for a specific operating system, there's already
> platform.system().

I would agree with this. Perhaps the documentation for sys.platform could be 
changed to mention that platform.system() should maybe be used instead.

--

___
Python tracker 
<http://bugs.python.org/issue12326>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10635] Calling subprocess.Popen with preexec_fn=signal.pause blocks forever

2011-06-23 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
status: pending -> closed

___
Python tracker 
<http://bugs.python.org/issue10635>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10636] subprocess module has race condition with SIGCHLD handlers

2011-06-23 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> The right approach is to use sigblock/sigsetmask before creating the
> process, and then again after creating it. Unfortunately, these aren't
> exposed from the signal module.

Since 3.3, pthread_sigmask is exposed so the right approach can now be taken ;-)

Closing as invalid.

--
nosy: +rosslagerwall
resolution:  -> invalid
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue10636>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-24 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Here's a patch to add the two functions (with docs and tests).

You'll need to run autoreconf before compiling.

--
assignee:  -> rosslagerwall
keywords: +patch
nosy: +rosslagerwall
stage:  -> patch review
type:  -> feature request
Added file: http://bugs.python.org/file22434/issue12303.patch

___
Python tracker 
<http://bugs.python.org/issue12303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-24 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks for the review.

> Why do you wait until the end of PyInit_signal() to set initialized to 1?
Fixed.

> If this variable is only present ... but I see that the init function of the 
> posixmodule.c has also a static initialized variable.
I simply followed the same format of the posix module.

> "(If one of the signals in set is already pending for the calling thread,  
> sigwaitinfo() will return immediately with information about that signal.)"
Added.

> "If both fields of this structure are specified as  0,  a  poll  is  
> performed:  sigtimedwait() returns  immediately,  either with information 
> about a signal that was pending for the caller, or with an error if none of 
> the signals in set was pending."
Added.

> The manpage doesn't tell that the signal handler is not called, should we say 
> it in the Python doc?
Added - let's rather be more explicit.

> Doc: you may add links between pause(), sigwait(), sigwaitinfo() and 
> sigtimedwait() functions.
Added.

> The timeout is a tuple. Usually, Python uses float for timeout (e.g. see 
> select.select). I suppose that you chose a tuple to keep the precision of the 
> timespec structure. We may accept both types: (sec: int, nanosec: int) or 
> sec: float. It would be nice to have the opinion of our time expect, 
> Alexander Belopolsky.
The are some uses of this tuple that were added in #10812 (e.g. futimens) that 
was reviewed by Alexander.
However, there was a conflict about it at #11457.
I'd say for now, let's keep it as a tuple and if a decision is eventually made 
as to how to
represent nanosecond timestamps, we can change them all then.

> It is possible to pass a negative timeout
It now raises an exception like select.

> signal_sigwaitinfo() and signal_sigtimedwait() use iterable_to_sigset()
Fixed.

> According to the manual page, sigwaitinfo() or sigtimedwait() can be 
> interrupted (EINTR)
Actually, PyErr_SetFromErrno() does this implicitly. I added a test case anyway.

> Your patch doesn't touch configure nor pyconfig.h.in, only configure.in.
I prefer to keep the generated changes out of the patch. When I commit, I'll 
run autoreconf.

> siginfo_t structure contains more fields, but I don't know if we need all of 
> them. It can be improved later.
POSIX 2008 specifies:
int   si_signo  Signal number. 
int   si_code   Signal code. 
int   si_errno  If non-zero, an errno value associated with 
this signal, as described in . 
pid_t si_pidSending process ID. 
uid_t si_uidReal user ID of sending process. 
void *si_addr   Address of faulting instruction. 
int   si_status Exit value or signal. 
long  si_band   Band event for SIGPOLL. 
union sigval  si_value  Signal value.

So I've left out si_addr (I don't think it's needed), si_band (we don't have 
SIGPOLL)
and si_value (not sure what it's for or how to represent a union :-)).

> sigtimedwait() raises a OSError(EGAIN) on timeout.
It now returns None.

> test_sigtimedwait_timeout(): why do you call signal.alarm()?
Copy/paste error.

> You may also add a test for timeout=0, I suppose that it is a special timeout 
> value.
Added.

> I will do a deeper review on the second version of your patch :-)
How much more in depth can it get ;-) ?

--
Added file: http://bugs.python.org/file22439/issue12303_v2.patch

___
Python tracker 
<http://bugs.python.org/issue12303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-24 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> What do you mean? signal.SIGPOLL exists in Python 3.3.

Right, si_band added.

> - test_sigwaitinfo(), test_sigtimedwait_poll(), 
> test_sigwaitinfo_interrupted() are called from a child process. In 
> test_wait(), I chose to write manually to stdout and call os._exit(1) (oh, I 
> forgot an explicit sys.stdout.flush()). I don't know if you can use TestCase 
> methods in a child process (I don't know what is written to stdout, 
> _wait_helper() calls os._exit).

I assume you mean stderr? Well anyway if the assert* fails, an exception is 
raised and then caught by this code in wait_helper():
"""
except BaseException as err:
print("error: {}".format(err), file=sys.stderr)
sys.stderr.flush()
os._exit(1)
"""
which prints it to stderr.
If this is OK, I'll commit the patch.

--
Added file: http://bugs.python.org/file22452/issue12303_v3.patch

___
Python tracker 
<http://bugs.python.org/issue12303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12404] c99 code in mmapmodule

2011-06-25 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks!

--
assignee:  -> rosslagerwall
nosy: +rosslagerwall
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.3

___
Python tracker 
<http://bugs.python.org/issue12404>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-26 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

>From the FreeBSD 6.4 buildbot:
"""
[172/356/2] test_signal
error: 'NoneType' object has no attribute 'si_signo'
error: False is not true
test test_signal failed -- multiple errors occurred; run in verbose mode for 
details
Re-running test test_signal in verbose mode
test_getsignal (test.test_signal.PosixTests) ... ok
test_out_of_range_signal_number_raises_error (test.test_signal.PosixTests) ... 
ok
test_setting_signal_handler_to_none_raises_error (test.test_signal.PosixTests) 
... ok
test_main (test.test_signal.InterProcessSignalTests) ... skipped 'inter process 
signals not reliable (do not mix well with threading) on freebsd6'
test_pending (test.test_signal.WakeupSignalTests) ... ok
test_pthread_kill_main_thread (test.test_signal.WakeupSignalTests) ... ok
test_signum (test.test_signal.WakeupSignalTests) ... ok
test_wakeup_fd_during (test.test_signal.WakeupSignalTests) ... ok
test_wakeup_fd_early (test.test_signal.WakeupSignalTests) ... ok
test_siginterrupt_off (test.test_signal.SiginterruptTest) ... ok
test_siginterrupt_on (test.test_signal.SiginterruptTest) ... ok
test_without_siginterrupt (test.test_signal.SiginterruptTest) ... ok
test_itimer_exc (test.test_signal.ItimerTest) ... ok
test_itimer_prof (test.test_signal.ItimerTest) ... skipped 'itimer not reliable 
(does not mix well with threading) on freebsd6'
test_itimer_real (test.test_signal.ItimerTest) ... ok
test_itimer_virtual (test.test_signal.ItimerTest) ... skipped 'itimer not 
reliable (does not mix well with threading) on some BSDs.'
test_issue9324 (test.test_signal.WindowsSignalTests) ... skipped 'Windows 
specific'
test_pthread_kill (test.test_signal.PendingSignalsTests) ... ok
test_pthread_sigmask (test.test_signal.PendingSignalsTests) ... ok
test_pthread_sigmask_arguments (test.test_signal.PendingSignalsTests) ... ok
test_sigpending (test.test_signal.PendingSignalsTests) ... ok
test_sigpending_empty (test.test_signal.PendingSignalsTests) ... ok
test_sigtimedwait (test.test_signal.PendingSignalsTests) ... ok
test_sigtimedwait_negative_timeout (test.test_signal.PendingSignalsTests) ... ok
test_sigtimedwait_poll (test.test_signal.PendingSignalsTests) ... error: 
'NoneType' object has no attribute 'si_signo'
FAIL
test_sigtimedwait_timeout (test.test_signal.PendingSignalsTests) ... ok
test_sigwait (test.test_signal.PendingSignalsTests) ... ok
test_sigwait_thread (test.test_signal.PendingSignalsTests) ... ok
test_sigwaitinfo (test.test_signal.PendingSignalsTests) ... ok
test_sigwaitinfo_interrupted (test.test_signal.PendingSignalsTests) ... error: 
False is not true
FAIL

==
FAIL: test_sigtimedwait_poll (test.test_signal.PendingSignalsTests)
--
Traceback (most recent call last):
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py", 
line 685, in test_sigtimedwait_poll
self.wait_helper(test, self.handler, signal.SIGALRM)
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py", 
line 645, in wait_helper
self.assertEqual(os.waitpid(pid, 0), (pid, 0))
AssertionError: Tuples differ: (55455, 256) != (55455, 0)

First differing element 1:
256
0

- (55455, 256)
? ^^^

+ (55455, 0)
? ^


==
FAIL: test_sigwaitinfo_interrupted (test.test_signal.PendingSignalsTests)
--
Traceback (most recent call last):
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py", 
line 721, in test_sigwaitinfo_interrupted
self.wait_helper(test, self.alarm_handler, signal.SIGUSR1)
  File 
"/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py", 
line 645, in wait_helper
self.assertEqual(os.waitpid(pid, 0), (pid, 0))
AssertionError: Tuples differ: (55460, 256) != (55460, 0)

First differing element 1:
256
0

- (55460, 256)
? ^^^

+ (55460, 0)
? ^
"""




@Victor, you've had some experience with fixing signals on the FreeBSD 6 
buildbot.
Have you got any ideas as to what the cause of this may be?

--

___
Python tracker 
<http://bugs.python.org/issue12303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-30 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

The tests seem to be working fine on all the buildbots now...

Thanks!

--
resolution:  -> accepted
stage: commit review -> committed/rejected
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue12303>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12456] Hangs in concurrent.futures

2011-06-30 Thread Ross Lagerwall

New submission from Ross Lagerwall :

6d6099f7fe89 introduced a regression.

It causes the following code to hang fairly reliably for me:
"""
import concurrent.futures
import math

def is_prime(n):
print(sqt(81))  < Note the type error!

def main():
with concurrent.futures.ProcessPoolExecutor(2) as executor:
executor.map(is_prime, [1, 2])

if __name__ == '__main__':
main()
"""

>From my limited knowledge of multiprocessing and concurrent futures, it seems 
>that in shutdown_worker(), call_queue.put(None) hangs because the queue is 
>full and there are no more workers consuming items in the queue (they exited 
>early).

Increasing EXTRA_QUEUED_CALLS fixes the problem, though its probably not the 
correct solution.

--
components: Library (Lib)
messages: 139541
nosy: pitrou, rosslagerwall
priority: normal
severity: normal
status: open
title: Hangs in concurrent.futures
type: behavior
versions: Python 3.3

___
Python tracker 
<http://bugs.python.org/issue12456>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12456] Hangs in concurrent.futures

2011-06-30 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Further analysis seems to indicate that it is a race between the shutdown code 
and the processes finishing.

This code hangs:
"""
executor = concurrent.futures.ProcessPoolExecutor(2)
executor.map(is_prime, [1, 2])
executor.shutdown()
"""

while this doesn't:
"""
executor = concurrent.futures.ProcessPoolExecutor(2)
executor.map(is_prime, [1, 2])
time.sleep(1)
executor.shutdown()
"""

--

___
Python tracker 
<http://bugs.python.org/issue12456>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12456] Hangs in concurrent.futures

2011-07-01 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Yes, the patch does appear to fix the issue.

Thanks

--

___
Python tracker 
<http://bugs.python.org/issue12456>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12502] 100% cpu usage when using asyncore with UNIX socket

2011-07-05 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Looks good, the patch seems to fix the problem.
This section of code indicates that the accepting socket shouldn't be in the 
write set...

def handle_write_event(self):
if self.accepting:
# Accepting sockets shouldn't get a write event.
# We will pretend it didn't happen.
return

--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12502>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12522] Implement `os.startfile` under Linux and Mac

2011-07-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

I think this is a duplicate of #3177.

--
nosy: +rosslagerwall
resolution:  -> duplicate
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue12522>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3177] implement os.startfile on posix and MacOSX

2011-07-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Closed #12522 as a duplicate.

It contains a link to a discussion on python-ideas requesting the feature.

--
nosy: +rosslagerwall
versions: +Python 3.3 -Python 3.2

___
Python tracker 
<http://bugs.python.org/issue3177>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2011-07-11 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12494>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12517] Large file support on Windows: sizeof(off_t) is 32 bits

2011-07-11 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12517>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12556] Disable size checks in mmap.mmap()

2011-07-21 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> I don't like the idea of adding an argument which doesn't have a
> counterpart in the POSIX version (especially to address such corner
> cases).

Indeed, it seems rather messy for a corner case that may well not exist.

If there are definite cases where this usage is needed, a solution may then 
have to be considered.

--

___
Python tracker 
<http://bugs.python.org/issue12556>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12556] Disable size checks in mmap.mmap()

2011-07-21 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> That's what I thought, it's really uncommon: in that case, I'm
> reluctant to making such a change, for the reason explained above.
> Ross, Victor?

Even if Linux did accept a a length of 0 (which it doesn't since 2.6.12), what 
would be the point? Wouldn't you be mapping *nothing*?

Yeah, I'm against this change.

--

___
Python tracker 
<http://bugs.python.org/issue12556>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12607] subprocess(stdout=..., stderr=sys.stdout) breaks stderr for child

2011-07-22 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

It is indeed a problem.

It seems like the problem comes about due to the "swapping" of fds.
i.e. using stdout as stderr. The reverse appears to work due to the order in 
which the dup() calls are performed.

Attached is a patch which fixes the issue.

--
keywords: +patch
nosy: +rosslagerwall
Added file: http://bugs.python.org/file22716/i12607.patch

___
Python tracker 
<http://bugs.python.org/issue12607>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12102] mmap requires file to be synced

2011-07-24 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks!

--
assignee:  -> rosslagerwall
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 3.3

___
Python tracker 
<http://bugs.python.org/issue12102>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12607] subprocess(stdout=..., stderr=sys.stdout) breaks stderr for child

2011-07-24 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Attached is a patch which tests all combinations and includes a testcase.

--
nosy: +pitrou
Added file: http://bugs.python.org/file22747/i12607_v2.patch

___
Python tracker 
<http://bugs.python.org/issue12607>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12607] subprocess(stdout=..., stderr=sys.stdout) breaks stderr for child

2011-07-25 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

communicate() requires setting stdin, stdout and stderr to subprocess.PIPE 
which defeats the purpose of the test: setting them to 0, 1 and 2 (in various 
orders) so that they need to be swapped...

--

___
Python tracker 
<http://bugs.python.org/issue12607>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12607] subprocess(stdout=..., stderr=sys.stdout) breaks stderr for child

2011-07-27 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
assignee:  -> rosslagerwall
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
type:  -> behavior

___
Python tracker 
<http://bugs.python.org/issue12607>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12650>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12650] Subprocess leaks fd upon kill()

2011-07-28 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

The patches look good and seem to fix the issue.

--

___
Python tracker 
<http://bugs.python.org/issue12650>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12682] Meaning of 'accepted' resolution as documented in devguide

2011-08-02 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

> Formally I believe that the 'accepted' resolution is for committed feature 
> requests

That's what I also thought originally.

Perhaps this should be discussed on Python-Dev to see what people think it 
should mean?

--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12682>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12702] shutil.copytree() should use os.lutimes() to copy the metadata of symlinks

2011-08-08 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 
<http://bugs.python.org/issue12702>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2011-08-20 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

An initial patch.

The first problem is that before, os.path.realpath('') == os.path.realpath('.')
but this is not true for realpath(3).

Thus, the test suite does not run because it relies on this behaviour.

--
keywords: +patch
Added file: http://bugs.python.org/file22970/i12801.patch

___
Python tracker 
<http://bugs.python.org/issue12801>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   5   >