[issue11787] File handle leak in TarFile lib

2011-04-09 Thread Lars Gustäbel

Changes by Lars Gustäbel :


--
assignee:  -> lars.gustaebel

___
Python tracker 

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



[issue11776] types.MethodType() params and usage is not documented

2011-04-09 Thread Georg Brandl

Georg Brandl  added the comment:

When we do document types, their constructors and methods should also be 
documented.  This is a valid request.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue11806] Missing 2 hyphens in the docs

2011-04-09 Thread Boštjan Mejak

New submission from Boštjan Mejak :

Please see  http://docs.python.org/py3k/library/argparse.html#module-argparse  
and read the first sentence which goes...

"The argparse module makes it easy to write user friendly command line 
interfaces."

Please fix this to...

"The argparse module makes it easy to write user-friendly command-line 
interfaces."

Note: "user friendly" --> "user-friendly"
  "command line" --> "command-line"

--
assignee: docs@python
components: Documentation
messages: 133377
nosy: Retro, docs@python
priority: normal
severity: normal
status: open
title: Missing 2 hyphens in the docs
versions: Python 3.2, Python 3.3, Python 3.4

___
Python tracker 

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



[issue11796] Comprehensions in a class definition mostly cannot access class variable

2011-04-09 Thread Menno Smits

Menno Smits  added the comment:

Thanks to everyone for the explanations.

I was hoping for behaviour along the lines of Python 2 (certainly not 
artificially blocking more cases in the name of consistency) but it doesn't 
look like that's going to happen. I think this is one slight and rare area 
where Python 3 has taken a step backwards when compared to Python 2 but I can 
live with it. As noted there's other ways to achieve the same thing.

The new Python 3 behaviour seems odd to me but perhaps that's just a bias due 
to many years of development with Python 2. A documentation improvement would 
help. 

Thanks.

--

___
Python tracker 

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



[issue11807] Documentation of add_subparsers lacks information about parametres

2011-04-09 Thread Filip Gruszczyński

New submission from Filip Gruszczyński :

In argparse documentation parametres of add_subparsers are not listed. And yet 
there are some really useful parametres like parser_class. It would be useful, 
it they were described there well and one wouldn't have to look into the code 
to find them :-) I'll be happy to provide documentation patch tomorrow.

--
assignee: docs@python
components: Documentation
messages: 133379
nosy: docs@python, gruszczy
priority: normal
severity: normal
status: open
title: Documentation of add_subparsers lacks information about parametres
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



[issue11807] Documentation of add_subparsers lacks information about parametres

2011-04-09 Thread Filip Gruszczyński

Changes by Filip Gruszczyński :


--
nosy: +bethard

___
Python tracker 

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



[issue9904] Cosmetic issues that may warrant a fix in symtable.h/c

2011-04-09 Thread Nick Coghlan

Nick Coghlan  added the comment:

+1 for clarifying the comments. Adding comments for the apparently unused 
fields (as per my last tracker comment) would be good, too.

--

___
Python tracker 

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



[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

On Fri, Apr 08, 2011 at 09:03:51PM +, Torsten Becker wrote:
> I was about to look into this over the weekend, but of course I don't
> want to steal your fun, Steffen. :)

Toll, toll, toll!!
Still cherry blossom, thanks to the weather, apple blossom 
started, more than 20 degrees.
I really understand if a young german man rather prefers staying 
at home over the weekend, looking at its beautiful, intelligent 
chancellor whenever the TV is started, than doing whatever else!

Dear god, all these nice memories ...
14" BW CRT monitors, 30 hours at a time ...
Have a nice weekend!

--

___
Python tracker 

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



[issue11770] inspect.dir_static

2011-04-09 Thread Michael Foord

Michael Foord  added the comment:

Thanks for the patch Andreas. On a quick read through it looks good. I'll do a 
proper review shortly.

--

___
Python tracker 

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



[issue11782] email.generator.Generator.flatten() fails

2011-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

On Fri, Apr 08, 2011 at 11:39:36PM +, Terry J. Reedy wrote:
> 1. What is a minimal msgdata that gives the same error; post it.

Stepping a bit..  Remove 'Content-Type' header field and this does 
not crash.  Thus the real problem may again lie in get_payload() 
trying to convert data instead of leaving it alone. 
I'll try to instrument the path a bit ..

import email, email.parser, email.generator, io, textwrap
msgdata = textwrap.dedent("""\
Date: Mon, 01 Feb 2010 12:21:16 +0100
From: "three" 
To: 
Subject: Content-Type crash
Content-Type: message/rfc822

Remove Content-Type header field and no crash happens!
""").encode('ascii')
msg = email.parser.BytesParser().parsebytes(msgdata, headersonly=True)
email.generator.BytesGenerator(io.BytesIO()).flatten(msg)

--

___
Python tracker 

___
___
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-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Ping!
Note that whatever reason caused jesstess, to name a few,
to drop that loop (and the continue), Charles-Francois posted
a correctly working patch!
I have no idea why such a severe bug could sleep in code which is
executed for each and every input(), but it needs to be fixed!

Do you want a robot test?
I've tested it dozens of times and it still works fine!!
It's idiot-proof!
(And i definitely have no time in my free-time to write an
automated test which fiddles around with timeout values
and such to simulate user input.
To me all of this is mystic.
There are almost 14000 *registered* Python users here!!)

--

___
Python tracker 

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



[issue11700] mailbox.py proxy updates

2011-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

..
> So here is the rewritten .yeah-2.diff. 
..
> I added more tests (i'm absolutely convinced that the tests i've 
> found in test_mailbox.py really find all the cutting edges <;). 
> On my box this is clean. 

Haha, now this is *very* funny!

__
Traceback (most recent call last):
...
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/email/parser.py", line 104, 
in parse
return self.parser.parse(fp, headersonly)
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/mailbox.py", line 1900, in 
flush
raise io.UnsupportedOperation('flush')
Exception: io.UnsupportedOperation: flush
__

So, don't ask me why anyone tries to flush a readonly ProxyFile! 
BytesParser wraps this in TextIO, and in Modules/_io/textio.c i find:

c_STRVAR(textiowrapper_doc,
"\n"
"If line_buffering is True, a call to flush is implied when a call to\n"
"write contains a newline character."
);
..
typedef struct
{
..
/* Reads and writes are internally buffered in order to speed things up.
   However, any read will first flush the write buffer if itsn't empty.
..
} textio;

No reason to call flush. 
So i replaced flush() and got this:

__
...
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/email/parser.py", line 104, 
in parse
return self.parser.parse(fp, headersonly)
  File "/Users/steffen/usr/opt/py3k/lib/python3.3/email/parser.py", line 48, in 
parse
data = fp.read(8192)
Exception: AttributeError: '_PartialFile' object has no attribute 'read1'
__

Nice.  It seems that deriving _ProxyFile from io.RawIOBase will 
not work correctly with the current EMail package because 
BytesParser uses TextIOWrapper expects io.BufferedIOBase. 
Regardless of the fact i think TextIOWrapper should be 
configurable not to close the "buffer" - s...!

Anyway, it's seems not to be practical to implement ProxyFile 
*correctly*.  Therefore i'll attach yeah-3.diff which falsely 
ignores calls to flush(). 
To make this s... rock it is now also derived from 
io.BufferedIOBase, thus i've reintroduced read1() which - true - 
is now also tested!  *YES IT CAN*!
Nice weekend.

--
Added file: http://bugs.python.org/file21592/11700.yeah-3.diff

___
Python tracker 

___diff --git a/Lib/mailbox.py b/Lib/mailbox.py
--- a/Lib/mailbox.py
+++ b/Lib/mailbox.py
@@ -1864,97 +1864,145 @@
 """Message with MMDF-specific properties."""
 
 
-class _ProxyFile:
-"""A read-only wrapper of a file."""
+class _ProxyFile(io.BufferedIOBase):
+"""A io.BufferedIOBase inheriting read-only wrapper for a seekable file.
+It supports __iter__() and the context-manager protocol.
+"""
+def __init__(self, file, pos=None):
+"""If pos is not None then the file will keep track of its position."""
+io.RawIOBase.__init__(self)
+self._file = file
+self._pos = file.tell() if pos is None else pos
+self._close = True
+self._is_open = True
 
-def __init__(self, f, pos=None):
-"""Initialize a _ProxyFile."""
-self._file = f
-if pos is None:
-self._pos = f.tell()
+def _set_noclose(self):
+"""Subclass hook - use to avoid closing internal file object."""
+self._close = False
+
+def _closed_check(self):
+"""Raise ValueError if not open."""
+if not self._is_open:
+raise ValueError('I/O operation on closed file')
+
+def close(self):
+if self._close:
+self._close = False
+self._file.close()
+del self._file
+self._is_open = False
+
+@property
+def closed(self):
+return not self._is_open
+
+def flush(self):
+# Not possible because it gets falsely called (issue 11700)!
+#raise io.UnsupportedOperation('flush')
+pass
+
+def _read(self, size, read_method, readinto_arg=None):
+if size is None or size < 0:
+size = -1
+self._file.seek(self._pos)
+if not readinto_arg:
+result = read_method(size)
 else:
-self._pos = pos
+if size < len(readinto_arg):
+del readinto_arg[size:]
+result = read_method(readinto_arg)
+if result < len(readinto_arg):
+del readinto_arg[result:]
+self._pos = self._file.tell()
+return result
 
-def read(self, size=None):
-"""Read bytes."""
+def readable(self):
+self._closed_check()
+return True
+
+def read(self, size=-1):
+self._closed_check()
+if size is None or size < 0:
+return self.readall()
 return self._read(size, self._file.read)
 
-def read1(self, size=None):
-"""Read bytes."""
+def read1(self, size=-1):
+self._closed_check()
+if size is None or size < 0:
+return b''
  

[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-09 Thread Éric Araujo

Changes by Éric Araujo :


Removed file: http://bugs.python.org/file21585/filecmp-lru-cache-2.7.diff

___
Python tracker 

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-09 Thread Éric Araujo

Éric Araujo  added the comment:

Why use an ordered dict instead of functools.lru_cache?

--
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



[issue6040] bdist_msi does not deal with pre-release version

2011-04-09 Thread Éric Araujo

Éric Araujo  added the comment:

Well, this is the bug tracker for the stdlib.  We have first to define clearly 
what the bug is, then find how to fix it in packaging (the name of distutils2 
merged into 3.3), then decide whether to backport it to distutils.  Half-tested 
recipes to work-around the bug on unpatched versions divert attention and are 
out of place.

--

___
Python tracker 

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



[issue11805] package_data only allows one glob per-package

2011-04-09 Thread Éric Araujo

Éric Araujo  added the comment:

What’s the syntax described in the docs?

  package_data =
  mypackage = templates/*.html static/css/*.css

or

  package_data =
  mypackage = templates/*.html
  mypackage = static/css/*.css

?

On a related subject, I think the new resources system should obsolete 
data_files and package_data.  Putting files in arbitrary, OS-specific places 
(data_files) or alongside the Python files (package_data) was wrong, let’s move 
away from that.

--
versions: +3rd party, Python 3.3

___
Python tracker 

___
___
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-04-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset f343ac51 by Victor Stinner in branch '3.1':
Issue #11650: PyOS_StdioReadline() retries fgets() if it was interrupted
http://hg.python.org/cpython/rev/f343ac51

New changeset fc2f251e660a by Victor Stinner in branch '3.2':
(Merge 3.1) Issue #11650: PyOS_StdioReadline() retries fgets() if it was
http://hg.python.org/cpython/rev/fc2f251e660a

New changeset 64de1ded0744 by Victor Stinner in branch 'default':
(Merge 3.2) Issue #11650: PyOS_StdioReadline() retries fgets() if it was
http://hg.python.org/cpython/rev/64de1ded0744

--
nosy: +python-dev

___
Python tracker 

___
___
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-04-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 7febd5ef7619 by Victor Stinner in branch '2.7':
(Merge 3.1) Issue #11650: PyOS_StdioReadline() retries fgets() if it was
http://hg.python.org/cpython/rev/7febd5ef7619

--

___
Python tracker 

___
___
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-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

Merci, STINNER Victor!

--

___
Python tracker 

___
___
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-04-09 Thread STINNER Victor

STINNER Victor  added the comment:

I emulated Mac OS X behaviour on Linux by hacking my_fgets(): do { p=NULL; 
errno = EINTR; }, only after the first call to fgets(). Without the patch, 
Python does exit immediatly. With the patch, Python doesn't exit.

I applied neologix's patch to 3.1, 3.2, 3.3 and 2.7: thank you Charles-Francois!

Can someone retest on Mac OS X?

I noticied a strange behaviour:
--
$ python
>>> 1+^Z
[1]+  Stopped ./python
$ fg
./python
2
2
--
"1+2" input becomes "2". But we can not do better because buf doesn't contain 
"1+\0" when fgets() is interrupted.

Note: If the readline module is available, it is used, and readline doesn't 
have this issue. And "1+^Z(...)2" gives 3 with readline.

--

___
Python tracker 

___
___
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-04-09 Thread Davide Rizzo

Davide Rizzo  added the comment:

Victor, I have neither OS X nor Linux available right now, but if I remember 
correctly the same happens on both systems when programs call input() (but not 
from the REPL). See also my previous message with "python -c" tests and my 
second remark.

What about the Pexpect based tests? Could it be interesting to Python to test 
the behavior on the terminal?

About the committed patch: is it the right thing to do to call PyOS_InputHook 
at every restart?

Thank you!

--

___
Python tracker 

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-09 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

Because the lru_cache decorator doesn't provide any way to invalidate
stale cache entries.

Perhaps I should factor out the duplicated code into a separate class
that can then also be exposed to users of the stdlib. But that would only
apply to 3.3, so the uglier fix is still necessary for older versions.

--

___
Python tracker 

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



[issue11808] $MACOSX_DEPLOYMENT_TARGET mismatch ... during configure

2011-04-09 Thread Steffen Daode Nurpmeso

New submission from Steffen Daode Nurpmeso :

Hello Mac OS X gurus, if i


else
DEBUG='--with-pydebug'
echo Using --with-pydebug
fi
./configure --prefix="$HOME/usr/opt/$PREFIX" $DEBUG
make -j2 all


i get this


/usr/bin/gcc -c -fno-strict-aliasing -g -O0 -Wall -Wstrict-prototypes -O2 -O2  
-I. -IInclude -I./Include-DPy_BUILD_CORE \
  -DHGVERSION="\"`LC_ALL=C hg id -i .`\"" \
  -DHGTAG="\"`LC_ALL=C hg id -t .`\"" \
  -DHGBRANCH="\"`LC_ALL=C hg id -b .`\"" \
  -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c
Traceback (most recent call last):
  File "/Users/steffen/usr/lib/python2.7/site.py", line 563, in 
main()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 545, in main
known_paths = addusersitepackages(known_paths)
  File "/Users/steffen/usr/lib/python2.7/site.py", line 278, in 
addusersitepackages
user_site = getusersitepackages()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 253, in 
getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File "/Users/steffen/usr/lib/python2.7/site.py", line 243, in getuserbase
USER_BASE = get_config_var('userbase')
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 535, in 
get_config_var
return get_config_vars().get(name)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 434, in 
get_config_vars
_init_posix(_CONFIG_VARS)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 313, in _init_posix
raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.6" during 
configure
Traceback (most recent call last):
  File "/Users/steffen/usr/lib/python2.7/site.py", line 563, in 
main()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 545, in main
known_paths = addusersitepackages(known_paths)
  File "/Users/steffen/usr/lib/python2.7/site.py", line 278, in 
addusersitepackages
user_site = getusersitepackages()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 253, in 
getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File "/Users/steffen/usr/lib/python2.7/site.py", line 243, in getuserbase
USER_BASE = get_config_var('userbase')
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 535, in 
get_config_var
return get_config_vars().get(name)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 434, in 
get_config_vars
_init_posix(_CONFIG_VARS)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 313, in _init_posix
raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.6" during 
configure
Traceback (most recent call last):
  File "/Users/steffen/usr/lib/python2.7/site.py", line 563, in 
main()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 545, in main
known_paths = addusersitepackages(known_paths)
  File "/Users/steffen/usr/lib/python2.7/site.py", line 278, in 
addusersitepackages
user_site = getusersitepackages()
  File "/Users/steffen/usr/lib/python2.7/site.py", line 253, in 
getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File "/Users/steffen/usr/lib/python2.7/site.py", line 243, in getuserbase
USER_BASE = get_config_var('userbase')
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 535, in 
get_config_var
return get_config_vars().get(name)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 434, in 
get_config_vars
_init_posix(_CONFIG_VARS)
  File "/Users/steffen/usr/lib/python2.7/sysconfig.py", line 313, in _init_posix
raise IOError(msg)
IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.6" during 
configure

--
components: Build
messages: 133395
nosy: ned.deily, ronaldoussoren, sdaoden
priority: normal
severity: normal
status: open
title: $MACOSX_DEPLOYMENT_TARGET mismatch ... during configure
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



[issue11808] $MACOSX_DEPLOYMENT_TARGET mismatch ... during configure

2011-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

P.S.: this does not happen if i use


./configure --prefix="$HOME/usr/opt/$PREFIX" $DEBUG 
MACOSX_DEPLOYMENT_TARGET=10.6

--

___
Python tracker 

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



[issue11808] $MACOSX_DEPLOYMENT_TARGET mismatch ... during configure

2011-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

The problem goes away if i comment out all
the Mercurial queries in Makefile:


HGVERSION=  #hg id -i $(srcdir)
HGTAG=  #hg id -t $(srcdir)
HGBRANCH=   #hg id -b $(srcdir)

--

___
Python tracker 

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I question whether this should be backported.  Please discuss with the RM.

--

___
Python tracker 

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



[issue11808] $MACOSX_DEPLOYMENT_TARGET mismatch ... during configure

2011-04-09 Thread Ned Deily

Ned Deily  added the comment:

Thanks for the report.  This is another case of the problem described in 
Issue9516, in particular msg130666 except now it is hg invoking another Python 
during the build process.  The sysconfig part of the patch for Issue9516 
applied to the "build" Python 2.7 used by hg will avoid the problem.  Or, as 
you found, as a workaround, ensure that the MACOSX_DEPLOYMENT_TARGET of the 
"build" Python matches that of the Python being built.  It's also only a 
problem if the "build" Python is 2.7 or 3.2.

By the way, since you've asked about it before, MACOSX_DEPLOYMENT_TARGET is a 
standard feature of the Apple gcc tool chain and is used to support builds for 
multiple versions.  See -mmacosx-version-min in the OS X man (1) gcc and 
http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html

--
assignee:  -> ned.deily
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> sysconfig: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.3" but 
"10.5" during configure

___
Python tracker 

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



[issue6040] bdist_msi does not deal with pre-release version

2011-04-09 Thread anatoly techtonik

anatoly techtonik  added the comment:

Feel free to copy this report for a clear user story - 
http://twistedmatrix.com/trac/ticket/5024

--

___
Python tracker 

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



[issue11802] filecmp.cmp needs a documented way to clear cache

2011-04-09 Thread Nadeem Vawda

Nadeem Vawda  added the comment:

> I question whether this should be backported.  Please discuss with the RM.

Will do. Are you referring specifically to 2.7, or to 3.1 and 3.2 as well?

--

___
Python tracker 

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



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

2011-04-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

OS X filesystem does not support seeking ahead to create sparse files.
The test is supposed to skip the LargeMmapTests on OS X and Windows with (line 
679 of test_mmap.py):

if sys.platform[:3] == 'win' or sys.platform == 'darwin':
   requires('largefile', 'test requires %s bytes and a long time to run' % 
str(0x18000))

Perhaps on the Snow Leopard buildbot something causes this line not to become 
true (what does sys.platform give on the buildbot)?

As for why its creating the file slowly (encrypted fs?), I don't know but the 
test shouldn't be running anyway...

--
nosy: +rosslagerwall

___
Python tracker 

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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Georg, would you opine on whether this should to into 3.2.1?

--
status: closed -> open

___
Python tracker 

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



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

2011-04-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Well, buildbots run tests with "-uall", so the "largefile" resource gets 
enabled.

--
nosy: +pitrou

___
Python tracker 

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



[issue11805] package_data only allows one glob per-package

2011-04-09 Thread Erik Bray

Erik Bray  added the comment:

As far as I've been able to tell there is no proposed syntax in the docs 
specifically for package_data.  The docs for the resources option seems to 
suggest separating globs with spaces, which would be fine by me (wouldn't allow 
paths that contain spaces, but that's a bad idea anyways).

I think that allowing one glob string on each line is more readable, but I'm 
not too attached either way.  Another possibility would be to allow line breaks 
in the value, for example:

package data = 
mypackage = templates/*.html
static/css/*.css

But that's getting a little more complex syntax-wise.

Agreed on getting rid of data_files--it's dangerous.  But package_data I find 
very useful sometimes, and I don't think it's always wrong.  At the very least, 
it's not clear to me how the above use case is intended to be replaced.

--

___
Python tracker 

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



[issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout?

2011-04-09 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

> Oh, I didn't know. In this case, is my commit 3664fc29e867 correct? I
> think that it is, because without the patch, subprocess may call poll()
> with a negative timeout, and so it is no more a timeout at all.
>

Yes, it looks correct.
But I think there are a couple places left where functions can be
called with a negative timeout, for example here :

  1537 stdout, stderr =
self._communicate_with_select(input, endtime,
  1538
orig_timeout)
  1539
  1540 self.wait(timeout=self._remaining_time(endtime))

or here:

  1113 if self.stdout is not None:
  1114 self.stdout_thread.join(self._remaining_time(endtime))
  1115 if self.stdout_thread.isAlive():

Also, it might be simpler and cleaner to factorize the raising of the
TimeoutExpired exception inside _remaining_time, instead of scattering
this kind of checks around the file:

  1514 remaining = self._remaining_time(endtime)
  1515 if remaining <= 0:
  1516 raise TimeoutExpired(self.args, timeout)

merging what's done in _check_timeout

--

___
Python tracker 

___
___
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-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

On Sat, Apr 09, 2011 at 02:18:01PM +, STINNER Victor wrote:
> I noticied a strange behaviour:

So forget all this girlie s...!
Here is a real man's patch!!
You'll notice mysterious function calls with a Py prefix -
they're necessary in this environment, but anyway sorry for that.
(L'ascenseur est là, à gauche.
And i'll hope to come to lesson 2 soon...)

P.S.: this is very simple minded in respect to multibyte 
characters; our terminal library does something like this
(and the complete picture is even more complicated):

jnext:  uni = s_textcodec_decode_single(_sterm_io_codec, cbuf, cbuf_len,
&bytes_consumed);
cbuf += bytes_consumed;
cbuf_len -= bytes_consumed;
if (s_PREDICT_FALSE(uni < 0)) {
if (uni == -s_ERROR_INPROGRESS) {
seq_cpl = s_FAL0;
goto jleave;
}
/*if (uni == -s_ERROR_ILSEQ || uni == -s_ERROR_INVAL) {*/
cbuf_len = 0;
uni = sterm_KEY_UNKNOWN;
goto jemit;
/*}*/
}

--
Added file: http://bugs.python.org/file21593/11650.termios.diff

___
Python tracker 

___diff --git a/Parser/myreadline.c b/Parser/myreadline.c
--- a/Parser/myreadline.c
+++ b/Parser/myreadline.c
@@ -10,6 +10,9 @@
 */
 
 #include "Python.h"
+#ifdef Py_PYPORT_H
+# include "signal.h"
+#endif
 #ifdef MS_WINDOWS
 #define WIN32_LEAN_AND_MEAN
 #include "windows.h"
@@ -29,117 +32,187 @@
 
 int (*PyOS_InputHook)(void) = NULL;
 
-/* This function restarts a fgets() after an EINTR error occurred
+/* This function restarts a fgetc() after an EINTR error occurred
except if PyOS_InterruptOccurred() returns true. */
+static int
+my_fgets(char **store, FILE *fp)
+{
+int estat;
+char *buf, *cursor;
+size_t buf_len;
 
-static int
-my_fgets(char *buf, int len, FILE *fp)
-{
-char *p;
+buf = (char*)PyMem_MALLOC(2*80);
+estat = 1;
+if (buf == NULL)
+goto jreturn;
+
+cursor = buf;
+buf_len = 2*80 - 2;
+jrestart_input:
+estat = 0;
+
+if (PyOS_InputHook != NULL)
+(void)(PyOS_InputHook)();
+
+/* Fetch bytes until error or newline */
+errno = 0;
 while (1) {
-if (PyOS_InputHook != NULL)
-(void)(PyOS_InputHook)();
-errno = 0;
-p = fgets(buf, len, fp);
-if (p != NULL)
-return 0; /* No error */
+int c = fgetc(fp);
+#ifdef Py_PYPORT_H
+if (!isprint(c))
+switch (c) {
+case '':
+c = EOF;
+/* FALLTHROUGH */
+default:
+break;
+case '':
+estat = SIGINT;
+goto j_sigit;
+case '':
+estat = SIGTSTP;
+goto j_sigit;
+case '':
+estat = SIGQUIT;
+/* FALLTHROUGH */
+j_sigit:kill(getpid(), estat);
+errno = EINTR;
+goto jcheck_fail;
+}
+#endif
+if (c == EOF)
+goto jcheck_fail;
+*(cursor++) = (char)c;
+if (c == '\n')
+break;
+
+if ((size_t)(cursor-buf) >= buf_len) {
+buf_len += 2+32;
+cursor = buf = (char*)PyMem_REALLOC(buf, buf_len);
+if (buf == NULL) {
+estat = 1;
+goto jreturn;
+}
+buf_len -= 2+32;
+cursor += buf_len;
+buf_len += 32;
+}
+}
+
+*cursor = '\0';
+*store = buf;
+jreturn:
+return estat;
+
+jcheck_fail:
 #ifdef MS_WINDOWS
-/* In the case of a Ctrl+C or some other external event
-   interrupting the operation:
-   Win2k/NT: ERROR_OPERATION_ABORTED is the most recent Win32
-   error code (and feof() returns TRUE).
-   Win9x: Ctrl+C seems to have no effect on fgets() returning
-   early - the signal handler is called, but the fgets()
-   only returns "normally" (ie, when Enter hit or feof())
+/* In the case of a Ctrl+C or some other external event
+   interrupting the operation:
+   Win2k/NT: ERROR_OPERATION_ABORTED is the most recent Win32
+   error code (and feof() returns TRUE).
+   Win9x: Ctrl+C seems to have no effect on fgets() returning
+   early - the signal handler is called, but the fgets()
+   only returns "normally" (ie, when Enter hit or feof())
+*/
+if (GetLastError()==ERROR_OPERATION_ABORTED) {
+/* Signals come asynchronously, so we sleep a brief
+   moment before checking if the handler has been
+   triggered (we cant just return 1 before the
+   signal handler has been called, as the later
+   signal may be

[issue11719] test_msilib skip unexpected on non-Windows platforms

2011-04-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset d4730f14b6c0 by Ross Lagerwall in branch '3.1':
Issue #11719: Fix message about unexpected test_msilib skip.
http://hg.python.org/cpython/rev/d4730f14b6c0

New changeset 8b146103d29e by Ross Lagerwall in branch '2.7':
Issue #11719: Fix message about unexpected test_msilib skip.
http://hg.python.org/cpython/rev/8b146103d29e

--
nosy: +python-dev

___
Python tracker 

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



[issue11719] test_msilib skip unexpected on non-Windows platforms

2011-04-09 Thread Ross Lagerwall

Ross Lagerwall  added the comment:

Thanks for the patch.

--
assignee:  -> rosslagerwall
nosy: +rosslagerwall
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
versions: +Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

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



[issue11782] email.generator.Generator.flatten() fails

2011-04-09 Thread Steffen Daode Nurpmeso

Steffen Daode Nurpmeso  added the comment:

On Sat, Apr 09, 2011 at 11:56:16AM +, Steffen Daode Nurpmeso wrote:
> I'll try to instrument the path a bit ..

Sorry, no time today.  All the stuff next week.
Nice weekend.

--

___
Python tracker 

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



[issue11809] Rietveld Code Review Tool can't handle well-known controls

2011-04-09 Thread Steffen Daode Nurpmeso

New submission from Steffen Daode Nurpmeso :

The file http://bugs.python.org/file21593/11650.termios.diff
cannot be parsed, i guess it's due to ^D, ^Z, ^\ and ^C being
embedded as ASCII control characters.
Maybe this is a feature, though.
Then someone should close this.
Nice weekend all of you.

--
components: None
messages: 133411
nosy: sdaoden
priority: normal
severity: normal
status: open
title: Rietveld Code Review Tool can't handle well-known controls

___
Python tracker 

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



[issue11809] Rietveld Code Review Tool can't handle well-known controls

2011-04-09 Thread Georg Brandl

Georg Brandl  added the comment:

This should go to the meta-tracker, 
http://psf.upfronthosting.co.za/roundup/meta/.

--
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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-09 Thread Georg Brandl

Georg Brandl  added the comment:

I would have to say that this looks hardly a trivial speed patch, and chances 
are we cannot guarantee 100% behavior compatibility with the pure-Python 
version.

If you disagree with these two points, then I'm okay with it going in.

--

___
Python tracker 

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



[issue11707] Create C version of functools.cmp_to_key()

2011-04-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

I agree (and was going back and forth between +0 and -0).

--
status: open -> closed

___
Python tracker 

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



[issue9670] Exceed Recursion Limit in Thread

2011-04-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b0d2b696da19 by Ned Deily in branch '2.7':
Issue #9670: Increase the default stack size for secondary threads on
http://hg.python.org/cpython/rev/b0d2b696da19

New changeset 378b40d71175 by Ned Deily in branch '3.1':
Issue #9670: Increase the default stack size for secondary threads on
http://hg.python.org/cpython/rev/378b40d71175

New changeset 3fe8fd2fd1d0 by Ned Deily in branch '3.2':
Issue #9670: merge with 3.2
http://hg.python.org/cpython/rev/3fe8fd2fd1d0

New changeset 4c750091d8c5 by Ned Deily in branch 'default':
Issue #9670: merge with current
http://hg.python.org/cpython/rev/4c750091d8c5

--
nosy: +python-dev

___
Python tracker 

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



[issue11747] unified_diff function product incorrect range information

2011-04-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

[Uncle Timmy]
> Would have to look at the history to see who added it, and ask them. 

That would be me :-)

At the time, the goals were to:

1) make an easy-to-use, readable output format for file comparisons,

2) use the unmodified output of the existing 
SequenceMatcher(None,a,b).get_grouped_opcodes(n) method,

3) create output that works with patch and ed, and

4) comply with the output format spec in the Single Unix Specification found at 
http://www.unix.org/single_unix_specification/ . See the attached excerpt.

No effort was made to exactly reproduce the output of GNU diff.  It was just an 
alternate output format for the SequenceMatcher.

--
nosy: +rhettinger
Added file: http://bugs.python.org/file21594/Diff_Format.pdf

___
Python tracker 

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



[issue9670] Exceed Recursion Limit in Thread

2011-04-09 Thread Ned Deily

Ned Deily  added the comment:

Applied in 2.7 (for release in 2.7.2), 3.1 (for 3.1.4). 3.2 (for 3.2.1), and 
default (for 3.3).

--
resolution:  -> fixed
stage: commit review -> committed/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



[issue9670] Exceed Recursion Limit in Thread

2011-04-09 Thread Ned Deily

Ned Deily  added the comment:

Looks like the patch breaks the OpenIndiana buildbots:

http://www.python.org/dev/buildbot/all/builders/x86%20OpenIndiana%203.2/builds/168

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue11747] unified_diff function product incorrect range information

2011-04-09 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> rhettinger
priority: normal -> low

___
Python tracker 

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



[issue11747] unified_diff function product incorrect range information

2011-04-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Thanks, Raymond. That file says (in the -u section) "If a range is empty, its 
beginning line number shall be the number of the line just before the range, or 
0 if the empty range starts the file." The last clause says to me that gnu diff 
is right and that the 1,0 range of difflib.unified_diff is a bug.

I think we should add this link to the difflib doc (I am still thinking about 
place and wording).

News entry might be
Issue # 11747: Correct difflib.unified_diff empty file range from 1,0 to 0,0 in 
conformance with Single Unix Specification for diff output formats. Patch by 
ysj.ray.

--

___
Python tracker 

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



[issue11810] _socket fails to build on OpenIndiana

2011-04-09 Thread Emile Heitor

New submission from Emile Heitor :

This issue http://bugs.python.org/issue8852 seems to happen again since python 
2.6.6. Same cause, same consequences. Patching Modules/socketmodule.h with the 
following fixes it:

--- Modules/socketmodule.h.orig 2010-05-09 15:15:40.0 + 
+++ Modules/socketmodule.h  
@@ -59,6 +59,10 @@ typedef int socklen_t;   
 #include  
 #endif 

+#if defined(__sun) 
+#undef HAVE_NETPACKET_PACKET_H 
+#endif 
+   
 #ifdef HAVE_NETPACKET_PACKET_H 
 # include 
 # include 

--
components: Build
messages: 133420
nosy: iMil
priority: normal
severity: normal
status: open
title: _socket fails to build on OpenIndiana
type: compile error
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



[issue11783] email parseaddr and formataddr should be IDNA aware

2011-04-09 Thread Torsten Becker

Torsten Becker  added the comment:

> Have a nice weekend!

Thank you for the wishes, I hope yours is going well, too!

I added IDNA awareness to formataddr() and parseaddr(), updated the docs and 
wrote 2 tests for it.

I wasn't sure if the IDNA awareness should be optional via a argument or always 
automatically enabled, I favored the latter.

Also, is it safe to split at "@" and encode/decode the last component?  I am 
not familiar with all the weird variants a email address could be in strictly 
after the RFCs.

--
keywords: +patch
Added file: http://bugs.python.org/file21595/issue-11783-v1.patch

___
Python tracker 

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



[issue11811] ssl.get_server_certificate() does not work for IPv6 addresses

2011-04-09 Thread Paul Wouters

New submission from Paul Wouters :

ssl.get_server_certificate() does not work for IPv6 addresses:

>>> ssl.get_server_certificate( ("2001:888:2003:1004:c2ff:eeff:fe00:133",443))
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python2.7/ssl.py", line 403, in get_server_certificate
s.connect(addr)
  File "/usr/lib64/python2.7/ssl.py", line 292, in connect
socket.connect(self, addr)
  File "/usr/lib64/python2.7/socket.py", line 222, in meth
return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -9] Address family for hostname not supported

--
messages: 133422
nosy: pwouters
priority: normal
severity: normal
status: open
title: ssl.get_server_certificate() does not work for IPv6 addresses
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



[issue11810] _socket fails to build on OpenIndiana

2011-04-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It has been fixed in 2.7.x, not 2.6.x (which is in security fixes-only mode).
Can you try with 2.7.1?

--
nosy: +pitrou

___
Python tracker 

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



[issue11811] ssl.get_server_certificate() does not work for IPv6 addresses

2011-04-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Confirmed. In the meantime, you can connect manually using 
socket.create_connection():

>>> import ssl, socket
>>> conn = socket.create_connection(("2001:888:2003:1004:c2ff:eeff:fe00:133", 
>>> 443))
>>> sock = ssl.wrap_socket(conn)
>>> ssl.DER_cert_to_PEM_cert(sock.getpeercert(True))
'-BEGIN 
CERTIFICATE-\nMIID8DCCA1mgAwIBAgICVVUwDQYJKoZIhvcNAQEFBQAwgbExCzAJBgNVBAYTAi0t\nMRIwEAYDVQQIEwlTb21lU3RhdGUxETAPBgNVBAcTCFNvbWVDaXR5MRkwFwYDVQQK\nExBTb21lT3JnYW5pemF0aW9uMR8wHQYDVQQLExZTb21lT3JnYW5pemF0aW9uYWxV\nbml0MRkwFwYDVQQDExB3cC54ZWxlcmFuY2UubmV0MSQwIgYJKoZIhvcNAQkBFhVy\nb290QHdwLnhlbGVyYW5jZS5uZXQwHhcNMTEwNDA4MjM0MzE3WhcNMTIwNDA3MjM0\nMzE3WjCBsTELMAkGA1UEBhMCLS0xEjAQBgNVBAgTCVNvbWVTdGF0ZTERMA8GA1UE\nBxMIU29tZUNpdHkxGTAXBgNVBAoTEFNvbWVPcmdhbml6YXRpb24xHzAdBgNVBAsT\nFlNvbWVPcmdhbml6YXRpb25hbFVuaXQxGTAXBgNVBAMTEHdwLnhlbGVyYW5jZS5u\nZXQxJDAiBgkqhkiG9w0BCQEWFXJvb3RAd3AueGVsZXJhbmNlLm5ldDCBnzANBgkq\nhkiG9w0BAQEFAAOBjQAwgYkCgYEAsLBCgvH5g8ypkuufFQ55BFoWcjpAocsRV+jN\nW5zylXzM7F9/cMyTli757JGRdwL0l+bLPdojdYwKb6XjTWfJonqentBMG6iktLXZ\n66oUQl77UHOyL7XKynmO6wSGFd/qAoA8O5O9IRLPNcD4+NMTQjGSMFPvjnUnOSH2\n8nMVmZUCAwEAAaOCARMwggEPMB0GA1UdDgQWBBRFGGojncjKvGfxjgU8EOapc0Yi\nyjCB3wYDVR0jBIHXMIHUgBRFGGojncjKvGfxjgU8EOapc0YiyqGBt6SBtDCBsTEL\nMAkGA1UEBhMCLS0xEjAQBgNVBAgTCVNvbWVT
 
dGF0ZTERMA8GA1UEBxMIU29tZUNp\ndHkxGTAXBgNVBAoTEFNvbWVPcmdhbml6YXRpb24xHzAdBgNVBAsTFlNvbWVPcmdh\nbml6YXRpb25hbFVuaXQxGTAXBgNVBAMTEHdwLnhlbGVyYW5jZS5uZXQxJDAiBgkq\nhkiG9w0BCQEWFXJvb3RAd3AueGVsZXJhbmNlLm5ldIICVVUwDAYDVR0TBAUwAwEB\n/zANBgkqhkiG9w0BAQUFAAOBgQCnLIAJ8ghuqUUiVOuq6tiRby65dh+7L1ApSp8G\nwusWF/rYugvqUxL1O1vatd1ptyXpoCLM0XzQ5sBtY0yS8IjMON9++Uu+u5IkQ+24\nkwvpgWp3lX8Zuxhbnmym/LGoJq4PgqXl1bsGJ+SIALQ31g7nrNE2HQz1IYRQEj/k\neG8F7g==\n-END
 CERTIFICATE-\n'

--
nosy: +pitrou
stage:  -> needs patch
versions: +Python 3.3 -Python 2.7

___
Python tracker 

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



[issue11810] _socket fails to build on OpenIndiana

2011-04-09 Thread Emile Heitor

Emile Heitor  added the comment:

Actually, python 2.6 is the default version in pkgsrc 
(http://www.netbsd.org/docs/software/packages.html), and the reason why i'm 
pulling up this bug is that python 2.6 failure on SunOS brings down more than 
3000 packages :/ Nevertheless, i'll try a bulk build with python 2.7 as the 
default version, thanks for the heads up.

--

___
Python tracker 

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



[issue11811] ssl.get_server_certificate() does not work for IPv6 addresses

2011-04-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
components: +Library (Lib)
keywords: +easy

___
Python tracker 

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



[issue11810] _socket fails to build on OpenIndiana

2011-04-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Actually, python 2.6 is the default version in pkgsrc
> (http://www.netbsd.org/docs/software/packages.html), and the reason
> why i'm pulling up this bug is that python 2.6 failure on SunOS brings
> down more than 3000 packages :/ Nevertheless, i'll try a bulk build
> with python 2.7 as the default version, thanks for the heads up.

Well, do you need to ship your own build of Python with pkgsrc?
OpenIndiana and recent Solaris versions should AFAIK ship a system
Python 2.6 by default.

--

___
Python tracker 

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



[issue11757] test_subprocess.test_communicate_timeout_large_ouput failure on select(): negative timeout?

2011-04-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 3982be773b54 by Antoine Pitrou in branch 'default':
Issue #11757: select.select() now raises ValueError when a negative timeout
http://hg.python.org/cpython/rev/3982be773b54

--

___
Python tracker 

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



[issue11810] _socket fails to build on OpenIndiana

2011-04-09 Thread Emile Heitor

Emile Heitor  added the comment:

Well, pkgsrc is an independent, portable sources-based packaging system which 
provides a complete set of packages for many architectures. Python is provided 
as a package per-se, and we do not yet have the ability to fallback to native 
python version.
If this patch is not to be pulled up to python 2.6 then we'll provide it as a 
separate patch to pkgsrc, that's really not a problem, i understand perfectly 
that python 2.6 is now on a maintenance state.

Thanks for your feedback.

--

___
Python tracker 

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



[issue11812] transient test_telnetlib failure

2011-04-09 Thread Antoine Pitrou

New submission from Antoine Pitrou :

http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/2920/steps/test/logs/stdio

test test_telnetlib failed -- Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_telnetlib.py",
 line 45, in testBasic
telnet = telnetlib.Telnet(HOST, self.port)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\telnetlib.py", line 
209, in __init__
self.open(host, port, timeout)
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\telnetlib.py", line 
225, in open
self.sock = socket.create_connection((host, port), timeout)
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\socket.py", 
line 407, in create_connection
raise err
  File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\socket.py", 
line 398, in create_connection
sock.connect(sa)
socket.error: [Errno 10061] No connection could be made because the target 
machine actively refused it

--
components: Library (Lib), Tests
messages: 133429
nosy: pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: transient test_telnetlib failure
type: behavior
versions: Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue11810] _socket fails to build on OpenIndiana

2011-04-09 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue9670] Exceed Recursion Limit in Thread

2011-04-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 42d5001e5845 by Ned Deily in branch '3.1':
Issue9670: Back out changeset 378b40d71175; test fails on other platforms
http://hg.python.org/cpython/rev/42d5001e5845

New changeset 54edabf2846d by Ned Deily in branch '3.2':
Issue9670: Merge backout to 3.2.
http://hg.python.org/cpython/rev/54edabf2846d

New changeset b7456c1b4aa4 by Ned Deily in branch 'default':
Issue9670: Merge backout from 3.2.
http://hg.python.org/cpython/rev/b7456c1b4aa4

New changeset 3630bc3d5a88 by Ned Deily in branch '2.7':
Issue9670: Back out changeset b0d2b696da19; test fails on other platforms
http://hg.python.org/cpython/rev/3630bc3d5a88

--

___
Python tracker 

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



[issue9670] Exceed Recursion Limit in Thread

2011-04-09 Thread Ned Deily

Ned Deily  added the comment:

Reverting the patch since it caused failures on failure on some other platform 
buildbots (for instance, Gentoo and OpenIndiana).  It also fails on OS X 
buildbots with pydebug enabled, something I hadn't tested:
http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.2/builds/161

So the patch needs to address the stack size for OS X pydebug builds and what 
to do about other failing platforms - increase the stack size for each or 
disable the test there.

--
stage: committed/rejected -> patch review

___
Python tracker 

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



[issue11813] inspect.getattr_static doesn't get module attributes

2011-04-09 Thread Andreas Stührk

New submission from Andreas Stührk :

My patch for issue #11133 introduced a regression: it is no longer possible to 
get attributes of modules. That is because modules use "tp_dictoffset" (at C 
level). The instance __dict__ is exposed to Python code using a 
types.MemberDescriptorType. My patch for issue #11133 currently assumes that 
accessing the instance __dict__ can trigger code execution, but that is 
impossible: The access itself can't trigger code execution (it just returns a 
PyObject in the C struct). Theoretically, it could return any Python object, 
but that doesn't matter, as the code that uses the object only calls dict 
methods directly, hence a TypeError is the worst thing that can happen 
(although it shouldn't ever happen in practise).

Attached is a patch that adds a test and fixes the issue.

--
components: Library (Lib)
files: getattr_static_modules.patch
keywords: patch
messages: 133432
nosy: Trundle, michael.foord
priority: normal
severity: normal
status: open
title: inspect.getattr_static doesn't get module attributes
type: behavior
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21596/getattr_static_modules.patch

___
Python tracker 

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



[issue11814] possible typo in multiprocessing.Pool._terminate

2011-04-09 Thread Antoine Pitrou

New submission from Antoine Pitrou :

There's the following code in pool.py, line 494 and following:

debug('joining task handler')
task_handler.join()

debug('joining result handler')
task_handler.join()

It seems the last line should read `result_handler.join()` instead.

Additionally, when _terminate() is called, it seems the worker_handler could 
still run while other threads shut down existing workers, meaning it could 
start new workers (in _repopulate_pool()) in parallel.

So perhaps the worker_handler should be joined before anything else in 
_terminate(). It would incur a small latency, though (because of the sleep() 
call there).

--
messages: 133433
nosy: asksol, jnoller, pitrou
priority: normal
severity: normal
status: open
title: possible typo in multiprocessing.Pool._terminate
versions: Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue11770] inspect.dir_static

2011-04-09 Thread Andreas Stührk

Andreas Stührk  added the comment:

See issue #11813 for the module problem.

--

___
Python tracker 

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



[issue11812] transient test_telnetlib failure

2011-04-09 Thread Jack Diederich

Changes by Jack Diederich :


--
nosy: +jackdied

___
Python tracker 

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



[issue11815] Simplifications in concurrent.futures

2011-04-09 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Queue.get(block=True) cannot raise EmptyError, meaning there's some dead code 
that we can remove.

--
components: Library (Lib)
files: cfsimplify.patch
keywords: patch
messages: 133435
nosy: bquinlan, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Simplifications in concurrent.futures
type: resource usage
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file21597/cfsimplify.patch

___
Python tracker 

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



[issue11815] Simplifications in concurrent.futures

2011-04-09 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

A further optimization would be to use a SimpleQueue (from 
multiprocessing.queues) for the result_queue in the ProcessPoolExecutor. A 
SimpleQueue is much more light-weight than a normal Queue, which has a bunch of 
additional locks and a dedicated thread.

--

___
Python tracker 

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



[issue11796] Comprehensions in a class definition mostly cannot access class variable

2011-04-09 Thread Michael Foord

Changes by Michael Foord :


--
nosy: +michael.foord

___
Python tracker 

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



[issue11816] Add functions to return disassembly as string

2011-04-09 Thread Eugene Toder

New submission from Eugene Toder :

As discussed in Issue11549 a couple of tests need to inspect disassembly of 
some code. Currently they have to override sys.stdout, run dis and restore 
stdout back. It would be much nicer if dis module provided functions that 
return disassembly as a string.

Provided is a patch that adds file argument to most dis functions, defaulting 
to sys.stdout. On top of that there are 2 new functions: dis_to_str and 
disassembly_to_str that return disassembly as a string instead of writing it to 
a file.

--
components: Library (Lib)
files: dis.diff
keywords: patch
messages: 133437
nosy: eltoder
priority: normal
severity: normal
status: open
title: Add functions to return disassembly as string
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file21598/dis.diff

___
Python tracker 

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



[issue11816] Add functions to return disassembly as string

2011-04-09 Thread Eugene Toder

Changes by Eugene Toder :


Removed file: http://bugs.python.org/file21598/dis.diff

___
Python tracker 

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



[issue11816] Add functions to return disassembly as string

2011-04-09 Thread Eugene Toder

Changes by Eugene Toder :


Added file: http://bugs.python.org/file21599/dis.patch

___
Python tracker 

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



[issue11816] Add functions to return disassembly as string

2011-04-09 Thread Eugene Toder

Changes by Eugene Toder :


--
nosy: +ncoghlan

___
Python tracker 

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



[issue11816] Add functions to return disassembly as string

2011-04-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Inspecting the text disassembly is a bit fragile for testing.  It would be 
better to scan a list of (opcode, oparg) pairs for given pattern (i.e. 
(LOAD_CONST, 3) where consts[3] --> some target value).

--
nosy: +rhettinger

___
Python tracker 

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



[issue11816] Add functions to return disassembly as string

2011-04-09 Thread Eugene Toder

Eugene Toder  added the comment:

Agreed, but that would require rewriting of all tests in test_peepholer.

--

___
Python tracker 

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



[issue5996] abstract class instantiable when subclassing dict

2011-04-09 Thread Eugene Toder

Eugene Toder  added the comment:

This patch fixes the problem by moving the check from object_new to 
PyType_GenericAlloc. The check is very cheap, so this should not be an issue.

--
keywords: +patch
nosy: +eltoder
Added file: http://bugs.python.org/file21600/abc.patch

___
Python tracker 

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



[issue11816] Add functions to return disassembly as string

2011-04-09 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Yep!

--

___
Python tracker 

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



[issue11817] berkeley db 5.1 support

2011-04-09 Thread Per Øyvind Karlsen

New submission from Per Øyvind Karlsen :

This patch adds support for berkeley db <= 5.1.

--
components: Extension Modules
files: Python-2.7.1-berkeley-db-5.1.patch
keywords: patch
messages: 133442
nosy: proyvind
priority: normal
severity: normal
status: open
title: berkeley db 5.1 support
versions: Python 2.7
Added file: http://bugs.python.org/file21601/Python-2.7.1-berkeley-db-5.1.patch

___
Python tracker 

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



[issue11817] berkeley db 5.1 support

2011-04-09 Thread Per Øyvind Karlsen

Per Øyvind Karlsen  added the comment:

forgot some additional config checks in setup.py in previous patch..

--

___
Python tracker 

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



[issue11817] berkeley db 5.1 support

2011-04-09 Thread Per Øyvind Karlsen

Per Øyvind Karlsen  added the comment:

sloppysloppy...

fix previous patch

--
Added file: http://bugs.python.org/file21602/Python-2.7.1-berkeley-db-5.1.patch

___
Python tracker 

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



[issue9904] Cosmetic issues that may warrant a fix in symtable.h/c

2011-04-09 Thread Eli Bendersky

Changes by Eli Bendersky :


--
stage:  -> needs patch
versions: +Python 3.3 -Python 3.2

___
Python tracker 

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



[issue9904] Cosmetic issues that may warrant a fix in symtable.h/c

2011-04-09 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b6fe63c914e4 by Eli Bendersky in branch 'default':
Issue #9904: fix and clarify some comments + fix indentation in symtable code
http://hg.python.org/cpython/rev/b6fe63c914e4

--
nosy: +python-dev

___
Python tracker 

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



[issue9904] Cosmetic issues that may warrant a fix in symtable.h/c

2011-04-09 Thread Eli Bendersky

Eli Bendersky  added the comment:

I committed the fixes to 3.3 (see no reason to backport these). So unless there 
are objections I will close the issue in a few days.

--
stage: needs patch -> commit review
status: open -> pending

___
Python tracker 

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



[issue11817] berkeley db 5.1 support

2011-04-09 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +jcea

___
Python tracker 

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