[issue13526] Deprecate the old Unicode API

2011-12-04 Thread Georg Brandl

Georg Brandl  added the comment:

I agree with Benjamin.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-12-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Is the following change in behavior caused by the fix for this issue?
> 
> $ python3.2 -c $'class A(IOError):\n  def __init__(self, arg): pass\nA(arg=1)'
> $ python3.3 -c $'class A(IOError):\n  def __init__(self, arg): pass\nA(arg=1)'
> Traceback (most recent call last):
>   File "", line 3, in 
> TypeError: A does not take keyword arguments

It must be because IOError now has a significant __new__ method.
I could change it to accept arbitrary arguments but I'm not sure that's
the right solution.
Another approach would be:
- if IOError is instantiated, initialize stuff in IOError.__new__
- otherwise, initialize stuff in IOError.__init__

What do you think?

--

___
Python tracker 

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



[issue13464] HTTPResponse is missing an implementation of readinto

2011-12-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hello Jon, and thanks for the patch. I have a couple of comments:

- readinto() shouldn't return None but 0 when there is nothing to read (this 
corresponds to read() returning b"")

- I see _read_chunked() is only ever called with amt=None, so perhaps it can be 
simplified?

Also, a nitpick: the doc entry needs a "versionadded" tag.

--
stage:  -> patch review

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-12-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> > Is the following change in behavior caused by the fix for this issue?
> > 
> > $ python3.2 -c $'class A(IOError):\n  def __init__(self, arg): 
> > pass\nA(arg=1)'
> > $ python3.3 -c $'class A(IOError):\n  def __init__(self, arg): 
> > pass\nA(arg=1)'
> > Traceback (most recent call last):
> >   File "", line 3, in 
> > TypeError: A does not take keyword arguments
> 
> It must be because IOError now has a significant __new__ method.
> I could change it to accept arbitrary arguments but I'm not sure that's
> the right solution.
> Another approach would be:
> - if IOError is instantiated, initialize stuff in IOError.__new__
> - otherwise, initialize stuff in IOError.__init__

To make things clearer, IOError.__new__ would detect if a subclass is
asked for, and then defer initialization until __init__ is called so
that argument checking is done in __init__.

--

___
Python tracker 

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



[issue13526] Deprecate the old Unicode API

2011-12-04 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Closing this as rejected, for the reasons given.

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

___
Python tracker 

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



[issue12555] PEP 3151 implementation

2011-12-04 Thread Nick Coghlan

Nick Coghlan  added the comment:

There's a fairly sophisticated tapdance in object.__new__ that deals with this 
problem at that level.

See: http://hg.python.org/cpython/file/default/Objects/typeobject.c#l2869

The new IOError may require something similarly sophisticated to cope with 
subclasses that only override __init__.

--

___
Python tracker 

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



[issue9420] gdbm with /usr/include/ndbm.h

2011-12-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
versions: +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



[issue13524] critical error with import tempfile

2011-12-04 Thread Tim Golden

Tim Golden  added the comment:

OK, the long and short is that spwaning a process without passing
in SystemRoot is asking for trouble. There's a blog post here
which gives an example:

http://jpassing.com/2009/12/28/the-hidden-danger-of-forgetting-to-specify-systemroot-in-a-custom-environment-block/

And, certainly this works:

import os
import subprocess
subprocess.Popen(
 "notepad.exe",
 env={"SystemRoot" : os.environ['SystemRoot']}
)

I'm not quite sure what approach we should take in the subprocess
module. Is it a docs warning? Should we refuse to proceed if there's
no SystemRoot? Is it the caller's responsibility?
I'll ask on python-dev to gather opinions.

--

___
Python tracker 

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



[issue13211] urllib2.HTTPError does not have 'reason' attribute.

2011-12-04 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

After yet another commit, the build bots are green again:

http://hg.python.org/cpython/rev/8fa1dc66de5d

--

___
Python tracker 

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



[issue13464] HTTPResponse is missing an implementation of readinto

2011-12-04 Thread Jon Kuhn

Jon Kuhn  added the comment:

Thanks for the comments.  Attached is an updated patch.

In the RawIOBase docs it says "If the object is in non-blocking mode and no 
bytes are available, None is returned."  So I wasn't sure if that meant any 
time no bytes were available or just when no bytes are available and EOF has 
not been reached.  -- I updated it to return 0 instead of None.

I simplified _read_chunked() and renamed it to _readall_chunked() since that is 
all it does.  

I added the versionadded tag specifying that it was added in 3.3 since the 
patch is for the default branch.

--
Added file: http://bugs.python.org/file23850/issue13464_r1.patch

___
Python tracker 

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



[issue13528] Rework performance FAQ

2011-12-04 Thread Antoine Pitrou

New submission from Antoine Pitrou :

This is a slimmed down rewrite of the performance question in the FAQ (also 
moved around to a dedicated subheader).

--
assignee: docs@python
components: Documentation
files: perffaq.patch
keywords: patch
messages: 148853
nosy: docs@python, pitrou, rhettinger
priority: normal
severity: normal
stage: patch review
status: open
title: Rework performance FAQ
versions: Python 3.2, Python 3.3
Added file: http://bugs.python.org/file23851/perffaq.patch

___
Python tracker 

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



[issue13503] improved efficiency of bytearray pickling by using bytes type instead of str

2011-12-04 Thread Irmen de Jong

Irmen de Jong  added the comment:

Added new patch that only does the new reduction when protocol is 3 or higher.

--
Added file: http://bugs.python.org/file23852/bytearray3x_reduceex.patch

___
Python tracker 

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



[issue13529] Segfault inside of gc/weakref

2011-12-04 Thread Alex Gaynor

New submission from Alex Gaynor :

I don't have a particularly minimal test case for this, however I am able to 
reproduce it consistently (so far reproduced on multiple machines, 32-bit and 
64-bit on 2.6 and 2.7), using these steps:

First get a checkout of the PyPy repository:

hg clone ssh://h...@bitbucket.org/pypy/pypy

Next, get to the correct revision:

hg up -C 82e1fc9c253c

Finally, attempt to run the tests:

./pytest.py pypy/module/micronumpy/ -x

At this point you should have a segfault that appears to be because of a bad 
address for a weakref (but I could be horrifically wrong).

--
components: Interpreter Core
messages: 148855
nosy: alex
priority: normal
severity: normal
status: open
title: Segfault inside of gc/weakref
versions: Python 2.6, Python 2.7

___
Python tracker 

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



[issue13529] Segfault inside of gc/weakref

2011-12-04 Thread Alex Gaynor

Alex Gaynor  added the comment:

Antoine asked for a gdb bt, here's the last couple of useful frames:


#0  _PyWeakref_ClearRef (self=0x4000) at Objects/weakrefobject.c:97
#1  0x004d4c66 in handle_weakrefs (old=0x78a2b0, 
unreachable=0x7fff87b0) at Modules/gcmodule.c:595
#2  collect (generation=0) at Modules/gcmodule.c:924
#3  0x004d5640 in collect_generations () at Modules/gcmodule.c:996
#4  _PyObject_GC_Malloc (basicsize=) at Modules/gcmodule.c:1457
#5  0x00466ba9 in PyType_GenericAlloc (type=0x31d05e0, nitems=0) at 
Objects/typeobject.c:753
#6  0x0046ad83 in type_call (type=0x31d05e0, args=(257, None, [], 8, 
51), kwds=0x0) at Objects/typeobject.c:721
#7  0x0041ebc7 in PyObject_Call (func=, 
arg=, kw=) at Objects/abstract.c:2529
#8  0x0049b152 in do_call (nk=, na=, 
pp_stack=0x7fff89b0, func=)
at Python/ceval.c:4239
#9  call_function (oparg=, pp_stack=0x7fff89b0) at 
Python/ceval.c:4044
#10 PyEval_EvalFrameEx (f=, throwflag=) at 
Python/ceval.c:2666

--

___
Python tracker 

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



[issue1660009] continuing problem with httplib multiple set-cookie headers

2011-12-04 Thread Piotr Dobrogost

Changes by Piotr Dobrogost :


--
nosy: +piotr.dobrogost

___
Python tracker 

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



[issue13529] Segfault inside of gc/weakref

2011-12-04 Thread Alex Gaynor

Alex Gaynor  added the comment:

Turns out this was a subtle bug in some raw memory manipulation code, which 
amaury spotted.

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



[issue3276] httplib.HTTPConnection._send_request should not blindly assume dicts for headers

2011-12-04 Thread Piotr Dobrogost

Changes by Piotr Dobrogost :


--
nosy: +piotr.dobrogost
status: pending -> open

___
Python tracker 

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



[issue13527] Remove obsolete mentions in the GUIs page

2011-12-04 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2111bf7e5bca by Antoine Pitrou in branch '3.2':
Issue #13527: remove mention of Python megawidgets and Tkinter3000 WCK
http://hg.python.org/cpython/rev/2111bf7e5bca

New changeset f0008683585c by Antoine Pitrou in branch 'default':
Issue #13527: remove mention of Python megawidgets and Tkinter3000 WCK
http://hg.python.org/cpython/rev/f0008683585c

New changeset 478b4e9551fa by Antoine Pitrou in branch '2.7':
Issue #13527: remove mention of Python megawidgets and Tkinter3000 WCK
http://hg.python.org/cpython/rev/478b4e9551fa

--
nosy: +python-dev

___
Python tracker 

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



[issue13527] Remove obsolete mentions in the GUIs page

2011-12-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
resolution:  -> fixed
stage:  -> 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



[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-04 Thread Nick Coghlan

Changes by Nick Coghlan :


--
hgrepos:  -93

___
Python tracker 

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



[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-04 Thread Nick Coghlan

Changes by Nick Coghlan :


--
hgrepos: +94

___
Python tracker 

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



[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-04 Thread Nick Coghlan

Changes by Nick Coghlan :


Added file: http://bugs.python.org/file23853/5ce60675e572.diff

___
Python tracker 

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



[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-12-04 Thread Nick Coghlan

Nick Coghlan  added the comment:

MvL pointed out I hadn't updated the Hg repo reference when I moved my sandbox 
over to BitBucket - the diff it was generating was from the last time I updated 
my pydotorg sandbox in order to try something on the buildbots.

--

___
Python tracker 

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



[issue5364] documentation in epub format

2011-12-04 Thread James Polley

James Polley  added the comment:

So http://bitbucket.org/birkenfeld/sphinx/issue/140/ has now been closed; 
sphinx happily builds epub.

However, the python docs are still not available for download in epub format 
from http://docs.python.org/download.html, which was the original request in 
this issue.

--
nosy: +James.Polley

___
Python tracker 

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



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

2011-12-04 Thread Ned Batchelder

New submission from Ned Batchelder :

The docs for os.lseek don't make any mention of its return value.  I believe 
it's the new offset in the file, but I'm not sure if there are other subtleties 
to be mentioned.

--
assignee: docs@python
components: Documentation
messages: 148861
nosy: docs@python, nedbat
priority: normal
severity: normal
status: open
title: Docs for os.lseek neglect to mention what it returns
versions: Python 2.7, Python 3.2

___
Python tracker 

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



[issue13506] IDLE sys.path does not contain Current Working Directory

2011-12-04 Thread Marco Scataglini

Marco Scataglini  added the comment:

At first I did no see the difference on preserving the existing correct 
behavior and fixing the issue between the two patches... and I thought less is 
more, so mine was better...

But, I checked again and by:
"... running a python script will have sys.path include the absolute path to 
the script..." (Roger meant) instead of CWD ("").

I can see the reasoning for it and since that IS the standard Python behavior 
it should be also transposed to IDLE.

So yes, Roger (serwy) patch presents a more accurate correction.

+1

--

___
Python tracker 

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



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

2011-12-04 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

The only subtlety is that the result is the offset from the beginning, 
independent of the how value. It may also raise exceptions.

--
nosy: +loewis

___
Python tracker 

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



[issue13495] IDLE: Regression - Two ColorDelegator instances loaded

2011-12-04 Thread Roger Serwy

Roger Serwy  added the comment:

I attached a better patch that preserves the goals of the original code while 
not creating two color delegators.

I traced down when the regression occurred (2007-09-06):
(a4bd8a4805a8) 1. Fail gracefully if the file fails to decode when loaded.

This patch (2008-02-16) modified parts of the last patch, as well adds 
"ResetColorizer" to the filename_change_hook.
(7c4c46342137) Merged revisions 
60481,60485,60489-60492,60494-60496,60498-60499,60501-60503,605

--
nosy: +christian.heimes, kbk -ned.deily
Added file: http://bugs.python.org/file23854/issue13495.patch

___
Python tracker 

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