[issue9851] multiprocessing socket timeout will break client

2010-09-16 Thread hume

hume  added the comment:

Oh, it's obvious that you've found a stupid bug in my description, if that 
frustrate you, I'd like to say sorry. 

So I would restate: "this is not so user friendly, would you be kindly enough 
to fix it?"

--

___
Python tracker 

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



[issue9869] long_subtype_new segfault in pure-Python code

2010-09-16 Thread Carl Witty

New submission from Carl Witty :

PyNumber_Long() (and hence long_new()) are willing to return ints, rather than 
longs.  However, when long_subtype_new() calls long_new(), it casts the result 
to PyLongObject* without a check.  (Well, there is an assertion, so if 
assertions are enabled you'd get an assertion failure instead of a potential 
segmentation fault.)

The attached program segfaults for me; returning smaller numbers than 100 
sometimes gives bad answers instead of crashing.

--
components: Interpreter Core
files: python_long_bug.py
messages: 116514
nosy: cwitty
priority: normal
severity: normal
status: open
title: long_subtype_new segfault in pure-Python code
type: crash
versions: Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file18899/python_long_bug.py

___
Python tracker 

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



[issue9870] compile and nested scopes

2010-09-16 Thread Sergey

New submission from Sergey :

See attached tmp1.py
It is very simple but it doesn't work
It raises NameError
NameError: global name 'arg' is not defined

--
components: None
files: tmp1.py
messages: 116515
nosy: webcubator
priority: normal
severity: normal
status: open
title: compile and nested scopes
type: behavior
versions: Python 2.7, Python 3.1
Added file: http://bugs.python.org/file18900/tmp1.py

___
Python tracker 

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



[issue9871] IDLE dies when using some regex

2010-09-16 Thread Popa Claudiu

New submission from Popa Claudiu :

Hello.

While trying to find a way for extracting strange characters in an ascii file, 
I stumbled upon some strange behaviour of IDLE, which exits without warning 
after running the following regex:

re.findall(b"\x.{2}", b"sdds\xd8")

In Python 2.6, this won't happen. This is my version of Python 3.1:
Python 3.1 (r31:73574, Jun 26 2009, 20:21:35).

--
components: IDLE
messages: 116516
nosy: Popa.Claudiu
priority: normal
severity: normal
status: open
title: IDLE dies when using some regex
versions: Python 3.1

___
Python tracker 

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



[issue9850] obsolete macpath module dangerously broken and should be removed

2010-09-16 Thread Ned Deily

Ned Deily  added the comment:

Patches in progress.

--

___
Python tracker 

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



[issue8639] Allow callable objects in inspect.getargspec

2010-09-16 Thread Marco Mariani

Marco Mariani  added the comment:

I second this, I depend on this monkeypatch for my turbogears projects, where I 
use callable objects as error handlers:

def getargspec(func):
if getattr(func, '__call__') and not isfunction(func) and not 
ismethod(func):
func = func.__call__
if ismethod(func):
func = func.im_func
if not isfunction(func):
raise TypeError('arg is not a Python function')
args, varargs, varkw = getargs(func.func_code)
return args, varargs, varkw, func.func_defaults

but I suppose 2.7 is locked to this change so I propose it for 3.x

--
nosy: +marco.mariani
versions: +Python 2.7, Python 3.3

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Changes by Armin Ronacher :


--
versions: +Python 3.3

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> @Martin: yep, I know we still need to install pyconfig.h and
> Makefile, but we shouldn't need to parse them to get programmatic
> access to the data they contain.

Hmm. What do you gain by not parsing them?

--

___
Python tracker 

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



[issue9869] long_subtype_new segfault in pure-Python code

2010-09-16 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson
nosy: +mark.dickinson
priority: normal -> high

___
Python tracker 

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



[issue678264] test_resource fails when file size is limited

2010-09-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> As a point of information, on my gentoo linux system without
> largefile support in the kernel, any value 4294967295 or above
> results in getrlimit reporting -1.  Any smaller value is set and
> reported as itself.  (If a sufficiently large value is passed in to
> setrlimit, an OverflowError results.)

I think we really should create new issues for any remaining problems.

AFAICT, the remaining problems are:
- resource.RLIM_INFINITY is -1 on Linux, when it is meant to be
   a really large value
- (as you reported) getrlimit returns -1 to indicate RLIM_INFINITY.

I think the core of the problem is that the resource module considers
rlim_t to be a signed type (or at least representable in "long long").
Using FromUnsignedLongLong in the appropriate place might solve the
issue.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I fail to see why this is a bug. If the system call is interrupted, why should 
Python not report that?

--
nosy: +loewis

___
Python tracker 

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



[issue9662] ctypes not building under OS X because of ffi_closure_free not being defined early enough

2010-09-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

(Finally...) Checked in for 2.7 in r84846

--
status: open -> closed

___
Python tracker 

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



[issue9810] bzip2 build sometimes fails (VS8.0)

2010-09-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I can't test the patch right now, but it looks good to me.

Please check it into py3k to see how the buildbots do. If it seems to work 
correctly (both for x86 and AMD64), feel free to backport it to 2.7 and 3.1.

As for vs9to8: I can't comment; I don't use older VS versions anymore.
In any case, this looks like an unrelated issue.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

One could argue of course that every user of Python should handle EINTR, but 
that's something I think should be solved in the IO library because very few 
people know that one is supposed to restart syscalls on EINTR on POSIX systems.

Ruby for instance handles EINTR properly:

mitsuh...@nausicaa:~$ ruby -e 'puts $stdin.read.inspect'
^Z
[1]+  Stopped
mitsuh...@nausicaa:~$ fg
ruby -e 'puts $stdin.read.inspect'
test
"test\n"



So does perl:

mitsuh...@nausicaa:~$ perl -e 'chomp($x = ); print $x'
^Z
[1]+  Stopped
mitsuh...@nausicaa:~$ fg
perl -e 'chomp($x = ); print $x'
test
test

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

Interestingly even PHP handles that properly.

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le jeudi 16 septembre 2010 à 11:13 +, Martin v. Löwis a écrit :
> Martin v. Löwis  added the comment:
> 
> > @Martin: yep, I know we still need to install pyconfig.h and
> > Makefile, but we shouldn't need to parse them to get programmatic
> > access to the data they contain.
> 
> Hmm. What do you gain by not parsing them?

Not having some complicate and brittle code to parse Makefiles would
certainly be a win, IMO.
(the canonical pyconfig.h is arguably much simpler)

--

___
Python tracker 

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



[issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback)

2010-09-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Unassigning because the issue affects more than just OSX and I'm not a Tkinter 
expert.

--
assignee: ronaldoussoren -> 

___
Python tracker 

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



[issue9701] Update ZSH profile on Mac OS installation

2010-09-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Thanks for the patch. I will apply this before the next release.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> One could argue of course that every user of Python should handle
> EINTR, but that's something I think should be solved in the IO
> library because very few people know that one is supposed to restart
> syscalls on EINTR on POSIX systems.
>
> Ruby for instance handles EINTR properly:

Hmm. So under what conditions should it continue, and under what 
conditions should it raise an exception (when errno is EINTR)?

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

> Hmm. So under what conditions should it continue, and under what 
> conditions should it raise an exception (when errno is EINTR)?

EINTR indicates a temporary failure.  In that case it should always retry.

A common macro for handling that might look like this:

#define RETRY_ON_EINTR(x) ({ \
  typeof(x) rv; \
  do { rv = x; } while (rv < 0 && errno == EINTR); \
  rv;\
})

But from what I understand, braces in parentheses are a GCC extension.

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

> Not having some complicate and brittle code to parse Makefiles would
> certainly be a win, IMO.

Not sure how the patch would look like, but I would expect that any
patch to build a module to include Makefile settings makes it *less*
robust: every time you add or remove a Makefile variable, you have to
remember to adjust the module as well. Currently, you can access 
arbitrary Makefile variables.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Am 16.09.10 14:06, schrieb Armin Ronacher:
>
> Armin Ronacher  added the comment:
>
>> Hmm. So under what conditions should it continue, and under what
>> conditions should it raise an exception (when errno is EINTR)?
>
> EINTR indicates a temporary failure.  In that case it should always retry.

But Ruby doesn't. If you send SIGINT, it will print

-e:1:in `read': Interrupt
from -e:1

If you send SIGHUP, it will print

Hangup

So it is surely more complex than "always retry".

--

___
Python tracker 

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



[issue9162] License for multiprocessing files

2010-09-16 Thread Michael Fladischer

Michael Fladischer  added the comment:

Is there any timeline on when this will be fixed? It's currently blocking work 
on a python-related package for Debian.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Wouldn't retrying on EINTR cause havoc when you try to interrupt a process?

That is: what would happen with the proposed patch when a python script does a 
read that takes a very long time and the user tries to interrupt the script (by 
using Ctrl+C to send a SIGTERM)?

If I my understanding of is correct the patch will ensure that the process does 
not get interupted because the default SIGTERM handler just sets a flag that's 
periodicly checked in the python interpreter loop.  With the proposed patch 
python would not get around to checking that flag until the I/O operation is 
finished.

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue9865] OrderedDict doesn't implement __sizeof__

2010-09-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch looks good.

--

___
Python tracker 

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



[issue9872] `a.b.my_function is not b.my_function` when `a` and `b` are both on `sys.path`

2010-09-16 Thread Ram Rachum

New submission from Ram Rachum :

Let's say you have this structure:

a\
  __init__.py
  b\
__init__.py

In `b.__init__` a function called `my_function` is defined.

And assume that `a` and `b` are both on `sys.path`. Then this situation happens:

>>> import a.b
>>> import b
>>> a.b.my_function is b.my_function
False
>>> a.b.my_function

>>> b.my_function

>>> a.b.my_function.__module__
'a.b'
>>> b.my_function.__module__
'b'

It seems that `a.b.my_function` and `b.my_function` are different objects.

--
messages: 116536
nosy: cool-RR
priority: normal
severity: normal
status: open
title: `a.b.my_function is not b.my_function` when `a` and `b` are both on 
`sys.path`
type: behavior
versions: Python 2.6, Python 3.1, Python 3.2

___
Python tracker 

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



[issue9872] `a.b.my_function is not b.my_function` when `a` and `b` are both on `sys.path`

2010-09-16 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

And indeed that's expected. Don't do that.

--
nosy: +benjamin.peterson
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

The following minimal C code shows how EINTR can be handled:

#include 
#include 
#include 
#include 

#define BUFFER_SIZE 1024


int
main()
{
char buffer[BUFFER_SIZE];
printf("PID = %d\n", getpid());
while (1) {
int rv = fgetc(stdin);
if (rv < 0) {
if (feof(stdin))
break;
if (errno == EINTR)
continue;
printf("Call failed with %d\n", errno);
return 1;
}
else
fputc(rv, stdout);
}
return 0;
}



Test application:

mitsuh...@nausicaa:/tmp$ ./a.out 
PID = 22806
Terminated
mitsuh...@nausicaa:/tmp$ ./a.out 
PID = 22809

mitsuh...@nausicaa:/tmp$ ./a.out 
PID = 22812
^Z
[2]+  Stopped ./a.out
mitsuh...@nausicaa:/tmp$ fg
./a.out
test
test
foo
foo

First signal sent was TERM, second was INT.  Last case was sending to 
background, receiving the ignored SIGCONT signal, fgetc returning -1 and fgetc 
being called again because of errno being EINTR.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

> Wouldn't retrying on EINTR cause havoc when you try to interrupt a process?

All your C applications are doing it, why should Python cause havok there?  
Check the POSIX specification on that if you don't trust me.

> That is: what would happen with the proposed patch when a python script
> does a read that takes a very long time and the user tries to interrupt 
> the script (by using Ctrl+C to send a SIGTERM)?
EINTR is only returned if nothing was read so far and the call was interrupted 
in case of fread.

Here a quick explanation from the GNU's libc manual:
http://www.gnu.org/s/libc/manual/html_node/Interrupted-Primitives.html

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

There is a funny story related to that though :)

"BSD avoids EINTR entirely and provides a more convenient approach:
 to restart the interrupted primitive, instead of making it fail."

BSD does, but the Mach/XNU kernel combo on OS X is not.  Which is why all the 
shipped BSD tools have that bug, but if you run their GNU equivalents on OS X 
everything work as expected.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Some parts of the stdlib already retry manually (such as SocketIO, subprocess, 
multiprocessing, socket.sendall), so it doesn't sound unreasonable for the IO 
lib to retry too.

There are/were other people complaining in similar cases: #7978, #1628205.

--
nosy: +benjamin.peterson, exarkun, pitrou, stutzbach
versions:  -Python 3.3

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Andreas Stührk

Changes by Andreas Stührk :


--
nosy: +Trundle

___
Python tracker 

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



[issue9162] License for multiprocessing files

2010-09-16 Thread Jesse Noller

Jesse Noller  added the comment:

On Thu, Sep 16, 2010 at 8:15 AM, Michael Fladischer
 wrote:
>
> Michael Fladischer  added the comment:
>
> Is there any timeline on when this will be fixed? It's currently blocking 
> work on a python-related package for Debian.
>

I'll ping the PSF board for the legal recommendations again.

--

___
Python tracker 

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



[issue9873] Allow bytes in some APIs that use string literals internally

2010-09-16 Thread Nick Coghlan

New submission from Nick Coghlan :

As per python-dev discussion in June, many Py3k APIs currently gratuitously 
prevent the use of bytes and bytearray objects as arguments due to their use of 
string literals internally.

Examples:
urllib.parse.urlparse
urllib.parse.urlunparse
urllib.parse.urljoin
urllib.parse.urlsplit
(and plenty of other examples in urllib.parse)

While a strict reading of the relevant RFCs suggests that strings are the more 
appropriate type for these APIs, as a practical matter, protocol developers 
want to be able to operate on ASCII supersets as raw bytes.

The proposal is to modify the implementation of these functions such that 
string literals are used only with string arguments, and bytes literals 
otherwise. If a function accepts multiple values and a mixture of strings and 
bytes is passed in then the operation will still fail (as it should).

--
assignee: ncoghlan
components: Library (Lib)
messages: 116543
nosy: ncoghlan
priority: high
severity: normal
stage: needs patch
status: open
title: Allow bytes in some APIs that use string literals internally
type: behavior
versions: Python 3.2

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

On 16 Sep, 2010, at 14:36, Armin Ronacher wrote:

> 
> Armin Ronacher  added the comment:
> 
>> Wouldn't retrying on EINTR cause havoc when you try to interrupt a process?
> 
> All your C applications are doing it, why should Python cause havok there?  
> Check the POSIX specification on that if you don't trust me.
> 
>> That is: what would happen with the proposed patch when a python script
>> does a read that takes a very long time and the user tries to interrupt 
>> the script (by using Ctrl+C to send a SIGTERM)?
> EINTR is only returned if nothing was read so far and the call was 
> interrupted in case of fread.
> 
> Here a quick explanation from the GNU's libc manual:
> http://www.gnu.org/s/libc/manual/html_node/Interrupted-Primitives.html

You conveniently didn't quote the part of my message where I explained why I 
think there may be a problem.

CPython's signal handlers just set a global flag to indicate that a signal 
occurred and run the actual signal handler later on from the main interpreter 
loop, see signal_handler in Modules/signal.c and intcatcher in 
Parser/intrcheck.c.  

The latter contains the default handler for SIGINT and that already contains 
code that deals with SIGINT not having any effect (when you sent SIGINT twice 
in a row without CPython running pending calls the interpreter gets aborted). 

Because Python's signal handlers only set a flag and do the actual action later 
on blindly rerunning system calls when errno == EINTR may result in programs 
that don't seem to react to signals at all.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

On 16 Sep, 2010, at 14:38, Armin Ronacher wrote:

> 
> Armin Ronacher  added the comment:
> 
> There is a funny story related to that though :)
> 
> "BSD avoids EINTR entirely and provides a more convenient approach:
> to restart the interrupted primitive, instead of making it fail."
> 
> BSD does, but the Mach/XNU kernel combo on OS X is not.  Which is why all the 
> shipped BSD tools have that bug, but if you run their GNU equivalents on OS X 
> everything work as expected.

setting the SA_RESTART in the call to sigaction should work (on OSX 
HAVE_SIGACTION is defined), unless the manpage is lying.

Ronald

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Because Python's signal handlers only set a flag and do the actual
> action later on blindly rerunning system calls when errno == EINTR may
> result in programs that don't seem to react to signals at all.

You just need to call PyErr_CheckSignals() and check its result.

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

> setting the SA_RESTART in the call to sigaction should work (on OSX 
> HAVE_SIGACTION is defined), unless the manpage is lying.

It should work, haven't tried.  From what I understand on a BSD system, 
retrying is the default.

--
versions: +Python 3.3

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Armin Ronacher

Armin Ronacher  added the comment:

> You conveniently didn't quote the part of my message where I explained 
> why I think there may be a problem.
I understand that, but there are already cases in Python where EINTR is handled 
properly.  In fact, quoting socketmodule.c:

if (res == EINTR && PyErr_CheckSignals())

--

___
Python tracker 

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



[issue9867] Interrupted system calls are not retried

2010-09-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

On 16 Sep, 2010, at 15:40, Armin Ronacher wrote:

> 
> Armin Ronacher  added the comment:
> 
>> You conveniently didn't quote the part of my message where I explained 
>> why I think there may be a problem.
> I understand that, but there are already cases in Python where EINTR is 
> handled properly.  In fact, quoting socketmodule.c:
> 
>if (res == EINTR && PyErr_CheckSignals())

This looks fine.

Ronald

--

___
Python tracker 

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



[issue9874] Message.attach() loses empty attachments

2010-09-16 Thread Raphael Mankin

New submission from Raphael Mankin :

When attaching a sequence of parts to a MIMEMultipart message, empty 
attachments are silently discarded.

--
components: Library (Lib)
messages: 116550
nosy: r...@mankin.org.uk
priority: normal
severity: normal
status: open
title: Message.attach() loses empty attachments
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue9874] Message.attach() loses empty attachments

2010-09-16 Thread R. David Murray

R. David Murray  added the comment:

Can you provide a simple example program that demonstrates the problem?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue9873] Allow bytes in some APIs that use string literals internally

2010-09-16 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +r.david.murray

___
Python tracker 

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



[issue9873] Allow bytes in some APIs that use string literals internally

2010-09-16 Thread Eric Smith

Changes by Eric Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue9875] Garbage output when running setup.py on Windows

2010-09-16 Thread Jean-Paul Calderone

New submission from Jean-Paul Calderone :

The output of setup.py is polluted with this log message:

  Importing new compiler from distutils.msvc9compiler

on Windows.  For example, using pyOpenSSL's setup.py, running "setup.py 
--version" produces this output:

  Importing new compiler from distutils.msvc9compiler
  0.10

But the version number of pyOpenSSL is "0.10", not "Importing new compiler from 
distutils.msvc9compiler\n0.10".

The --quiet flag does not solve this problem, apparently because this log 
message is done at the top-level of msvccompiler.py, perhaps before --quiet is 
interpreted.

This interferes with my build automation which depends on "setup.py --version" 
producing the version number of the project in order to properly compute 
certain filenames.

--
assignee: tarek
components: Distutils
messages: 116552
nosy: eric.araujo, exarkun, tarek
priority: normal
severity: normal
status: open
title: Garbage output when running setup.py on Windows
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2010-09-16 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

Actually, it's possible that select(2) incorrectly reports sockets as ready for 
reading : for example if the socket receives data, but then discards it because 
of an invalid checksum (and I guess you're more likely to get this type of 
problem on a VM or while copying large files).

--
nosy: +neologix

___
Python tracker 

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



[issue9090] Error code 10035 calling socket.recv() on a socket with a timeout (WSAEWOULDBLOCK - A non-blocking socket operation could not be completed immediately)

2010-09-16 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

So it means we should indeed retry on a socket with timeout... But we must take 
care not to exceed the original timeout, so we must measure the time taken by 
each select() call.

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-16 Thread R. David Murray

R. David Murray  added the comment:

I've only been on the periphery of the distutils/makefile discussion, but I 
thought the goal was to *autogenerate* a module containing the relevant 
information at python build time, instead of (as now) parsing the makefile at 
run time.  Whether or not this autogeneration involves or does not involve 
parsing the makefile at python build time is an orthogonal issue.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue9315] The trace module lacks unit tests

2010-09-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

See issue #9866 for follow ups on list comprehensions' tracing.

--
nosy:  -Alexander.Belopolsky
status: open -> closed
superseder:  -> Inconsistencies in tracing list comprehensions

___
Python tracker 

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



[issue9315] The trace module lacks unit tests

2010-09-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

List comprehension test is removed from 3.1 in r84848.

--

___
Python tracker 

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



[issue9264] trace.py documentation is incomplete

2010-09-16 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

> So I'm open to ideas and am willing to submit improved patches for 3.2

I offered some ideas in my last message.  In addition, I would like to see 
profile and trace documentation to converge to similar structure and use 
similar terminology.  In particular, I don't like "Run *cmd* under control of 
the Trace object" because Trace is not a debugger and does not "control" the 
execution.  I think the explanation at 
http://docs.python.org/dev/py3k/library/profile.html#cProfile.run is better.  
On the other hand, I like "Programming Interface" as the title of the API 
section better than "Reference Manual" in profile docs.  I hope we can change 
both trace and profile sections and retain the best choices.

--
priority: high -> normal

___
Python tracker 

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



[issue9874] Message.attach() loses empty attachments

2010-09-16 Thread Raphael Mankin

Raphael Mankin  added the comment:

'Simple' is the problem. I will come back to you on this.

--

___
Python tracker 

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



[issue416670] MatchObjects not deepcopy()able

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

No reply to msg113202.

--
nosy: +BreamoreBoy
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue460474] codecs.StreamWriter: reset() on close()

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

No reply to msg114140.

--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue9516] sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but "10.5" during configure

2010-09-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I've attached a patch for 3.2 that should fix the issue. 

The patch adds a couple of testcases (1 for sysconfig and 1 for 
distutils.command.build_ext), adjust a couple more and implements the following 
functional changes:

1) sysconfig._init_posix no longer does anything with 
   MACOSX_DEPLOYMENT_TARGET in the environment

2) sysconfig.get_platform always uses MACOSX_DEPLOYMENT_TARGET from 
   the Makefile and ignores the setting from the environment
   (in hindsight looking at the environment was wrong, particularly 
   because that also affects the name of bdist_* files and that can
   confuse tools like distutils)

3) distutils.util.get_platform was changed in the same way and for
   the same reason.

4) distutils.sysconfig._init_posix does still look at 
   MACOSX_DEPLOYMENT_TARGET but changes the environment by updating
   os.environ instead of calling os.putenv. The latter is very 
   confusing when you're debugging environment issues.

I'm not 100% sure about the (lack of) change to 
distutils.sysconfig._init_posix. It might be better to just always use the 
deployment target that was specified during the build of python itself.

There is a use-case for overriding the deployment target though: locally build 
an extension that you use on your machine and that uses compiler/library 
features that require a newer deployment target than the one used to build 
python itself.

--
keywords: +patch
Added file: http://bugs.python.org/file18901/issue9516.patch

___
Python tracker 

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



[issue923697] SAX2 'property_encoding' feature not supported

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

The URL referenced in msg54124 gives a 404.  It is also used as the 
property_encoding in the sax handler module.  Could this be fixed in 3.2 or can 
this issue be closed?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1648923] HP-UX: -lcurses missing for readline.so

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

I can't believe that a build issue raised almost 4 years ago against 2.5 is 
still an issue today.

--
nosy: +BreamoreBoy
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue416670] MatchObjects not deepcopy()able

2010-09-16 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +mrabarnett

___
Python tracker 

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



[issue1178] IDLE - add "paste code" functionality

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

This has already been implemented.

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

___
Python tracker 

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



[issue3020] doctest should have lib2to3 integration

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

Is this still valid, can it be closed as out of date or what?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3030] compiler warning on HP-UX

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

I can't believe that a build issue relating to 2.6 is still valid over two 
years later.

--
nosy: +BreamoreBoy
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue4837] Omits MACHINE and DEBUG when building tix8.4.3

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

Is the attached patch still valid?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9874] Message.attach() loses empty attachments

2010-09-16 Thread R. David Murray

R. David Murray  added the comment:

Got your off-ticket email.  I was hoping for something that *just* demonstrated 
the problem (just enough code to show the issue).  It may be a bit before I can 
find the time to reduce your code to such a test case.

--
stage:  -> unit test needed

___
Python tracker 

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



[issue5033] setup.py crashes if sqlite version contains 'beta'

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

A one line fix is given in msg80370, can this be applied,should the issue be 
closed or what?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue5309] setup.py doesn't parallelize extension module compilation

2010-09-16 Thread Mark Lawrence

Changes by Mark Lawrence :


--
components: +Distutils2 -Distutils
nosy: +eric.araujo
versions: +Python 3.2 -Python 2.7, Python 3.1

___
Python tracker 

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



[issue5629] PEP 0 date and revision not being set

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

I assume that people are still interested in this?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue5667] Interpreter fails to initialize on build dir when IO encoding is one of CJK

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

Hum, a low priority interpreter core crash, would anyone like to comment?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue6893] defaultdict example in py3 doc should mention the new Counter class

2010-09-16 Thread Mark Lawrence

Changes by Mark Lawrence :


--
assignee: georg.brandl -> d...@python
nosy: +d...@python

___
Python tracker 

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



[issue9876] ConfigParser can't interpolate values from other sections

2010-09-16 Thread Alexander Solovyov

New submission from Alexander Solovyov :

Often it is useful to access some variable in other section for interpolation 
needs: for example, parent directory declared in common section could be used 
in configuration of certain components. Included patch can fix that (using 
syntax 'section.variable'), is there any chances that it could be applied? :)


--- ConfigParser.old.py 2010-09-16 19:20:27.0 +0300
+++ ConfigParser.py 2010-09-16 19:22:33.0 +0300
@@ -585,7 +585,7 @@
 if "%(" in value:
 value = self._KEYCRE.sub(self._interpolation_replace, value)
 try:
-value = value % vars
+value = value % _Context(self, section)
 except KeyError, e:
 raise InterpolationMissingOptionError(
 option, section, rawval, e.args[0])
@@ -667,3 +667,15 @@
 raise ValueError("invalid interpolation syntax in %r at "
  "position %d" % (value, m.start()))
 ConfigParser.set(self, section, option, value)
+
+
+class _Context(object):
+def __init__(self, config, section):
+self.config = config
+self.section = section
+
+def __getitem__(self, key):
+if '.' in key:
+return self.config.get(*key.split('.'))
+else:
+return self.config.get(self.section, key)

--
components: Library (Lib)
messages: 116573
nosy: asolovyov
priority: normal
severity: normal
status: open
title: ConfigParser can't interpolate values from other sections
type: feature request
versions: Python 2.7

___
Python tracker 

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



[issue7059] 'checking getaddrinfo bug' doesn't output the result during ./configure

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

Is this still a problem on Linux?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue8554] suspicious comment in msilib.py/__init__.py

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

The line in question has been like that since r42847 i.e. when the file came 
into existence.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue8921] 2.7rc1: test_ttk failures on OSX 10.4

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

Were these test failures fixed prior to the full release of 2.7 in which case 
this can be closed?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1648923] HP-UX: -lcurses missing for readline.so

2010-09-16 Thread R. David Murray

R. David Murray  added the comment:

It could still exist since we don't seem to have many people building python on 
hpux.  That said, unless the op confirms the problem still exists in 2.7 or 
later this can stay closed.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue460474] codecs.StreamWriter: reset() on close()

2010-09-16 Thread R. David Murray

Changes by R. David Murray :


--
status: closed -> languishing

___
Python tracker 

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



[issue9870] compile and nested scopes

2010-09-16 Thread Georg Brandl

Georg Brandl  added the comment:

If you want to execute code as in the global namespace, don't supply a separate 
"locals" dict to eval/exec.

--
nosy: +georg.brandl
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue4837] Omits MACHINE and DEBUG when building tix8.4.3

2010-09-16 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

I think so, because TIX version built with python is not changed.

Anuway, I'm using PC/VC6/build_tkinter.py to build TCL/TK and TIX,
so I myself do not need this patch so much.

Please feel free to close this issue.

--

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-16 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
title: deriving configuration information for different builds  with the same 
prefix -> deriving configuration information for different builds with the same 
prefix

___
Python tracker 

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



[issue4837] Omits MACHINE and DEBUG when building tix8.4.3

2010-09-16 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Of cource, I'm happy if anyone needs this patch. ;-)

--

___
Python tracker 

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



[issue1633953] re.compile("(.*$){1,4}", re.MULTILINE) fails

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

Can this be closed as a duplicate of #2537?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue1187] pipe fd handling issues in subprocess.py on POSIX

2010-09-16 Thread Jeffrey Finkelstein

Jeffrey Finkelstein  added the comment:

Here's a patch which adds the test from 1187-dustin.patch for the py3k branch. 
The test passes without any additional changes to the py3k code.

--
nosy: +jfinkels
Added file: http://bugs.python.org/file18902/issue1187.patch

___
Python tracker 

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



[issue9877] Expose sysconfig._get_makefile_filename() in public API

2010-09-16 Thread Barry A. Warsaw

New submission from Barry A. Warsaw :

sysconfig.get_config_h_filename() returns the path of pyconfig.h.  The Makefile 
is also used to return values from sysconfig but it's path is hidden in a 
non-public method, for no good reason that I can think of.  Therefore, 
sysconfig._get_makefile_filename() should be renamed to 
sysconfig.get_makefile_filename().

--
assignee: barry
components: Library (Lib)
keywords: easy
messages: 116583
nosy: barry
priority: normal
severity: normal
status: open
title: Expose sysconfig._get_makefile_filename() in public API
versions: Python 3.2

___
Python tracker 

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



[issue9810] bzip2 build sometimes fails (VS8.0)

2010-09-16 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

Committed in r84851(py3k). Let's see buildbot.

--

___
Python tracker 

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



[issue1634774] locale 1251 does not convert to upper case properly

2010-09-16 Thread Mark Lawrence

Mark Lawrence  added the comment:

I've tried to see if this is still an issue but frankly can't make head nor 
tail out of it :(  Any locale gurus up for this?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-16 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I was thinking along the lines that RDM outlined, IOW that _sysconfig.c or 
equivalent would be autogenerated at build time.  But I think there are really 
two issues here:

1) Avoiding parsing of pyconfig.h and Makefile to get variable values for the 
sysconfig module.  This is fairly easy, but also the less important one I 
think.  If we still want to do this, let's move it to a separate bug.

2) Allowing for pyconfig.h and Makefile for different build options to coexist. 
 You need this so that extensions will be built against the correct build 
parameters.  This is much more important and I think the issue that Doko really 
wants to solve.  The _d hack now used is only a partial solution because it 
doesn't take into account other build options.

One possibility would be to use $SO, $SOABI, or just the flags in the latter 
(if you don't want the 'cpython-32' redundancy in the name) in the filename to 
pyconfig.h and Makefile.  e.g.

>>> import sysconfig
>>> sysconfig.get_config_h_filename()
'/usr/local/include/python3.2/config-32m/pyconfig.h'
>>> sysconfig.get_makefile_filename() # see bug 9877
'/usr/local/lib/python3.2/config-32m/Makefile'

The related issue is the naming of the binaries to include the build flag.   
Right now on Ubuntu we have python3-dbg for example.  Maybe instead we want 
python3- e.g. python3-m, python3-dm etc.  We can of course always 
use symlinks to get the old, or default names.

--

___
Python tracker 

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



[issue9868] test_locale leaves locale changed

2010-09-16 Thread Hirokazu Yamamoto

Hirokazu Yamamoto  added the comment:

This patch is *as is* patch.

Index: Lib/test/test_locale.py
===
--- Lib/test/test_locale.py (revision 84824)
+++ Lib/test/test_locale.py (working copy)
@@ -352,13 +352,13 @@
 locale_type = locale.LC_ALL
 
 def setUp(self):
-BaseLocalizedTest.setUp(self)
 enc = codecs.lookup(locale.getpreferredencoding(False) or 'ascii').name
 if enc not in ('utf-8', 'iso8859-1', 'cp1252'):
 raise unittest.SkipTest('encoding not suitable')
 if enc != 'iso8859-1' and (sys.platform == 'darwin' or
sys.platform.startswith('freebsd')):
 raise unittest.SkipTest('wcscoll/wcsxfrm have known bugs')
+BaseLocalizedTest.setUp(self)
 
 def test_strcoll_with_diacritic(self):
 self.assertLess(locale.strcoll('テ', 'b'), 0)

--

___
Python tracker 

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



[issue9878] Avoid parsing pyconfig.h and Makefile by autogenerating extension module

2010-09-16 Thread Barry A. Warsaw

New submission from Barry A. Warsaw :

This is splitting one concern from bug 9807 - specifically to avoid parsing 
pyconfig.h and Makefile in the sysconfig module by autogenerating an extension 
module (e.g. _sysconfig.c) at build time and using that to get the variables 
from those two files.

--
assignee: barry
components: Library (Lib)
messages: 116588
nosy: barry
priority: normal
severity: normal
status: open
title: Avoid parsing pyconfig.h and Makefile by autogenerating extension module
versions: Python 3.2

___
Python tracker 

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



[issue9807] deriving configuration information for different builds with the same prefix

2010-09-16 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

See issue 9878 for the "don't parse" bug.

--

___
Python tracker 

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



[issue4837] Omits MACHINE and DEBUG when building tix8.4.3

2010-09-16 Thread Mark Lawrence

Changes by Mark Lawrence :


--
resolution:  -> out of date
status: open -> closed

___
Python tracker 

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



[issue9878] Avoid parsing pyconfig.h and Makefile by autogenerating extension module

2010-09-16 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

See issue 9807

--

___
Python tracker 

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



[issue9869] long_subtype_new segfault in pure-Python code

2010-09-16 Thread Eric Smith

Changes by Eric Smith :


--
nosy: +eric.smith
versions:  -Python 2.5

___
Python tracker 

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



[issue9877] Expose sysconfig._get_makefile_filename() in public API

2010-09-16 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

-1 The Makefile is very implementation specific to CPython.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue9877] Expose sysconfig._get_makefile_filename() in public API

2010-09-16 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Sep 16, 2010, at 06:15 PM, Benjamin Peterson wrote:

>-1 The Makefile is very implementation specific to CPython.

and pyconfig.h isn't?

-Barry

--

___
Python tracker 

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



[issue8921] 2.7rc1: test_ttk failures on OSX 10.4

2010-09-16 Thread Ned Deily

Ned Deily  added the comment:

Duplicate of unresolved Issue8445

--
assignee: ronaldoussoren -> 
nosy: +ned.deily
resolution:  -> duplicate
status: open -> closed
superseder:  -> buildbot: test_ttk_guionly failures (test_traversal, 
test_tab_identifiers, test_identify, test_heading_callback)

___
Python tracker 

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



[issue9877] Expose sysconfig._get_makefile_filename() in public API

2010-09-16 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Yes, it's unfortunate that that is exposed. Hopefully, sysconfig will evolve 
some way to find information independent of implementation.

--

___
Python tracker 

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



[issue9877] Expose sysconfig._get_makefile_filename() in public API

2010-09-16 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
keywords: +patch
Added file: http://bugs.python.org/file18903/9877.diff

___
Python tracker 

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



[issue9877] Expose sysconfig._get_makefile_filename() in public API

2010-09-16 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

I don't agree that it's a bad thing that sysconfig exposes implementation 
specific information - it seems kind of the point of it.

"The sysconfig module provides access to Python’s configuration information 
like the list of installation paths and the configuration variables relevant 
for the current platform."

Of course things like sysconfig.get_config_h_filename() should raise an 
exception or return None on implementations that don't have a pyconfig.h.

--

___
Python tracker 

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



[issue9877] Expose sysconfig._get_makefile_filename() in public API

2010-09-16 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Patch attached.

--

___
Python tracker 

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



[issue6893] defaultdict example in py3 doc should mention the new Counter class

2010-09-16 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

This example needs to stay.  It was one of the principal motiviating use cases 
for defaultdict and it is a good, simple, understandable example of how to use 
it.

Also, I don't want to cross-link these two tools because they a subtly 
different (the default dict approach inserts a zero for missing elements while 
the Counter approach returns zero but does not insert it).

--
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue9877] Expose sysconfig._get_makefile_filename() in public API

2010-09-16 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


Added file: http://bugs.python.org/file18904/docs.diff

___
Python tracker 

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



[issue5755] "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++"

2010-09-16 Thread Jason Grout

Jason Grout  added the comment:

Any progress on this?  I see this warning a *lot* when compiling lots of 
packages for Sage (matplotlib included).

--
nosy: +Jason.Grout

___
Python tracker 

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



  1   2   >