[issue7856] cannot decode from or encode to big5 \xf9\xd8

2010-02-04 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

perky, what do you think?

--
assignee:  -> hyeshik.chang
nosy: +hyeshik.chang

___
Python tracker 

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



[issue7856] cannot decode from or encode to big5 \xf9\xd8

2010-02-04 Thread Xuefer x

Xuefer x  added the comment:

sure after enlighten by your url which is OBSOLETE
see: http://www.unicode.org/Public/MAPPINGS/EASTASIA/ReadMe.txt
i found http://unicode.org/charts/unihan.html
then http://www.unicode.org/Public/UNIDATA/
then http://www.unicode.org/Public/UNIDATA/Unihan.zip
in side the zip, open Unihan_OtherMappings.txt
big 5 includes
#   kBigFive
#   kHKSCS
which are listed in Unihan_OtherMappings.txt
HKSCS is one of the big-5 encoding
and i search for F9D8 got
U+88CF  kHKSCS  F9D8

you may also want to update other encoding map table to catch up with 
Unihan_OtherMappings.txt

thanks for your quick reply btw

--

___
Python tracker 

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



[issue7856] cannot decode from or encode to big5 \xf9\xd8

2010-02-04 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

In particular, the Unicode consortium mapping table, now at

http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT

doesn't map f9d8 to anything; the current version of that table (in unihan.zip) 
has these mappings for U+88CF:

U+88CF  kCCCII  232E61
U+88CF  kCNS1986E-444E
U+88CF  kCNS19923-444E
U+88CF  kEACC   215763
U+88CF  kGB13279
U+88CF  kHKSCS  F9D8
U+88CF  kJis0   4602
U+88CF  kKPS0   D9E0
U+88CF  kKSC0   5574
U+88CF  kTaiwanTelegraph5937
U+88CF  kXerox  241:102

As you can see, it isn't supported in big5.

--

___
Python tracker 

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



[issue7856] cannot decode from or encode to big5 \xf9\xd8

2010-02-04 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

That iconv supports it is not convincing, IMO. Do you have other sources (like 
tables in the web somewhere) that support your request?

--
nosy: +loewis

___
Python tracker 

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



[issue7856] cannot decode from or encode to big5 \xf9\xd8

2010-02-04 Thread Xuefer x

New submission from Xuefer x :

using iconv:
$ printf "\xf9\xd8" | iconv -f big5 -t utf-8 | xxd
000: e8a3 8f  ...
$ printf "\xe8\xa3\x8f" | iconv -f utf-8 -t big5 | xxd
000: f9d8 ..

using python
>>> print "\xf9\xd8".decode("big5")
Traceback (most recent call last):
  File "", line 1, in 
UnicodeDecodeError: 'big5' codec can't decode bytes in position 0-1: illegal 
multibyte sequence
>>> print "\xe8\xa3\x8f".decode("utf-8").encode("big5")
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'big5' codec can't encode character u'\u88cf' in position 
0: illegal multibyte sequence

--
components: Unicode
messages: 98865
nosy: Xuefer.x
severity: normal
status: open
title: cannot decode from or encode to big5 \xf9\xd8
type: behavior
versions: Python 2.6

___
Python tracker 

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



[issue5680] Command-line arguments when running in IDLE

2010-02-04 Thread Gabriel Genellina

Gabriel Genellina  added the comment:

A different patch to solve the same issue.
This one uses a standard tkSimpleDialog to prompt for the command line, and 
follows the directives found at the top of the source (only took 8 years to 
implement... not so bad :) )

XXX GvR Redesign this interface (yet again) as follows:

- Present a dialog box for ``Run Module''

- Allow specify command line arguments in the dialog box

--
nosy: +gagenellina
Added file: http://bugs.python.org/file16139/issue5680-patch2.diff

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Fixed in r77983.

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

___
Python tracker 

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



[issue7847] Remove 'python -U' or document it

2010-02-04 Thread Georg Brandl

Georg Brandl  added the comment:

If you document -X, you should also document -J.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue7728] test_timeout should use "find_unused_port" helper

2010-02-04 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch.

--
keywords: +patch
stage: needs patch -> patch review
Added file: http://bugs.python.org/file16138/issue7728_timeout.diff

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Florent Xicluna

Florent Xicluna  added the comment:

Patch.

--
keywords: +patch
stage: test needed -> patch review
Added file: http://bugs.python.org/file16137/issue7853_cm_exit.diff

___
Python tracker 

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-04 Thread Zvezdan Petkovic

Zvezdan Petkovic  added the comment:

I forgot to add that the patch for 2.6.5 is based on:
http://svn.python.org/view?rev=74970&view=rev

--

___
Python tracker 

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-04 Thread Zvezdan Petkovic

Zvezdan Petkovic  added the comment:

The readline-libedit-2.6.5.patch is attached.

The patch was applied and python built in several configurations on Mac
OS X 10.6 (Snow Leopard).  There is no regression (details below).

Can somebody else test on Mac OS X 10.5 (Leopard)?

32-bit
==

Configuration with system libedit::

./configure --prefix=${HOME}/opt/snapshot/2.6.5 \
BASECFLAGS="-arch i386" \
CFLAGS="-arch i386" \
LDFLAGS="-arch i386" \
MACOSX_DEPLOYMENT_TARGET=10.6

Configuration with GNU readline 6.1::

./configure --prefix=${HOME}/opt/snapshot/gnurl/2.6.5 \
BASECFLAGS="-arch i386" \
CFLAGS="-arch i386" \
CPPFLAGS="-I/opt/local/include" \
LDFLAGS="-arch i386 -L/opt/local/lib" \
MACOSX_DEPLOYMENT_TARGET=10.6

Failed tests for both builds:

- test_asynchat
- test_smtplib


64-bit
==

Configuration with system libedit::

./configure --prefix=${HOME}/opt/snapshot/2.6.5-64 \
MACOSX_DEPLOYMENT_TARGET=10.6

Configuration with GNU readline 6.1::

./configure --prefix=${HOME}/opt/snapshot/gnurl/2.6.5-64 \
CPPFLAGS="-I/opt/local/include" \
LDFLAGS="-L/opt/local/lib" \
MACOSX_DEPLOYMENT_TARGET=10.6checking

Failed tests for both builds:

- test_asynchat
- test_macostools
- test_smtplib

Unexpected skips:

- test_dl


Universal
=

Configuration with system libedit::

./configure --prefix=${HOME}/opt/snapshot \
BASECFLAGS="-arch x86_64 -arch i386" \
CFLAGS="-arch x86_64 -arch i386" \
LDFLAGS="-arch x86_64 -arch i386" \
MACOSX_DEPLOYMENT_TARGET=10.6

Configuration with GNU readline 6.1::

./configure --prefix=${HOME}/opt/snapshot/gnurl \
BASECFLAGS="-arch x86_64 -arch i386" \
CFLAGS="-arch x86_64 -arch i386" \
CPPFLAGS="-I/opt/local/include" \
LDFLAGS="-arch x86_64 -arch i386 -L/opt/local/lib" \
MACOSX_DEPLOYMENT_TARGET=10.6

Failed tests for both builds:

- test_asynchat
- test_macostools
- test_smtplib

Unexpected skips:

- test_dl

when run as 64-bit or 32-bit executable.

Errors in both asynchat and smtplib are caused by the same issue in
asyncore.py.  A typical error output::

error: uncaptured python exception, closing channel

(:[Errno 9]
 Bad file descriptor
 [/Users/zvezdan/opt/snapshot/2.6.5/lib/python2.6/asyncore.py|
  readwrite|107]
 [/Users/zvezdan/opt/snapshot/2.6.5/lib/python2.6/asyncore.py|
  handle_expt_event|441]
 [|getsockopt|1]
 [/Users/zvezdan/opt/snapshot/2.6.5/lib/python2.6/socket.py|_dummy|165])

but this is not caused by readline patch.

--
Added file: http://bugs.python.org/file16136/readline-libedit-2.6.5.patch

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> benjamin.peterson

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

Dino Viehland  added the comment:

Ahh, so it is in 2.7, apparently I was in a 2.6 enlistment.  I've updated the 
2.x patch to use the context manager as well.

I've also switched to using assertTrue(x is True) and assertTrue(x is False) so 
that it's not checking precisely for the bool value based upon Ezio's feedback.

--

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

Changes by Dino Viehland :


Added file: http://bugs.python.org/file16135/patch30.diff

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

Changes by Dino Viehland :


Added file: http://bugs.python.org/file16134/patch.diff

___
Python tracker 

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



[issue7847] Remove 'python -U' or document it

2010-02-04 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I'm +0 on such a change - I don't think it makes anything better (it will only 
cause more users asking what this is, why it was added, and demand that 
something should be done about it).

Feel free to commit it, anyway.

--
assignee: loewis -> barry

___
Python tracker 

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



[issue4772] undesired switch fall-through in socketmodule.c

2010-02-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in all four branches, thank you.

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



[issue7851] WatchedFileHandler needs to be references as handlers.WatchedFileHandler in conf files

2010-02-04 Thread Vinay Sajip

Changes by Vinay Sajip :


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

___
Python tracker 

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



[issue7851] WatchedFileHandler needs to be references as handlers.WatchedFileHandler in conf files

2010-02-04 Thread Vinay Sajip

Vinay Sajip  added the comment:

Fix checked into trunk (r77973).

--
assignee: georg.brandl -> vinay.sajip

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Ezio Melotti

Ezio Melotti  added the comment:

For your purpose indeed assertTrue() is not appropriate, however assertEqual(x, 
True) works for several different x, including 1.0 or 1.
Also assertRaises can be used as a context manager on 2.7 too.

--
priority:  -> normal
stage:  -> patch review

___
Python tracker 

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



[issue5673] Add timeout option to subprocess.Popen

2010-02-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I agree.  Does subprocess.TimeoutExpired sound good?

Yes.

> It won't be possible with the current implementation to put the partial output
> in the exception, because read blocks.

Fair enough :)

> I think call and check_call should clean up after themselves by
> killing the child processes they create, while communicate and wait should 
> leave
> that to the user.

It sounds good.

--

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

Dino Viehland  added the comment:

Ezio: I'm going to stick w/ assertEqual here as Michael points out these are 
different.  In particular I want to make sure that you can assign any true 
value to the ctypes field but when you read it back you get True or False 
regardless of the value assigned.

--

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

Changes by Dino Viehland :


Added file: http://bugs.python.org/file16133/patch30.diff

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

Dino Viehland  added the comment:

I'll switch to the context manager form in the 3.x branch - it looks like 
that's not available in the 2.x branch.

--

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Michael Foord

Michael Foord  added the comment:

Dino - if you use assertRaises as a context manager the exception is kept as an 
attribute on the context. You can make assertions about the exception after the 
with block has executed.

--

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Brian Curtin

Brian Curtin  added the comment:

Rather than calling QueryValue and using fail(...) if it doesn't throw, 
assertRaises(...) would do the trick.

--
assignee: theller -> 
keywords: +needs review
nosy: +brian.curtin, michael.foord
priority:  -> normal
stage:  -> patch review

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Michael Foord

Michael Foord  added the comment:

Hmm... assertTrue(...) is semantically different from assertEqual(True, ...).

--

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

Dino Viehland  added the comment:

The problem with assertRaises is I need to actually check the errno on the 
exception and assertRaises doesn't let me do that.

--

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Ezio Melotti

Ezio Melotti  added the comment:

Also assertEqual(..., True) can be replaced by assertTrue(...) (same for False 
and assertFalse).

--
assignee:  -> theller
keywords:  -needs review
nosy: +ezio.melotti
priority: normal -> 
stage: patch review -> 

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

Changes by Dino Viehland :


--
type:  -> behavior
versions: +Python 3.2
Added file: http://bugs.python.org/file16132/patch30.diff

___
Python tracker 

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



[issue7855] Add test cases for ctypes/winreg for issues found in IronPython

2010-02-04 Thread Dino Viehland

New submission from Dino Viehland :

This adds new test cases for bugs reported by Thomas Heller against IronPython 
for ctypes and winreg:
   ctypes: the variant bool type isn't supported
   winreg: errno is not correctly set when QueryValue fails

--
assignee: theller
components: Windows, ctypes
files: patch.diff
keywords: patch
messages: 98844
nosy: DinoV, theller
severity: normal
status: open
title: Add test cases for ctypes/winreg for issues found in IronPython
versions: Python 2.7
Added file: http://bugs.python.org/file16131/patch.diff

___
Python tracker 

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



[issue7854] term paper

2010-02-04 Thread Brian Curtin

Changes by Brian Curtin :


--

___
Python tracker 

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



[issue7854] term paper

2010-02-04 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> invalid
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



[issue7854] term paper

2010-02-04 Thread allisonlong

New submission from allisonlong :

affordable http://www.term-paper.biz/custom-term-paper.html";>term 
paper writing services

--
components: None
messages: 98843
nosy: allisonlong
severity: normal
status: open
title: term paper
type: performance
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



[issue5341] A selection of spelling errors and typos throughout source

2010-02-04 Thread Ezio Melotti

Changes by Ezio Melotti :


--
status: closed -> open

___
Python tracker 

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



[issue5341] A selection of spelling errors and typos throughout source

2010-02-04 Thread Éric Araujo

Changes by Éric Araujo :


Added file: http://bugs.python.org/file16130/fix-builtin_3.2.diff

___
Python tracker 

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



[issue5341] A selection of spelling errors and typos throughout source

2010-02-04 Thread Éric Araujo

Éric Araujo  added the comment:

Hello

I fixed a few remaining misuses of “builtin” in the source. There is some diff 
noise due to reformatting paragraphs where the addition of the hyphen caused 
the line to get over 80 characters.

Note that I didn’t check the use of “built-in”, for fear of having too much 
files to review.

I looked only in Doc. I’ve found misuses in other places, but reviewing the 
whole source would take more time than I had on my hands.

Please review.

Regards

--
Added file: http://bugs.python.org/file16129/fix-builtin_2.7.diff

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Chris Rebert

Chris Rebert  added the comment:

Thanks to all for the copious feedback & suggestions, and R. David Murray for 
his superior docs writing skills!

--

___
Python tracker 

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



[issue7851] WatchedFileHandler needs to be references as handlers.WatchedFileHandler in conf files

2010-02-04 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +vinay.sajip
priority:  -> normal
stage:  -> needs patch
type:  -> behavior
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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread R. David Murray

R. David Murray  added the comment:

Merged as part of r77961 (2.6), r77962 (py3k), and r77963 (3.1).  Print fixed 
for py3.

--
stage: patch 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



[issue7728] test_timeout should use "find_unused_port" helper

2010-02-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Can you provide a patch?

--
keywords: +easy
type:  -> behavior

___
Python tracker 

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



[issue7848] copy.copy corrupts objects that return false value from __getstate__

2010-02-04 Thread R. David Murray

Changes by R. David Murray :


--
priority:  -> normal
resolution:  -> duplicate
stage:  -> committed/rejected
superseder:  -> deepcopy erroneously doesn't call __setstate__ if __getstate__ 
returns empty dict

___
Python tracker 

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



[issue6827] deepcopy erroneously doesn't call __setstate__ if __getstate__ returns empty dict

2010-02-04 Thread R. David Murray

R. David Murray  added the comment:

At the very least the documentation should be updated to warn that cooperating 
__getstate__ and __setstate__ methods must make sure the state object can never 
take on a False value.

--

___
Python tracker 

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



[issue6827] deepcopy erroneously doesn't call __setstate__ if __getstate__ returns empty dict

2010-02-04 Thread R. David Murray

R. David Murray  added the comment:

The documentation also says, "if the object defines both a __getstate__ and a 
__setstate__ method, the state object does not need to be a dictionary and the 
methods can do what they want."  In issue 7848 (which I will close as a 
duplicate of this issue), the object wants to return a single integer as the 
state, and that integer can happen to be zero, so clearly "anything they want" 
is demonstrably not true.  Granted that this can also be worked around with a 
__new__ method, it feels like a broken API.  It unnecessarily complicates the 
implementation of objects that implement the protocol but whose state object 
can legitimately taken on a False value.  It also breaks the principle of least 
surprise for someone taking advantage of the "anything they want" clause (it 
may not occur to them that the 'black blox' state they are passing between 
their methods could take on a False value...and therefore break their code).

Since this was clearly a conscious choice for new-style classes, does anyone 
know why it was made?

--
keywords: +easy
nosy: +r.david.murray
priority:  -> normal
status: pending -> open
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Eric Smith

Eric Smith  added the comment:

When merging to py3k, don't forget to modify the print statement to be a 
function.

--
status: pending -> open

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

No, it's also in 2.6.

--

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Has this behavior changed between 2.6 and 2.7?

--

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Indeed, it seems the exception isn't always normalized.

--
nosy: +benjamin.peterson, pitrou

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Nick Coghlan

Nick Coghlan  added the comment:

Committed for 2.7 as r77959.

Still needs to be merged to the other branches.

--
resolution:  -> accepted
status: open -> pending

___
Python tracker 

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



[issue7848] copy.copy corrupts objects that return false value from __getstate__

2010-02-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +alexandre.vassalotti

___
Python tracker 

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



[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-04 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Hmm, test_file.py is for the new IO library (backported from 3.x). You should 
use test_file2k.py for tests against the 2.x file object.

Also, readinto() should take something such as a bytearray() as argument, not a 
string.

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



[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-04 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +loewis

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Nick Coghlan

Changes by Nick Coghlan :


Removed file: http://bugs.python.org/file16098/subprocess.rst.patch

___
Python tracker 

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



[issue5211] Fix complex type to avoid coercion in 2.7.

2010-02-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

> Yes, that was what I was proposing.  But as you point out, the new
> behaviour wouldn't even match the behaviour of Python 3.x, so it really
> wouldn't be a terribly useful change.

Hmm.  I take this back:  if complex were made 'new-style' in 2.7, then it 
*would* be possible to write fairly obvious code (not using coerce or 
__coerce__) that operated in the same way in both 2.7 and 3.2.  So I still 
think it's worth considering.

--

___
Python tracker 

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



[issue5211] Fix complex type to avoid coercion in 2.7.

2010-02-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

> As you pointed out in issue 3734, the patch is basically:
> 

Yes, that's the essence of it.  In addition, each of the functions implementing 
a complex special method would need to do its own argument conversion.  
(Compare the implementation of complex_add in py3k with that in trunk.)

--

___
Python tracker 

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



[issue5211] Fix complex type to avoid coercion in 2.7.

2010-02-04 Thread Mark Dickinson

Mark Dickinson  added the comment:

Blair:  I don't think you'll have any problems getting the behaviour you in 
Python 3.  For example:

Python 3.2a0 (py3k:77952, Feb  4 2010, 10:56:12) 
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> class xcomplex(complex):
... def __add__(self, other): return xcomplex(complex(self) + other)
... __radd__ = __add__
... 
>>> xz = xcomplex(1+2j)
>>> all(type(xz + y) is type(y + xz) is xcomplex for y in (1, 10.0, 10+1j, xz))
True

So I don't consider that the removal of coerce and the __coerce__ magic method 
is a step backward:  it still allows mixed-type operations, but without coerce 
the rules for those operations are significantly cleaner.

The real problem case in 2.6.4 seems to be when doing  + 
:  in this case, Python first calls complex.__coerce__ 
(which returns its arguments unchanged), then complex.__add__.  None of the 
xcomplex methods even gets a look in, so there's no opportunity to force the 
return type to be xcomplex.

If you look at the source (see particularly the binary_op1 function in 
Objects/abstract.c ) you can see where this behaviour is coming from.  The 
complex type (along with its subclasses) is classified as an 'old-style' 
number, while ints, longs and floats are 'new-style' (note that this has 
nothing to do with the distinction between old-style and new-style classes).  
Operations between new-style numbers use the scheme described in the 
documentation, but where old-style numbers are involved there's an extra 
coercion step.  In particular, when adding a complex to an xcomplex, the rule 
you quoted (about the case when the right operand is an instance of a subclass 
of the class of the left operand) isn't applied.

It's too risky to change the general behaviour for old-style numbers:  I don't 
think there are any old-style numbers besides complex in the Python code, but 
there may well be some in third party extensions.  Certainly documenting it 
better would be an option, and making complex a new-style number for Python 2.7 
seems like a reasonable thing to consider.

--

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Eric Smith

Eric Smith  added the comment:

I think this is an improvement to the existing docs, and should be committed.

--

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Chris Rebert

Changes by Chris Rebert :


Removed file: http://bugs.python.org/file16109/subprocess.rst.patch

___
Python tracker 

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



[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-04 Thread Chris Rebert

Chris Rebert  added the comment:

Okay, now if this could just get dev review...

--
Added file: http://bugs.python.org/file16128/subprocess.rst.patch

___
Python tracker 

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



[issue4978] allow unicode keyword args

2010-02-04 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Maybe not.  It's arguably a bug that adding unicode_literals breaks keyword 
arguments.  Guido seems to (mostly) agree that it's a bug we just never got 
around to fixing.

http://www.mail-archive.com/python-...@python.org/msg45346.html

--

___
Python tracker 

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



[issue7847] Remove 'python -U' or document it

2010-02-04 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

This is really all I'm thinking about.

--
keywords: +needs review, patch
stage:  -> patch review
versions: +Python 2.6
Added file: http://bugs.python.org/file16127/7847.patch

___
Python tracker 

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



[issue4978] allow unicode keyword args

2010-02-04 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc  added the comment:

Why backport? Isn't this a new feature?

--

___
Python tracker 

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



[issue7848] copy.copy corrupts objects that return false value from __getstate__

2010-02-04 Thread Albertas Agejevas

Albertas Agejevas  added the comment:

This bug is a duplicate of issue6827, sorry.

--

___
Python tracker 

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-04 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
status: closed -> open

___
Python tracker 

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



[issue4978] allow unicode keyword args

2010-02-04 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

release blocker for 2.6.5

--
priority:  -> release blocker

___
Python tracker 

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



[issue7788] segfault when deleting from a list using slice with very big `step' value

2010-02-04 Thread Marcin Bachry

Marcin Bachry  added the comment:

I had odd problems matching line numbers reported by Windows compiler
to actual sources, so I used "gcc -Wextra" to produce (even more)
signedness warnings against Python 2.x r77957:

  listobject.c:132: warning: comparison between signed and unsigned integer 
expressions
  listobject.c:1435: warning: comparison between signed and unsigned integer 
expressions
  listobject.c:2639: warning: comparison between signed and unsigned integer 
expressions
  listobject.c:2655: warning: comparison between signed and unsigned integer 
expressions
  listobject.c:2661: warning: comparison between signed and unsigned integer 
expressions
  listobject.c:2670: warning: comparison between signed and unsigned integer 
expressions
  bytearrayobject.c:708: warning: comparison between signed and unsigned 
integer expressions
  bytearrayobject.c:716: warning: comparison between signed and unsigned 
integer expressions
  bytearrayobject.c:920: warning: comparison between signed and unsigned 
integer expressions
  arraymodule.c:745: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:751: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:835: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:890: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:1228: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:1310: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:1326: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:1389: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:1450: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:1807: warning: comparison between signed and unsigned integer 
expressions
  arraymodule.c:1814: warning: comparison between signed and unsigned integer 
expressions

Most of them are due to comparisons between "size_t" variables and
Py_SIZE() macro which points to signed "ob_size" member of type
structure.  Because the sequence types above don't hold negative
numbers in "ob_size", I think we can silence the warnings by doing
explicit casts to "size_t".  Or we can ignore the warnings in
buildbot.  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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-04 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

release blocker for 2.6.5

--
priority:  -> release blocker

___
Python tracker 

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



[issue6877] enable compilation of readline module on Mac OS X 10.5 and 10.6

2010-02-04 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

The readline-libedit-2.patch no longer applies against the 2.6 branch because 
of changes in setup.py since then.  If this is fixed and the subsequent patch 
is reviewed and approved, then this can be landed for Python 2.6.5.

--

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Florent Xicluna

Changes by Florent Xicluna :


Added file: http://bugs.python.org/file16126/case_contextmanager_exit.py

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file16125/case_contextmanager_exit.py

___
Python tracker 

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



[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Florent Xicluna

New submission from Florent Xicluna :

On __exit__(), the 3rd argument "exc_value" should contain the instance of the 
exception.

But in most cases, it contains only the string representation of the exception.

See attached test case.
Same behavior for KeyError, AttributeError, RuntimeError, ...

--
components: Interpreter Core
files: case_contextmanager_exit.py
messages: 98817
nosy: flox
priority: high
severity: normal
stage: test needed
status: open
title: on __exit__(), exc_value does not contain the exception.
type: behavior
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file16125/case_contextmanager_exit.py

___
Python tracker 

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



[issue4978] allow unicode keyword args

2010-02-04 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Really trivial back port of r68805 from trunk.

--
assignee:  -> benjamin.peterson
components: +Interpreter Core -Library (Lib)
keywords: +needs review
resolution: accepted -> 
stage:  -> patch review
status: closed -> open
type: feature request -> behavior
versions: +Python 2.6
Added file: http://bugs.python.org/file16124/py26-backport.patch

___
Python tracker 

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



[issue4978] allow unicode keyword args

2010-02-04 Thread Barry A. Warsaw

Changes by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue7852] [PATCH] Drop "Computer" from "Apple Computer" in plistlib

2010-02-04 Thread Wang Chun

New submission from Wang Chun :

Apple's official utilities had been dropped the word "Computer". We should 
follow them.

imac:~$ cat test.py
__import__('plistlib').writePlist({}, 'test.plist')
imac:~$ python test.py
imac:~$ cat test.py
__import__('plistlib').writePlist({}, 'test.plist')
imac:~$ python test.py
imac:~$ cat test.plist

http://www.apple.com/DTDs/PropertyList-1.0.dtd";>




imac:~$ plutil -convert xml1 test.plist
imac:~$ cat test.plist

http://www.apple.com/DTDs/PropertyList-1.0.dtd";>



imac:~$

--
components: Library (Lib)
files: plistlib.diff
keywords: patch
messages: 98815
nosy: wangchun
severity: normal
status: open
title: [PATCH] Drop "Computer" from "Apple Computer" in plistlib
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file16123/plistlib.diff

___
Python tracker 

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