[issue11623] Distutils is reporting OSX 10.6 w/ XCode 4 as universal

2011-03-25 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

A similar issue on StackOverflow reminded me that Distutils has support for the 
ARCHFLAGS environment variable on Mac OS X which you can use when building a C 
extension module to override the ARCH values that Python was built with.  I 
don't have Xcode 4 installed yet to verify this but you may be able to work 
around the problem by something like:

ARCHFLAGS='-arch i386 -arch x86_64' /usr/bin/python2.6 setup.py install

when using the Apple-supplied Python 2.6 or:

ARCHFLAGS='-arch i386' /usr/local/bin/pythonx.x setup.py install

when using a 32-bit-only python.org Python.

--

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



[issue11665] Regexp findall freezes

2011-03-25 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti, mrabarnett

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



[issue11669] Clarify Lang Ref Compound statements footnote

2011-03-25 Thread Graham Wideman

New submission from Graham Wideman initcont...@grahamwideman.com:

In Language Ref section 7 Compound Statements:
http://docs.python.org/release/3.1.3/reference/compound_stmts.html
there's a footnote regarding what happens to unhandled exceptions in a 
try-except statement:

[1] The exception is propagated to the invocation stack only if there is no 
*finally* clause that negates the exception.

This is very unclearly worded, especially since the reader in need of this 
footnote is probably familiar with the *except* clause being the one to 
negate an exception, and may well think this footnote is in error.  This 
footnote could provide a more convincing explanation: 

[1] The exception is propagated to the invocation stack unless there is a 
finally clause which happens to raise another exception. That new exception 
causes the old exception to be lost.

--
assignee: docs@python
components: Documentation
messages: 132072
nosy: docs@python, gwideman
priority: normal
severity: normal
status: open
title: Clarify Lang Ref Compound statements footnote
type: behavior
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 
3.3, Python 3.4

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



[issue11667] 'configure' script overrides users setting of CFLAGS

2011-03-25 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc amaur...@gmail.com added the comment:

You should override the OPT variable as well. I tried:

$ CFLAGS= OPT=-fwrapv -O3 -Wall ./configure

Then make shows lines like:

gcc -pthread -c -fno-strict-aliasing  -DNDEBUG -fwrapv -O3 -Wall  -I. -IInclude 
-I./Include   -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c

--
nosy: +amaury.forgeotdarc
resolution:  - works for me
status: open - pending

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



[issue5438] test_bigmem.test_from_2G_generator uses more memory than expected

2011-03-25 Thread Thomas Wouters

Thomas Wouters tho...@python.org added the comment:

I'm not surprised this test takes up more memory... It claims to take up 9 
times the test size in memory, with a minimum useful test size of 1G. With a 
limit of 12G that would make the test size about 1.33G. However, it then 
proceeds to build a tuple of 159 million distinct integers and stuffs them into 
a tuple. Each integer is at least 24 bytes long, plus the 8 of the pointer in 
the tuple, making the total memory use over 32 times the test size. I'll fix 
the test.

--
assignee:  - twouters
nosy: +twouters
versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2

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



[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2011-03-25 Thread Larry Hastings

New submission from Larry Hastings la...@hastings.org:

The documentation for configparser.RawConfigParser.read_file() states:

Read and parse configuration data from the file or file-like object in f (only 
the readline() method is used).

This was true in Python 3.1 and before.  However in 3.2 the implementation of 
read_file changed.  It no longer calls readline().  Instead, it iterates over 
the file object.  Whoever made this change neglected to

* fix the docs, or apparently
* tell anybody.

I've got the commit bit, so I'd be happy to fix this.

I'd like to add it to the What's New In Python 3.2 as well; there's a section 
about configparser changes that would be perfect.  Is it permissible to change 
the What's New document ex post facto like this?  (Adding rhettinger so he can 
answer this.)

--
assignee: docs@python
components: Documentation
messages: 132075
nosy: docs@python, larry, rhettinger
priority: low
severity: normal
stage: needs patch
status: open
title: configparser read_file now iterates over f, docs still say it calls 
readline
type: behavior
versions: Python 3.2

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



[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2011-03-25 Thread Larry Hastings

Larry Hastings la...@hastings.org added the comment:

By the same token, readfp is now deprecate in favor of the new spelling 
read_file.  That change *is* mentioned in configparser.  If I'm touching What's 
New In Python 3.2, mind if I add a mention of that too?

--

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



[issue11649] startElementNS in xml.sax.saxutils.XMLGenerator ignored encoding

2011-03-25 Thread Gunnar Aastrand Grimnes

Gunnar Aastrand Grimnes gromg...@gmail.com added the comment:

I came across the bug when trying to write XML documents to StringIO objects. 
This does not work, since the output contains a mix of unicode and str objects, 
and StringIO gets confused. 

A better alternative is to use io.BytesIO, since all output should be encoded, 
but this also throws an error since it gets some unicode objects. 

The attached file breaks for both cases (comment/uncomment StringIO to test)

--
Added file: http://bugs.python.org/file21389/xmltest.py

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



[issue11667] 'configure' script overrides users setting of CFLAGS

2011-03-25 Thread David Kirkby

David Kirkby david.kir...@onetel.net added the comment:

Thank you. That solved it, so you can close this.

--
status: pending - open

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



[issue11667] 'configure' script overrides users setting of CFLAGS

2011-03-25 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc amaur...@gmail.com:


--
status: open - closed

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



[issue6006] ffi.c compile failures on AIX 5.3 with xlc

2011-03-25 Thread David Kirkby

David Kirkby david.kir...@onetel.net added the comment:

I've just downloaded libffi-3.0.9 (the latest) and it builds with no problems 
on my AIX 5.3 system. 

Is there any chance of the version of libffi in Python being updated?

--
nosy: +drkirkby

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



[issue11671] Potential misuse of wsgiref.headers.Headers

2011-03-25 Thread Felix Gröbert

New submission from Felix Gröbert groeb...@google.com:

As noted by secur...@python.org's response I'm filing this bug here.


In wsgiref.headers.Headers it is possible to include headers which
contain a newline (i.e. \n or \r) either through add_header or
__init__. It is not uncommon that developers provide web applications
to the public in which the HTTP response headers are not filtered for
newlines but are controlled by the user. In such scenarios a malicious
user can use a newline to inject another header or even initiate a
HTTP response body. The impact would be at least equivalent to XSS.
Therefore, I suggest to filter/warn/except header tuples which contain
the above characters upon assignment in wsgiref.headers.

--
components: Library (Lib)
messages: 132080
nosy: Felix.Gröbert
priority: normal
severity: normal
status: open
title: Potential misuse of wsgiref.headers.Headers
type: security
versions: Python 3.3

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



[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-25 Thread Davide Rizzo

Davide Rizzo sor...@gmail.com added the comment:

The bugs seems not to be limited to the REPL.

# Python 2.6 with readline on Mac OS X
$ python -c raw_input()
^Z
[1]+  Stopped python -c raw_input()
$ fg
python -c raw_input()
Traceback (most recent call last):
  File string, line 1, in module
EOFError


# Python 3.1 on Debian Linux
$ python3.1 -c print(input())
^Z
[1]+  Stopped python3.1 -c print(input())
$ fg
python3.1 -c print(input())
hello
hello


# Python 3.3(267578b2422d) without readline, OS X (I've put two extra printfs 
around fgets in myreadline.c)
$ ./python.exe -c print(input())
Entering fgets
^Z
[1]+  Stopped ./python.exe -c print(input())
$ fg
./python.exe -c print(input())
fgets returned 0
Traceback (most recent call last):
  File string, line 1, in module
EOFError
[36537 refs]


# same as before with Charles-Francois patch applied
$ ./python.exe -c print(input())
^Z
[1]+  Stopped ./python.exe -c print(input())
$ fg
./python.exe -c print(input())
hello
hello
[36538 refs]


Some remarks here:
1) the bug is in all tested versions running on OS X, and the patch does fix it.

2) I tested with and without GNU readline and input()'s behavior doesn't change 
when running with python -c (i.e. it uses myreadline.c instead of GNU 
readline). Though, if run interactively, input() uses readline.
Isn't input() supposed to use readline whenever reading from a tty, not only if 
called from the REPL? Or even if it were to fallback, shouldn't that be on 
TextIOWrapper(sys.stdin).readline()?

3) io module seems to be doing it right already. sys.stdin.read() raises an 
IOError (not an EOFError as input() incorrectly does, this is acceptable as a 
platform quirk) when interrupted, while sys.stdin.readline() handles the 
interruption without complaining at all.
Maybe myreadline.c is too old and wants to be replaced (or backed) by io in 3.3?

--

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



[issue2650] re.escape should not escape underscore

2011-03-25 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 1402c719b7cf by Ezio Melotti in branch '3.1':
#2650: Refactor the tests for re.escape.
http://hg.python.org/cpython/rev/1402c719b7cf

New changeset 9147f7ed75b3 by Ezio Melotti in branch '3.1':
#2650: Add tests with non-ascii chars for re.escape.
http://hg.python.org/cpython/rev/9147f7ed75b3

New changeset ed02db9921ac by Ezio Melotti in branch '3.1':
#2650: Refactor re.escape to use enumerate().
http://hg.python.org/cpython/rev/ed02db9921ac

New changeset 42ab3ebb8c2c by Ezio Melotti in branch '3.2':
#2650: Merge with 3.1.
http://hg.python.org/cpython/rev/42ab3ebb8c2c

New changeset 9da300ad8255 by Ezio Melotti in branch 'default':
#2650: Merge with 3.2.
http://hg.python.org/cpython/rev/9da300ad8255

--
nosy: +python-dev

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



[issue11654] errors in atexit hooks don't change process exit code

2011-03-25 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Comparing to the atexit() in C, I think this is the wrong behavior. I's weird 
that error in atexit does't change process exit code while error in common 
python code does. There should be a fix.

--
nosy: +ysj.ray

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



[issue2650] re.escape should not escape underscore

2011-03-25 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset d52b1faa7b11 by Ezio Melotti in branch '2.7':
#2650: Refactor re.escape and its tests.
http://hg.python.org/cpython/rev/d52b1faa7b11

--

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



[issue2650] re.escape should not escape underscore

2011-03-25 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

I did a few more tests and using a re.sub seems indeed slower (the 
implementation is just 4 lines though, and it's more readable):

wolf@hp:~/dev/py/3.1$ ./python -m timeit -s 'import re,string; escape_pattern = 
re.compile(([^\x00a-zA-Z0-9]))' 'escape_pattern.sub(r\\\1, 
string.printable).replace(\x00, \\000)'
1000 loops, best of 3: 219 usec per loop
wolf@hp:~/dev/py/3.1$ ./python -m timeit -s 'import re,string' 
're.escape(string.printable)'
1 loops, best of 3: 59.3 usec per loop
wolf@hp:~/dev/py/3.1$ ./python -c 'import re,string; escape_pattern = 
re.compile(([^\x00a-zA-Z0-9])); print(escape_pattern.sub(r\\\1, 
string.printable).replace(\x00, \\000) == re.escape(string.printable))'
True

wolf@hp:~/dev/py/3.1$ ./python -m timeit -s 'import re,string; escape_pattern = 
re.compile(b([^\x00a-zA-Z0-9])); s = string.printable.encode(ascii)' 
'escape_pattern.sub(br\\\1, s).replace(b\x00, b\\000)'
1000 loops, best of 3: 231 usec per loop
wolf@hp:~/dev/py/3.1$ ./python -m timeit -s 'import re,string; s = 
string.printable.encode(ascii)' 're.escape(s)'
1 loops, best of 3: 73.2 usec per loop
wolf@hp:~/dev/py/3.1$ ./python -c 'import re,string; escape_pattern = 
re.compile(b([^\x00a-zA-Z0-9])); s = string.printable.encode(ascii); 
print(escape_pattern.sub(br\\\1, s).replace(b\x00, b\\000) == 
re.escape(s))'
True

The .replace() doesn't seem to affect the affect the speed in any significant 
way.
I also did a few more tests:
 1) using enumerate();
 2) like 1) but also moving \x00 in the set of alnum chars, removing the if c 
== '\000' from the loop and using .replace(\x00, \\000) on the joined 
string;
 3) like 2) but also moving the loop in a genexp inside the join();

1) is the fastest (10-15% faster than the original), 2) is pretty much the same 
speed of 1), and 3) is slower, so I just changed re.escape to use enumerate() 
and refactored its tests in 2.7/3.1/3.2/3.3.

--

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



[issue11650] Faulty RESTART/EINTR handling in Parser/myreadline.c

2011-03-25 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

On Fri, Mar 25, 2011 at 12:25:21PM +, Davide Rizzo wrote:
 Some remarks here:
 1) the patch does fix it.

Yes!

I can't comment the rest except for what
.. function:: input([prompt])
states, which Davide surely have read himself.

Anyway it seems to be a good idea to replace parts of the code 
where such severe bugs can sleep for such a long time. 
This code will not be used automatically on, yes, *all* modern 
UNIX platforms (don't let me think on what modern means here). 

So if there are no dependencies i don't know of (but even without 
knowing i would think there should be none - this is readline), 
it seems that providing a simple Python-based fallback 
implementation, which will use functions which themselves will be 
used daily in real life, is a good idea.

--

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



[issue2650] re.escape should not escape underscore

2011-03-25 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

The attached patch (issue2650.diff) adds '_' to the list of chars that are not 
escaped.

--
keywords: +patch
Added file: http://bugs.python.org/file21390/issue2650.diff

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Thinking about this some more, I now think it is incorrect that an 8bit header 
causes getitem to return a Header object.  I think instead it should be 
returning the stringified version of the header, including the unknown-8bit 
encoding.  That way decode_header can be used as normal to recover the original 
bytes.

I hate making a change like this in a bug fix release, but in this case I think 
it is the right thing to do.  I will propose a patch soon.

--

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It is reasonably likely that the attached patch will fix this.  It also removes 
3 seconds of fixed overhead from the test.

--
keywords: +patch
nosy: +r.david.murray
stage:  - patch review
versions: +Python 2.7, Python 3.1, Python 3.3
Added file: http://bugs.python.org/file21391/test_mailbox_refresh.patch

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



[issue11647] function decorated with a context manager can only be invoked once

2011-03-25 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

Agreed with nick's idea, the implicitly recreation of the context managers 
would confuse users.

How about removing the generator must yield exactly one value restriction of 
@contextlib.contextmanage? Then if I want a generator to be used as a common 
context manager, I can make it yield exactly one value, else further if I want 
the resulting context manager can be used as a decorator, (reusable), I can put 
the generator code in a while True loop and add a yield at the end of loop 
body, like this:

@contextmanager
def func():
while True:
print('begin func')
yield
print('end func')
yield

:)

--
nosy: +ysj.ray

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

On Fri, Mar 25, 2011 at 01:51:46PM +, R. David Murray wrote:
 I now think it is incorrect that an 8bit header causes getitem 
 to return a Header object.
 I think instead it should be returning the stringified version 
 of the header, including the unknown-8bit encoding.

It seems to be much better to either return only strings or only 
objects. 
You've prominently documented that (in a model generated from 
bytes) objects are returned, and *DesignThoughts* states that 
*all* headers will be represented as objects in the upcoming 
package, so it's my guess that many people who are currently 
programming email things using Py3K go for Header. 

Thus, to give you a neat NONONO - why not simply allowing header 
objects for decode_header(), too?
:)

--
title: email.decode_header fails if msg.__getitem__ returns  Header object - 
email.decode_header fails if msg.__getitem__ returns Header object

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



[issue11654] errors in atexit hooks don't change process exit code

2011-03-25 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

A straight forward fix maybe making the interpreter exit code a static global 
variable and change it in Modules/atexitmodule.c:atexit_callfuncs() in the case 
of errors occurred.

--

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I documented that?  Where?

It is true that the fact that all headers will be objects when using the email6 
API was one reason I did it this way, but in hindsight I don't think it was the 
right choice.  However, I/we may now be stuck with it, in which case you are 
right, we could make decode_header just return the chunks from a Header object.

--

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



[issue11647] function decorated with a context manager can only be invoked once

2011-03-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Agreed with nick's idea, the implicitly recreation of the context
 managers would confuse users.

Uh, why would it? That's exactly what I expect the decorator to do, and
I was astonished to discover that it *doesn't*.

--

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

On Fri, Mar 25, 2011 at 02:29:24PM +, R. David Murray wrote:
 I documented that?  Where?

Changeset:   67447:cad1811d9e13
user:R. David Murray rdmur...@bitdance.com
date:Fri Jan 07 23:25:30 2011 +
summary: #10686: recode non-ASCII headers to 'unknown-8bit' instead of ?s.

It was a friday.
So, have a nice weekend.
:)

--

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



[issue11647] function decorated with a context manager can only be invoked once

2011-03-25 Thread Ray.Allen

Ray.Allen ysj@gmail.com added the comment:

  Agreed with nick's idea, the implicitly recreation of the context
  managers would confuse users.

 Uh, why would it? That's exactly what I expect the decorator to do, and
 I was astonished to discover that it *doesn't*.


Because there is no *OBVIOUS* code or sign which can illustrate that context 
manager changes from a one-shot to a reusable. When using in with statement, 
it's a one-shot, while using as a decorator, it becomes a reusable. I think the 
way using it doesn't provide enough reason for its behavior change. Is there 
somebody who may expected that the GeneratorContextManager IS a one-shot?

--

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Heh.

OK, so I think we're stuck with it, then.  It does mean I don't have to handle 
certain other edge cases, and can punt more convenient handling of them into 
email6.  I'll make the patch for decode_header instead, then.

--

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



[issue5482] RFC: improve distutils bdist_rpm so it builds pure python modules as single packages that works across architectures

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

To complement Terry’s closing message: bdist_rpm is frozen in distutils, 
removed in distutils2/packaging, but has a new life at 
https://bitbucket.org/tarek/pypi2rpm/

--
nosy: +eric.araujo

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



[issue1597850] Cross compiling patches for MINGW

2011-03-25 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
versions: +Python 3.3 -3rd party, Python 3.2

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

OK, here is the patch.

--
keywords: +patch
Added file: http://bugs.python.org/file21392/decode_Header.patch

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



[issue11647] function decorated with a context manager can only be invoked once

2011-03-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Because there is no *OBVIOUS* code or sign which can illustrate that
 context manager changes from a one-shot to a reusable.

I'm talking about the decorator, not the context manager. Surely there
is a way for the decorator to instantiate a new context manager each
time the decorated function is called? I may miss something, but it
doesn't sound like rocket science.

--

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:

On Fri, Mar 25, 2011 at 03:04:29PM +, R. David Murray wrote:
 OK, here is the patch.

Works fine at a first glance and for me - i see you didn't stuck :/. 
Say, though not belonging here, can you think of problems incurred 
in message.py:_sanitize_headers() due to

   if _has_surrogates(value):

instead of:

   if _has_surrogates_or_8bit(value):

I stumbled over that place somewhen but fixing it was no real 
help.

--

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



[issue3754] cross-compilation support for python build

2011-03-25 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo
versions: +Python 3.3 -Python 3.2

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



[issue3754] cross-compilation support for python build

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

I see some “fix for issue #NNN is bogus” in your patch: would you open separate 
bug reports for those?  A diff file is not a very useful way to report bugs or 
express opinions wink.

--

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



[issue8982] argparse docs cross reference Namespace as a class but the Namespace class is not documented

2011-03-25 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +eric.araujo
versions: +Python 3.3

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Well, on my new setup (Windows 7 VM with a Python checkout located on an SMB 
drive), the test sometimes passes and sometimes fails, regardless of the patch.
I suspect that maybe maildir requires atomicity guarantees that a network FS 
won't provide.

--

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



[issue1006238] cross compile patch

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

See also #3754.

Please remember that the bug tracker is meant to develop Python, not offer 
support about autoconf or patch(1).

--
nosy: +eric.araujo
versions: +Python 3.3 -Python 3.2

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



[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2011-03-25 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

I don't think this is worthy of being in whatsnew.
Feel free to update the other docs though.

--

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



[issue10914] Python sub-interpreter test

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Note that I think it would be a perfectly reasonable feature request to better 
isolate and improve the compiler in packaging/distutils2.  (This does not mean 
this issue should be delayed.)

--

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



[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2011-03-25 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee: docs@python - lukasz.langa
nosy: +lukasz.langa
versions: +Python 3.3

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



[issue11671] Security hole in wsgiref.headers.Headers

2011-03-25 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
assignee:  - pje
nosy: +pje
stage:  - needs patch
title: Potential misuse of wsgiref.headers.Headers - Security hole in 
wsgiref.headers.Headers
versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2

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



[issue11669] Clarify Lang Ref Compound statements footnote

2011-03-25 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
keywords: +needs review, patch
stage:  - patch review
versions:  -Python 2.5, Python 2.6, Python 3.4

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



[issue11393] Integrate faulthandler module into Python 3.3

2011-03-25 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Let's try the Remote hg repo feature.

--
hgrepos: +8

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



[issue11393] Integrate faulthandler module into Python 3.3

2011-03-25 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@haypocalc.com:


--
keywords: +patch
Added file: http://bugs.python.org/file21393/ec274420e9e2.diff

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



[issue11666] Test pydoc to display full help for named tuples

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

LGTM.  I’m not sure I’d add it in stable versions, though.

--
nosy: +eric.araujo

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Theoretically there should be no way to get bytes into that code path.  I'm 
sure there's a way if you try hard enough (I haven't tried directly assigning a 
byte string as a header value, for example), but they would be broken uses of 
the API.  If you have an identifiable bug, though, open an issue.

--

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



[issue11393] Integrate faulthandler module into Python 3.3

2011-03-25 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

Ok, here is a full patch tested on Linux and Windows:
 - Add faulthandler module (code, doc, tests) as a builtin module
 - Add -X faulthandler=1 command line option and PYTHONFAULTHANDLER=1 en var 
to enable the fault handler at startup
 - Add _Py_DumpTraceback() and _Py_DumpTracebackThreads() functions to 
Python/traceback.c
 - Py_FatalError() calls _Py_DumpTraceback() if there is not exception
 - Initialize/Unload faulthandler explicitly in Py_InitializeEx()/Py_Finalize() 
to do it in the right order

I added a section in the doc to explain the file descriptor issue.

I merged different .c and .h files into faulthandler.c, the code is easier to 
read and maintain like that.

I don't know if the following test is the best test to check if SIGARLM 
constant and alarm() function are available:

+#ifdef SIGALRM
+#  define FAULTHANDLER_LATER
+#endif

(The test works at least on Linux and Windows)

--

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



[issue11393] Integrate faulthandler module into Python 3.3

2011-03-25 Thread STINNER Victor

STINNER Victor victor.stin...@haypocalc.com added the comment:

(Reminder for me: add something to Doc/whatsnew/3.3.rst and Misc/NEWS)

--

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

That could be, certainly.  The code is depending on the mtime having a 
resolution of at least one second.  Try making the constant 61 instead of 60.  
If that doesn't work, try putting the mtime back a lot farther and see if that 
makes it work  If it passes with that change then it could be the assumptions 
made by the code are also incorrect.

--

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



[issue11340] test_distutils fails

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Can you run “./python -m distutils.tests.test_archive_util”?  We may get more 
output.

--

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



[issue11665] Regexp findall freezes

2011-03-25 Thread Matthew Barnett

Matthew Barnett pyt...@mrabarnett.plus.com added the comment:

Alex is correct.

This part:

[^]*

can match an empty string, and it's nested with a repeated group. It stalls, 
repeatedly matching an empty string.

Incidentally, my regex implementation (available on PyPI) returns [].

--

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



[issue11670] configparser read_file now iterates over f, docs still say it calls readline

2011-03-25 Thread Łukasz Langa

Łukasz Langa luk...@langa.pl added the comment:

Ouch, this would be my fault. I agree with Raymond, at this point I think we 
should only update the docs.

--

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Indeed, 61 seems to work. I don't understand the comment about one-second 
granularity, shouldn't it be one-minute? (or why do you need 61?)

--

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



[issue5845] rlcompleter should be enabled automatically

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Ned, does readline.read_init_file() with libedit?

--
versions:  -Python 3.2

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



[issue11664] Add patch method to unittest.TestCase

2011-03-25 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Hmm.  You are right, I wasn't thinking clearly, and I copied that mtime setting 
call from another test.  Now I have no idea why 61 would work, unless the clock 
between your virthost and your smb server is off by a minute?

--

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



[issue11640] Shelve references globals in its __del__ method

2011-03-25 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Hmm.  You are right, I wasn't thinking clearly, and I copied that
 mtime setting call from another test.  Now I have no idea why 61 would
 work, unless the clock between your virthost and your smb server is
 off by a minute?

No, they seem exactly synchronized.

--

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



[issue5845] rlcompleter should be enabled automatically

2011-03-25 Thread Ned Deily

Ned Deily n...@acm.org added the comment:

readline.read_init_file() does work with libedit.  The directives read have to 
be in libedit format.

--

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Could you print out the mtime values that are being set, and the value of 
self._mbox._last_read?  Or, rather, print out the result of calls to 
os.path.getmtime on the two directories after the mtime is changed.

--

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



[issue11600] PY_CFLAGS and PY_CPPFLAGS inconsistent

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Ditto for sysconfig.

--
nosy: +benjamin.peterson, jcea, ronaldoussoren

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



[issue11614] import __hello__ is broken in Python 3

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

What’s import __hello__?  I don’t have it in any version from 2.4 to 3.2.

--
nosy: +eric.araujo

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



[issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

get_makefile_filename also fails when run from a checkout.

--

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



[issue11667] 'configure' script overrides users setting of CFLAGS

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Is this worth a README or doc update?

--
nosy: +eric.araujo

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

before: os.path.getmtime('cur') = 1301075411.6942866
before: os.path.getmtime('new') = 1301075411.693287
after: os.path.getmtime('cur') = 1301075347.38
after: os.path.getmtime('new') = 1301075347.38
self._box._last_read = 1301075407.365
time.time() = 1301075408.395

(the test passed here)

--

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



[issue11614] import __hello__ is broken in Python 3

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Okay, it doesn’t work with -m __hello__, but using -c import __hello__ I can 
see the message in all versions.

--

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



[issue10617] Collections ABCs can’t be linked to

2011-03-25 Thread Ezio Melotti

Ezio Melotti ezio.melo...@gmail.com added the comment:

I put the list under the table and grouped a few more ABCs. If this patch is OK 
I'll commit it.

--
Added file: http://bugs.python.org/file21394/issue10617-2.diff

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



[issue11071] What's New review comments

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

“unencoded” is still here.

--
status: closed - open

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Hmm.  411-61=350.  Three seconds difference looks a little odd.  But doesn't 
explain 60 vs 61 making the difference in the test.

Can you change it back to 60 (or even less) and see what the values look like 
when the test fails?

It is interesting (and possibly meaningful) that the last modified time 
'before' appears to be in the future compared to time.time by 3-plus seconds.  
That would at least explain why the test fails without the patch.

--

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



[issue10617] Collections ABCs can’t be linked to

2011-03-25 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


Added file: http://bugs.python.org/file21395/10617-2.png

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



[issue11614] import __hello__ is broken in Python 3

2011-03-25 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue10617] Collections ABCs can’t be linked to

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

What about making the class names in the table not links?

--

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



[issue11671] Security hole in wsgiref.headers.Headers

2011-03-25 Thread Phillip J. Eby

Phillip J. Eby p...@telecommunity.com added the comment:

 It is not uncommon that developers provide web applications
to the public in which the HTTP response headers are not filtered for
newlines but are controlled by the user.

Really?  Which applications, and which response headers?

 Therefore, I suggest to filter/warn/except header tuples which contain
the above characters upon assignment in wsgiref.headers.

Applications that send them are not WSGI compliant anyway, since the spec 
forbids control characters in header strings -- and wsgiref.validate already 
validates this.

Still, I'm not aware of any legitimate use case for apps sending user input as 
an HTTP header where the data wouldn't already be escaped in some fashion -- 
cookies, URLs, ...?

--

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

 Hmm.  411-61=350.  Three seconds difference looks a little odd.  But
 doesn't explain 60 vs 61 making the difference in the test.
 
 Can you change it back to 60 (or even less) and see what the values
 look like when the test fails?

Hmm, 60 doesn't fail anymore so I changed it to 1 (!) and here is the
result:

before: os.path.getmtime('cur') = 1301078411.882165
before: os.path.getmtime('new') = 1301078411.8801715
after: os.path.getmtime('cur') = 1301078410.802999
after: os.path.getmtime('new') = 1301078410.802999
self._box._last_read = 1301078410.787
time.time() = 1301078411.818

(it fails obviously)

 It is interesting (and possibly meaningful) that the last modified
 time 'before' appears to be in the future compared to time.time by
 3-plus seconds.  That would at least explain why the test fails
 without the patch.

Yep, although the drift is varying. Sometimes small, sometimes big. At
this point I think it's just caused by my setup (the fact that VM and
host aren't always synchronized - I once witnessed time advancing
quicker on the VM than on the host! -, and the fact that a network FS is
used).

--

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

All right, so how about I set the add factor to, say, 5, so that if things are 
mostly in sync it will succeed, and otherwise just ignore your failures :)

--

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



[issue1006238] cross compile patch

2011-03-25 Thread Jacob Godserv

Jacob Godserv jacobgods...@gmail.com added the comment:

I have two questions:

Will a new developer be assigned to this bug?
And, why are we wasting comments and grave-digging five-year-old discussions?

--

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



[issue11664] Add patch method to unittest.TestCase

2011-03-25 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
nosy: +brett.cannon

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



[issue1006238] cross compile patch

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

 Will a new developer be assigned to this bug?
If someone is willing to take charge, yes.  We’re all volunteers, with varying 
free time and skill sets.  For example, I’m not an expert about compilation, so 
I try to learn thanks to those issues.

 why are we wasting comments and grave-digging five-year-old discussions?
Comments are not a scarce resource, it’s okay.  An unclosed bug, even that old, 
is still something to act upon: declare it superseded, outdated, rejected or 
fix it.  This happens all the time.

--

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



[issue11644] Cross-link 2to3 documentation, what’s new and pyporting howto

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

See also the fifth piece in 
http://docs.python.org/release/3.2/howto/pyporting#universal-bits-of-advice

Resources are here, but lack links.

--
resolution: out of date - 
stage:  - needs patch
status: pending - open
title: 2to3 documentation should mention that the sample file requires 2.6 or 
better - Cross-link 2to3 documentation, what’s new and pyporting howto
versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3

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



[issue11572] bring Lib/copy.py to 100% coverage

2011-03-25 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
keywords: +needs review
stage:  - patch review

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



[issue1006238] cross compile patch

2011-03-25 Thread Mike Frysinger

Mike Frysinger vap...@users.sourceforge.net added the comment:

i really dont understand your point.  python uses autoconf and therefore any 
questions about python's usage of autoconf to accomplish cross-compiles is 
completely valid here.

no one was asking for general autoconf help.

--

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



[issue1006238] cross compile patch

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

It seemed to me that there were quite a number of messages asking about how to 
apply the patch and what to do after the configure step.

--

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



[issue11572] bring Lib/copy.py to 100% coverage

2011-03-25 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Thanks for the updated patch.

-t = getattr(types, CodeType, None)
-if t is not None:
-d[t] = _copy_immutable
+d[types.CodeType] = _copy_immutable

What was the use case for this again?  The defunct restricted mode, another VM 
or something else?  IOW, are we sure this change isn’t going to break something?

+def _copy_with_copy_method(x):
+return x.copy()
+d[PyStringMap] = _copy_with_copy_method  # for Jython

Could even just be d[PyStringMap] = PyStringMap.copy

--

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset b21fdfa0019c by R David Murray in branch '3.2':
#11584: Since __getitem__ returns headers, make decode_header handle them.
http://hg.python.org/cpython/rev/b21fdfa0019c

New changeset 12e39cd7a0e4 by R David Murray in branch 'default':
Merge #11584: Since __getitem__ returns headers, make decode_header handle them.
http://hg.python.org/cpython/rev/12e39cd7a0e4

--
nosy: +python-dev

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



[issue11584] email.decode_header fails if msg.__getitem__ returns Header object

2011-03-25 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


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

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



[issue11071] What's New review comments

2011-03-25 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset a805d4415e34 by Raymond Hettinger in branch '3.2':
Issue  #11071: Fix whatsnew description of O/S access to raw bytes.
http://hg.python.org/cpython/rev/a805d4415e34

New changeset df1a1774a544 by Raymond Hettinger in branch 'default':
Issue  #11071: Fix whatsnew description of O/S access to raw bytes.
http://hg.python.org/cpython/rev/df1a1774a544

--
nosy: +python-dev

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



[issue11071] What's New review comments

2011-03-25 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
status: open - closed

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



[issue11672] multiprocessing.Array fails if size parameter is a long

2011-03-25 Thread Mark Dickinson

New submission from Mark Dickinson dicki...@gmail.com:

[From a problem encountered by an EPD user, analyzed by Robert Kern]

There appears to be an

if isinstance(size_or_initializer, (int, long)):

check in the Python 2.x source for multiprocessing.RawArray. As a result, the 
following works (as expected):

Python 2.7.1+ (2.7:24179f82b7de, Mar 25 2011, 19:11:09) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type help, copyright, credits or license for more information.
 import multiprocessing
[49842 refs]
 multiprocessing.Array('i', 2)
SynchronizedArray wrapper for multiprocessing.sharedctypes.c_int_Array_2 
object at 0x10073aae0
[65598 refs]

But replacing the '2' with a '2L' makes it fail:

 multiprocessing.Array('i', 2L)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /Users/mdickinson/Python/cpython/Lib/multiprocessing/__init__.py, line 
260, in Array
return Array(typecode_or_type, size_or_initializer, **kwds)
  File /Users/mdickinson/Python/cpython/Lib/multiprocessing/sharedctypes.py, 
line 113, in Array
obj = RawArray(typecode_or_type, size_or_initializer)
  File /Users/mdickinson/Python/cpython/Lib/multiprocessing/sharedctypes.py, 
line 85, in RawArray
type_ = type_ * len(size_or_initializer)
TypeError: object of type 'long' has no len()
[65655 refs]

--
components: Library (Lib)
messages: 132143
nosy: mark.dickinson
priority: normal
severity: normal
stage: needs patch
status: open
title: multiprocessing.Array fails if size parameter is a long
type: behavior
versions: Python 2.7

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



[issue11673] RawArray does not accept long

2011-03-25 Thread Robert Kern

New submission from Robert Kern robert.k...@gmail.com:

The constructor for multiprocessing.RawArray() takes an argument that is either 
an integer size or a sequence to initialize the contents. To determine if the 
argument is a size, it uses isinstance(x, int). This means that integers that 
happen to be Python longs cause an error. On Win64 systems, Python ints are 
still 32-bits, so valid sizes for arrays sometimes must be represented by 
Python longs.

Attached is a patch that uses operator.index() to determine if the object can 
be used as an integer size.

--
components: Library (Lib)
files: raw-array-long.diff
keywords: patch
messages: 132144
nosy: Robert.Kern
priority: normal
severity: normal
status: open
title: RawArray does not accept long
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file21396/raw-array-long.diff

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



[issue11672] multiprocessing.Array fails if size parameter is a long

2011-03-25 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Duplicate of issue 11673 :-)

--
resolution:  - duplicate
superseder:  - RawArray does not accept long

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



[issue11672] multiprocessing.Array fails if size parameter is a long

2011-03-25 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
status: open - closed

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



[issue11673] RawArray does not accept long

2011-03-25 Thread Mark Dickinson

Mark Dickinson dicki...@gmail.com added the comment:

Thanks for the patch.

Are there practical cases where the operator.index check is more useful that 
the isinstance(..., (int, long)) check that you originally proposed 
(off-tracker)?  While I agree that it's the right fix in principle, the 
operator.index check smells a bit like new functionality to me, and risks 
changing behaviour for those (rare, I hope) user-defined classes that implement 
both __index__ and sequence methods.

--
nosy: +mark.dickinson

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



[issue11673] RawArray does not accept long

2011-03-25 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
assignee:  - mark.dickinson
stage:  - commit review

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



[issue11673] RawArray does not accept long

2011-03-25 Thread Mark Dickinson

Changes by Mark Dickinson dicki...@gmail.com:


--
nosy: +jnoller

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



[issue11659] Fix ResourceWarning in test_subprocess

2011-03-25 Thread Nadeem Vawda

Nadeem Vawda nadeem.va...@gmail.com added the comment:

Looks good to me.

 [...] but I couldn't find any patches that fix this specific issue.

Well, test_select_unbuffered() was only introduced a few days ago (changeset
cb148da52c47), so I'm not surprised :)

--
nosy: +nvawda

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread Roundup Robot

Roundup Robot devnull@devnull added the comment:

New changeset 9a184d8211f5 by R David Murray in branch '3.1':
#9557: eliminate 3 seconds of static overhead from test_mailbox.
http://hg.python.org/cpython/rev/9a184d8211f5

New changeset 268ab32a89a9 by R David Murray in branch '3.2':
Merge #9557: eliminate 3 seconds of static overhead from test_mailbox.
http://hg.python.org/cpython/rev/268ab32a89a9

New changeset 03c7a83bbdd3 by R David Murray in branch 'default':
Merge #9557: eliminate 3 seconds of static overhead from test_mailbox.
http://hg.python.org/cpython/rev/03c7a83bbdd3

--
nosy: +python-dev

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



[issue9557] test_mailbox failure under a Windows VM

2011-03-25 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Antoine agreed in IRC that this was an acceptable closure.

--
stage: patch review - committed/rejected
status: open - closed

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



[issue5845] rlcompleter should be enabled automatically

2011-03-25 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
hgrepos: +9

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



  1   2   >