[issue1685453] email package should work better with unicode

2009-03-31 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

Probably these are related too. #5259 #5304

--
dependencies: +email/base64mime.py cannot work, smtplib is broken in Python3
nosy: +ocean-city

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



[issue5585] implement initializer for multiprocessing.BaseManager.start()

2009-03-31 Thread lekma

lekma lekma...@gmail.com added the comment:

The same against py3k.

Jesse, is there any chance that this will make it in, or should I just
go and implement a local solution?

--
Added file: http://bugs.python.org/file13508/Issue5585_2_py3k.patch

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



[issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header

2009-03-31 Thread Chris Withers

Chris Withers ch...@simplistix.co.uk added the comment:

It's probably worth noting that changing:

from email.mime.text import MIMEText

m = MIMEText('foo')
m['subject']='something long'

...to:

from email.header import Header
m = MIMEText('foo')
m['subject']=Header('something long')

...will do folding without the \t problem, even in Python 2.6

I guess the moral of the story is that all headers should really be
header objects. I think Barry has some ideas on that ;-)

--
keywords:  -patch

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



[issue1569040] Speed up using + for string concatenation

2009-03-31 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

IIRC, this has already been rejected on python-dev in a number of
discussions (check for ropes in the search).  Also, Armin has long ago
implemented some optimizations for string concatenation in a number of
contexts.

--
nosy: +rhettinger

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



[issue2578] Figure out what to do with unittest's redundant APIs

2009-03-31 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

New patch uploaded.  Based on mfoord's 200903301411 version.  Adds
documentation.  Cleans up a few things and fixes names on a few things.

This patch has been put up for review in:

 http://codereview.appspot.com/32080

--
Added file: http://bugs.python.org/file13509/unittest-new-asserts-gps03.diff.txt

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



[issue5131] pprint doesn't know how to print a set or a defaultdict

2009-03-31 Thread Nick Craig-Wood

Nick Craig-Wood n...@craig-wood.com added the comment:

Oops, my bad, I assumed the patch would by for py3k!

I applied it to trunk and tested it. It works very well - thank you for
fixing that :-)

--

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



[issue2578] Figure out what to do with unittest's redundant APIs

2009-03-31 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

fixed the unintentional extra edits in the docs in gps04.

--
Added file: http://bugs.python.org/file13510/unittest-new-asserts-gps04.diff.txt

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



[issue2578] Figure out what to do with unittest's redundant APIs

2009-03-31 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


Removed file: 
http://bugs.python.org/file13480/unittest-new-asserts-gps02.diff.txt

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



[issue2578] Figure out what to do with unittest's redundant APIs

2009-03-31 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


Removed file: http://bugs.python.org/file13484/unittest-new-asserts.diff

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



[issue2578] Figure out what to do with unittest's redundant APIs

2009-03-31 Thread Gregory P. Smith

Changes by Gregory P. Smith g...@krypto.org:


Removed file: 
http://bugs.python.org/file13509/unittest-new-asserts-gps03.diff.txt

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-03-31 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

Ok, so here's what needs to happen to make this work. Note that all of
the following needs to happen at *runtime*, not at the time at which the
.msi is created:

(1) Find all sub-keys of SOFTWARE\Python\PythonCore in the registry.
These are the versions, e.g. 2.5, 2.6, 3.0, etc.

(2) For each version, get the Python installation dir from
SOFTWARE\Python\PythonCore\%(version)s\InstallPath

(3) Populate the ListView table with entries containing these
installation paths, e.g. something like:

TARGETDIR 1 C:\Python24
TARGETDIR 2 C:\Python25
...

(4) Modify Control/SelectDirectoryDlg so that it uses a ListView (filled
with the above values) instead of a DirectoryCombo.

(5) Make a couple minor edits to bdist_msi.py to stop it from inserting
the version into the .msi name for Python-only modules.

I looked into a couple ways of doing this. Ideally, we should avoid
using a CustomAction, which would require maintaining some additional C
or VBScript code, and instead do everything through the database tables
that are built into all .msi files. Some problems I've run into with
this approach:

* The only way to read the registry AFAICT is through the RegLocator
table: http://msdn.microsoft.com/en-us/library/aa371171(VS.85).aspx. But
RegLocator can only look up single key values, and cannot look up the
sub-keys under a key (which is what we need to get the Python versions).

* We could hard code all the possible versions, and stick all the
corresponding SOFTWARE\...\%(version)s\InstallPath keys into RegLocator.
Then these can be read into properties using the AppSearch table
(http://msdn.microsoft.com/en-us/library/aa371559(VS.85).aspx), and we
could then fill in the ListView table with the install paths. But
AFAICT, there is no way to keep from putting one row into the ListView
table for each version of Python we statically define. Which means a
bunch of inappropriate rows at runtime (e.g. there'd be a row for Python
2.3 even if there was no Python 2.3 on your system).

Basically, the problem is that we'd like to determine what goes into the
ListView table at runtime, but I can only figure out how to put things
into it at the time at which the .msi is built.

I'm going to continue to look into this, and I'd welcome suggestions
anyone has.

The last resort would be to create a CustomAction using a DLL or
VBScript, but I'm really trying to avoid that, both because maintaining
and debugging such code is painful, and because Michael Foord suggested
that some virus checkers will complain about .msi files with embedded
VBScript (probably forcing me to maintain a DLL - ugh!).

--

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



[issue3392] subprocess fails in select when descriptors are large

2009-03-31 Thread Frank Chu

Frank Chu fpm...@gmail.com added the comment:

Hi,

This is a patch that uses poll() in subprocess.communicate() if it is
available.  This is my first patch and may contain style errors.  I try
to conform to PEP 8 as close as I can.

Besides the discussion here, I would like to add this is desired because
select() has its own limit on the file descriptor size, in FD_SETSIZE. 
Unix has a different limit on the largest file descriptor, in 'ulimit
-n'.  When the select() limit is smaller than the ulimit limit, it is
not hard to get a file descriptor that is beyond FD_SETSIZE.  In that
case select() simply does not work.  Since there is no precise way to
force file descriptor to be small, the only workaround seems to be hack
like what hte first poster yorick suggests.

This is tested via 'python regrtest.py -w test_subprocess' under a
system that supports poll().  I don't have a system that does *not*
support poll, but I've done some manual edits to force that code path
and test it as well.  The test passes, which I think should be good
enough as it has several tests on communicate().

This patch is against 2.6.

--
keywords: +patch
nosy: +fpmc
Added file: http://bugs.python.org/file13511/subprocess_with_poll.diff

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



[issue1659171] Calling tparm from extension lib fails in Python 2.5

2009-03-31 Thread Richard B. Kreckel

Richard B. Kreckel ric...@users.sourceforge.net added the comment:

I just tried Python 2.6 (r26:66714, Feb 21 2009, 05:33:00) from SUSE
Linux Enterprise Server 11 (i586) and it didn't fail. This appears to
have been fixed, somehow.

--

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



[issue1732662] socket makefile objects are not independent

2009-03-31 Thread Jan Ondrej

Jan Ondrej ondr...@users.sourceforge.net added the comment:

I can't confirm this bug on Fedora 8 or Fedora 10.
I think it's fixed now and should be closed.
Also tested on ubuntu-hardy without problems.

--

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



[issue4753] Faster opcode dispatch on gcc

2009-03-31 Thread Marc-Andre Lemburg

Marc-Andre Lemburg m...@egenix.com added the comment:

On 2009-03-31 03:19, A.M. Kuchling wrote:
 A.M. Kuchling li...@amk.ca added the comment:
 
 Is a backport to 2.7 still planned?

I hope it is.

--

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



[issue5620] The attribute's action of an object is not correct.

2009-03-31 Thread edmundy

New submission from edmundy yong.su...@163.com:

The following is the test code.

class C1:
myurl = []  
def test(self):
url = [5,6,7]
self.myurl.extend(url)  
def testv():
c = C1()
c.test()
print(c.myurl)

i = 0
while i10 :
testv()
i = i+1

The output is :

[5, 6, 7]
[5, 6, 7, 5, 6, 7]
[5, 6, 7, 5, 6, 7, 5, 6, 7]
[5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7]
[5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7]
[5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7]
[5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7]
[5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 
7]
[5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 
7, 5, 6, 7]
[5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 7, 5, 6, 
7, 5, 6, 7, 5, 6, 7]

The myurl of class C1 is not set to [] when a new object is created.
All objects use the same memory.

--
components: None
messages: 84765
nosy: Yong yang
severity: normal
status: open
title: The attribute's action of an object is not correct.
type: behavior
versions: Python 3.0

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



[issue5497] openssl compileerror with original source

2009-03-31 Thread Christian Heimes

Christian Heimes li...@cheimes.de added the comment:

For legal reasons we can't ship Python with certain algorithms. If I can
recall correctly IDEA is one of the patented algorithms. The patch is
looking goo.d

--

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



[issue992389] attribute error after non-from import

2009-03-31 Thread Nick Coghlan

Nick Coghlan ncogh...@gmail.com added the comment:

This came up on python-dev again recently:
http://mail.python.org/pipermail/python-dev/2009-March/087955.html

--

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



[issue5585] implement initializer for multiprocessing.BaseManager.start()

2009-03-31 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

On Mar 31, 2009, at 2:12 AM, lekma rep...@bugs.python.org wrote:


 lekma lekma...@gmail.com added the comment:

 The same against py3k.

 Jesse, is there any chance that this will make it in, or should I just
 go and implement a local solution?


I'm thinking about it and plan on discussing it with other core devs  
today. Altering the Api is not something done lightly

--

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



[issue1161031] Neverending warnings from asyncore

2009-03-31 Thread Aleksi Torhamo

Aleksi Torhamo alexerion+pythonb...@gmail.com added the comment:

Please correct me, if i'm wrong, but this seems to be a real bug, caused
by people thinking that handle_expt is something like handle_error.

As Tony stated, the docs say that handle_expt is called when out-of-band
data arrives, and that is - i think - correct.
poll, which uses select, calls _exception - handle_expt_event with fds
from the third set of select. The manpage select_tut(2) has example
code, which has a comment indicating that the third set is supposed to
contain sockets with OOB data.
poll2, however, calls readwrite, which calls handle_expt_event on error
conditions. Furthermore, it calls handle_read_event on POLLPRI, which
(according to the manpage of poll(2)) is supposed to indicate OOB data
when using poll.

Since handle_error is intended for python exceptions, currently there is
no proper method to call on POLLERR and POLLNVAL, unless handle_close is
called. With POLLNVAL, handle_close seems like the correct thing to do
(manpage says it indicates that fd is not open.) With POLLERR, i have no
idea. Manpage says Error condition, but from that, it's hard to say
whether it refers to a temporary error condition or not.

So, i think readwrite should look something like this:
(Assuming POLLERR - handle_close, otherwise a new handler would
probably have to be introduced)

if flags  select.POLLPRI:
obj.handle_expt_event()
if flags  select.POLLIN:
obj.handle_read_event()
if flags  select.POLLOUT:
obj.handle_write_event()
if flags  (select.POLLERR | select.POLLNVAL | select.POLLHUP):
obj.handle_close()

--
nosy: +alexer

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



[issue4753] Faster opcode dispatch on gcc

2009-03-31 Thread Antoine Pitrou

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

Andrew, your patch disables the optimization that HAS_ARG(op) is a
constant when op is known by the compiler (that is, inside a
TARGET_##op label), so I'd rather keep the version which is currently
in SVN.

--
versions:  -Python 3.1

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



[issue1739789] Accelerate attr dict lookups

2009-03-31 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +collinwinter, jyasskin

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



[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

Well, I think your patch has some issues.

 import mmap
 m = mmap.mmap(-1, 10)
 m.move(10, 10, 0) # legal, should not fail
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: source out of range
 m.move(9, 9, -1) # should not crash
(crash)

I hesitated to commit my patch because mmap.move is using unsigned long,
but I thought it should use size_t or Py_ssize_t (If mmap should
represent total memory area, it may have to use size_t, but maybe it
should use Py_ssize_t as well as other python modules like string)

Anyway, I'll commit my patch before Python2.6.2 will be released. Crash
is not good thing for any time. :-)

--

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



[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2009-03-31 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
versions: +Python 2.7, Python 3.1

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



[issue1717900] Destructor behavior faulty

2009-03-31 Thread Antoine Pitrou

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

Armin's proposal is in #812369, closing this bug.
(it is not obvious Armin's patch is enough to solve the problem at hand,
but the problem is well-known anyway and there are certainly other bug
entries pointing to it :-))

--
nosy: +pitrou
resolution:  - duplicate
status: open - closed
superseder:  - module shutdown procedure based on GC

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



[issue1161031] Neverending warnings from asyncore

2009-03-31 Thread Giampaolo Rodola'

Giampaolo Rodola' billiej...@users.sourceforge.net added the comment:

@Aleksy
http://bugs.python.org/issue4501

--

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



[issue1717900] Destructor behavior faulty

2009-03-31 Thread Antoine Pitrou

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

By the way, an easy way to fix it would probably to rewrite the
destructor in the following way (haven't tested):

def __del__(self):
self.__class__.population -= 1

--

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



[issue812369] module shutdown procedure based on GC

2009-03-31 Thread Antoine Pitrou

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

Retargetting, and I hope someone can take a look at the patch and give
it the green light :-)

--
stage:  - patch review
type:  - behavior
versions: +Python 2.7, Python 3.1 -Python 2.6, Python 3.0

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



[issue5585] implement initializer for multiprocessing.BaseManager.start()

2009-03-31 Thread lekma

lekma lekma...@gmail.com added the comment:

 I'm thinking about it and plan on discussing it with other core devs  
 today. Altering the Api is not something done lightly
yep.
Thanks for considering it.

--

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



[issue5039] Adjust reference-counting note

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

It's all right, I spotted that and added the C in the commit.

--

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



[issue5585] implement initializer for multiprocessing.BaseManager.start()

2009-03-31 Thread R. David Murray

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

I'm a bit confused here. The patch only adds a small feature to
BaseManager and subtypes (the same way Pool does it already). AFAICT the
Thread/Process API equivalence is preserved. Am I missing something?

No, I'm the one who was missing something.  I obviously didn't look at
the patch carefully enough.

--

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



[issue1659410] Minor AST tweaks

2009-03-31 Thread Jeremy Hylton

Changes by Jeremy Hylton jer...@alum.mit.edu:


--
nosy: +jhylton

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



[issue1161031] Neverending warnings from asyncore

2009-03-31 Thread Aleksi Torhamo

Aleksi Torhamo alexerion+pythonb...@gmail.com added the comment:

Sorry for the noise.

I just registered, and started going through the open issues for
asyncore in order. I'll read them all through before commenting on the
next one..

I also bumped to this:
http://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/a38270231620870e?lnk=gstq=asyncore

It seems lots of things i have been thinking about have already been
done, but the whole asyncore is at a standstill. Any pointers on where i
should look if i want to help with doing something to the current state
of affairs?

Thanks.

--

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



[issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll)

2009-03-31 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

I noticed this warning still happens on release26-maint. Is backporting
this to release26-maint not good for binary compatibility reason?

--

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



[issue4315] On some Python builds, exec in a function can't create shadows of variables if these are declared global in another function of the same module

2009-03-31 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

Committed revision 70809 (trunk).  Needs to be backported.

--
nosy: +jhylton
resolution:  - fixed
status: open - closed

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



[issue5387] mmap.move crashes by integer overflow

2009-03-31 Thread Hirokazu Yamamoto

Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment:

Committed in r70800(trunk), r70803(release26-maint), r70808(py3k),
r70811(release30-maint).

--
resolution:  - fixed
status: open - closed

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



[issue4773] HTTPMessage not documented and has inconsistent API across 2.6/3.0

2009-03-31 Thread Senthil

Senthil orsent...@gmail.com added the comment:

I spent sometime on the patch which replaces the self.msg usage with
self.headers in http.client. Everything is fine.
The next step is to provide an interface in the urllib.response and the
equivalent changes to py2k.

--
assignee: georg.brandl - jhylton
resolution:  - accepted

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



[issue1153622] eval does not bind variables in lambda bodies correctly

2009-03-31 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

The current docs cover this case:
http://docs.python.org/reference/executionmodel.html#interaction-with-dynamic-features

It basically says that code compiled via exec / eval can't access free
variables.

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

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



[issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll)

2009-03-31 Thread Amaury Forgeot d'Arc

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

The function is static and not visible to other modules.
The patch can be backported without compatibility problems.

--

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



[issue4951] failure in test_httpservers

2009-03-31 Thread Ned Deily

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

Also seeing on OS X.  Without having looked at the code yet, I wonder if 
this might be related to Issue1711605.

--
nosy: +nad

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



[issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll)

2009-03-31 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

I'll be back porting it today

--

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



[issue5002] multiprocessing/pipe_connection.c compiler warning (conn_poll)

2009-03-31 Thread Jesse Noller

Jesse Noller jnol...@gmail.com added the comment:

MErged 70814

--

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



[issue991196] An inconsistency with nested scopes

2009-03-31 Thread Jeremy Hylton

Changes by Jeremy Hylton jer...@alum.mit.edu:


--
assignee:  - jhylton
nosy: +jhylton

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



[issue1569040] Speed up using + for string concatenation

2009-03-31 Thread Larry Hastings

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

rhettinger: It's a bit unfair to paint the lazy string concatenation
patch with the adjective ropes, then point out ropes have been
rejected many times.  Lazy string concatenation objects are a form of
specialized rope but they don't share the downsides of these other
ropes proposals.

The major problems with conventional rope implementations are a)
slowdown, b) complexity, and c) you must use a new API to interact with
them:
http://mail.python.org/pipermail/python-dev/2000-February/002321.html

Lazy string concatenation makes Python faster, it isolates its
complexity locally inside the string object implementation, and it makes
only two changes to the API.  Those two changes are: one, you may no
longer access the string directly, and two, APIs that returned the
internal string (PyString_AsString, PyString_AS_STRING*) may fail in
low-memory conditions.  You don't need to use a new API to interact with
the string; traditional APIs like strchr work fine.

* Those were the names in 2.6 anyway.  I don't know what the modern
names would be in 3.1.

--

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



[issue5621] Add description of special case to Assignment statements section

2009-03-31 Thread John Posner

New submission from John Posner john_posner_a...@post.harvard.edu:

The subsection Augmented assignment statements includes a note on this
special case:

  a.x += 1

But the parent section Assignment statements does not include such a
note, even though it's essentially the same situation. I suggest
replacing the bulleted paragraph that begins If the target is an
attribute reference with the following:

-

*   If the target is an attribute reference: The primary expression in
the reference is evaluated. It should yield an object with
assignable attributes; if this is not the case, TypeError is raised.
That object is then asked to assign the assigned object to the given
attribute; if it cannot perform the assignment, it raises an
exception (usually but not necessarily AttributeError).

If the object is a class instance and the attribute
reference occurs on both sides of the assignment operator; for example::

a.x = a.x + 1

... in the RHS expression, ``a.x`` is evaluated with
``getattr()``, which can access either an instance attribute or (if
no instance attribute exists) a class attribute. The LHS target
``a.x`` is assigned with ``setattr()``, which *always* accesses
an instance attribute, creating it if necessary. Thus, the two
occurrences of ``a.x`` do not necessarily refer to the same
variable. If the RHS expression refers to a class attribute, the LHS
creates a new instance attribute as the target of the assignment.
(This description does not necessarily
apply to attributes defined with ``property()``, which are accessed
with user-defined functions instead of ``getattr()`` and ``setattr()``).

See section Augmented assignment statements for a similar note on
attribute references.

-

--
assignee: georg.brandl
components: Documentation
messages: 84790
nosy: georg.brandl, jjposner
severity: normal
status: open
title: Add description of special case to Assignment statements section
versions: Python 2.6, Python 3.0

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



[issue5620] The attribute's action of an object is not correct.

2009-03-31 Thread Maksim Kozyarchuk

Maksim Kozyarchuk maksim_kozyarc...@yahoo.com added the comment:

AFAIK, This is expected behavior.  myurl is a class attribute if you
want it to be different per instance you should re-initialize it in the
__init__ method.  See below. 

 class C1(object):
... def __init__(self):
... self.myurl = []
... def test(self):
... self.myurl.extend([5,6,7])
...
[44085 refs]
 def testv():
... c = C1()
... c.test()
... print(c.myurl)
...
[44108 refs]
 for i in range(10):
... testv()
...
[5, 6, 7]
[5, 6, 7]
[5, 6, 7]
[5, 6, 7]
[5, 6, 7]
[5, 6, 7]
[5, 6, 7]
[5, 6, 7]
[5, 6, 7]
[5, 6, 7]
[44119 refs]

--
nosy: +Kozyarchuk

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



[issue5311] bdist_msi generates version number for pure Python packages

2009-03-31 Thread Martin v. Löwis

Martin v. Löwis mar...@v.loewis.de added the comment:

In

http://www.installsite.org/pages/en/msi/articles/MultiListBox/index.htm

there is a demo how to modify the listbox contents dynamically using 
VBScript.

--

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



[issue5622] wrong error from curses.wrapper if curses initialization fails

2009-03-31 Thread Ned Deily

New submission from Ned Deily n...@acm.org:

wrong error from curses.wrapper if curses initialization fails

One way to reproduce is trying under IDLE.app in OS X:

  import curses
  def scr(a):
a.getch()

  curses.wrapper(scr)

Traceback before patch:
  UnboundLocalError: local variable 'stdscr' referenced before 
assignment

Traceback after patch:
  _curses.error: setupterm: could not find terminal

APPLIES 2.6, 2.7, 3.0, 3.1

--
components: Library (Lib)
files: patch-nad0018.txt
messages: 84793
nosy: nad
severity: normal
status: open
title: wrong error from curses.wrapper if curses initialization fails
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file13512/patch-nad0018.txt

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



[issue3392] subprocess fails in select when descriptors are large

2009-03-31 Thread Mattias Engdegård

Mattias Engdegård yor...@users.sourceforge.net added the comment:

The patch looks all right in general. I would use something like

if poll in dir(select)

instead of catching AttributeError which risks hiding bugs in 
_communicate_with_poll().

PEP8 probably wants spaces around the bitwise-or operator.

Some systems cannot use TTYs in poll(2) but this should not be a 
problem here - there is no point in using .communicate() with stdin/
stdout/stderr set to anything but PIPE, right?

--

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



[issue2578] additional unittest type equality methods

2009-03-31 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

Hi Greg, I've mostly reviewed for style...

http://codereview.appspot.com/32080/diff/13/1006
File Doc/library/unittest.rst (right):

http://codereview.appspot.com/32080/diff/13/1006#newcode611
Line 611: assertTrue(expr[, msg])
Make assertTrue the first/preferred/recommended spelling.

http://codereview.appspot.com/32080/diff/13/1006#newcode623
Line 623: :const:`None`.  Note that using :meth:`failUnlessEqual`
improves upon
failUnlessEqal - assertEqual

http://codereview.appspot.com/32080/diff/13/1006#newcode624
Line 624: doing the comparison as the first parameter to
:meth:`failUnless`: the
failUnless - assertTrue

(This kind of change may have to be done throughout.)

http://codereview.appspot.com/32080/diff/13/1010
File Lib/test/test_unittest.py (right):

http://codereview.appspot.com/32080/diff/13/1010#newcode75
Line 75: self.fail(%s and %s do not hash equal % (obj_1, obj_2))
maybe better %r and %r ?

http://codereview.appspot.com/32080/diff/13/1010#newcode84
Line 84: self.fail(%s and %s hash equal, but shouldn't %
ditto?

http://codereview.appspot.com/32080/diff/13/1010#newcode2313
Line 2313: self.assertRaises(self.failureException, self.assertIn,
'elephant', animals)
lin too long

http://codereview.appspot.com/32080/diff/13/1010#newcode2317
Line 2317: self.assertRaises(self.failureException, self.assertNotIn,
'cow', animals)
linr too long

http://codereview.appspot.com/32080/diff/13/1007
File Lib/unittest.py (right):

http://codereview.appspot.com/32080/diff/13/1007#newcode257
Line 257: class AssertRaisesContext(object):
While you're at it, can you add a docstring?

http://codereview.appspot.com/32080/diff/13/1007#newcode332
Line 332: # Map types to custom assertEquals functions that will compare
assertEquals - assertEqual

http://codereview.appspot.com/32080/diff/13/1007#newcode512
Line 512: # should use their type specific assertSpamEquals method to
compare
assertSpamEqual

http://codereview.appspot.com/32080/diff/13/1007#newcode521
Line 521: def _baseAssertEquals(self, first, second, msg=None):
Mind dropping the trailing 's'?

http://codereview.appspot.com/32080/diff/13/1007#newcode526
Line 526: def failUnlessEqual(self, first, second, msg=None):
We had talked about making the 'def' define the recommended name, e.g.
assertNotEqual, and using aliases to keep the other names.  Do you want
to do that at the same time as this change or in a separate one?

http://codereview.appspot.com/32080/diff/13/1007#newcode581
Line 581: def assertSequenceEquals(self, seq1, seq2, msg=None,
seq_type=None):
Drop the trailing 's' in the name?

http://codereview.appspot.com/32080

--
title: Figure out what to do with unittest's redundant APIs - additional 
unittest type equality methods

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



[issue1537721] csv module: add header row to DictWriter

2009-03-31 Thread Skip Montanaro

Skip Montanaro s...@pobox.com added the comment:

I don't see a patch.  Is there some reason that if you need this
you can't simply subclass DictWriter?

--
nosy: +skip.montanaro

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



[issue1161031] Neverending warnings from asyncore

2009-03-31 Thread Brett Cannon

Brett Cannon br...@python.org added the comment:

On Tue, Mar 31, 2009 at 06:39, Aleksi Torhamo rep...@bugs.python.orgwrote:


 Aleksi Torhamo 
 alexerion+pythonb...@gmail.comalexerion%2bpythonb...@gmail.com
 added the comment:

 Sorry for the noise.

 I just registered, and started going through the open issues for
 asyncore in order. I'll read them all through before commenting on the
 next one..

 I also bumped to this:

 http://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/a38270231620870e?lnk=gstq=asyncore

 It seems lots of things i have been thinking about have already been
 done, but the whole asyncore is at a standstill. Any pointers on where i
 should look if i want to help with doing something to the current state
 of affairs?

 Thanks.

Beyond looking at what is in trunk, nothing specific comes to mind.

--
Added file: http://bugs.python.org/file13513/unnamed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1161031
___brbrdiv class=gmail_quoteOn Tue, Mar 31, 2009 at 06:39, Aleksi Torhamo 
span dir=ltrlt;a 
href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/span 
wrote:brblockquote class=gmail_quote style=border-left: 1px solid 
rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;

div class=imbr
Aleksi Torhamo lt;a 
href=mailto:alexerion%2bpythonb...@gmail.com;alexerion+pythonb...@gmail.com/agt;
 added the comment:br
br
/divSorry for the noise.br
br
I just registered, and started going through the open issues forbr
asyncore in order. I#39;ll read them all through before commenting on thebr
next one..br
br
I also bumped to this:br
a 
href=http://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/a38270231620870e?lnk=gstamp;q=asyncore;
 
target=_blankhttp://groups.google.com/group/python-dev2/browse_thread/thread/eec1ddadefe09fd8/a38270231620870e?lnk=gstamp;q=asyncore/abr


br
It seems lots of things i have been thinking about have already beenbr
done, but the whole asyncore is at a standstill. Any pointers on where ibr
should look if i want to help with doing something to the current statebr
of affairs?br
br
Thanks./blockquotedivbrBeyond looking at what is in trunk, nothing 
specific comes to mind. br/div/divbr
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5623] test_fdopen fails with vs2005, release build on Windows 2000

2009-03-31 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc amaur...@gmail.com:

Python trunk, compiled with VS2005 SP1, release build on Windows 2000:
 import os
 fd = os.open(t, 0)
 os.close(fd)
Traceback (most recent call last):
  File stdin, line 1, in module
OSError: [Errno 9] Bad file descriptor

The _PyVerify_fd() returned False for the given fd!
Needless to say that there are many other similar failures. For example,
subprocess does not work.

Digging inside assembly code, I noticed that the __pioinfo structure
compiled inside msvcr80.dll has a sizeof==64 (asssembly code multiplies
by 64 when doing pointer arithmetic); in Debug mode, sizeof==56.
in posixmodule.c, _PyVerify_fd() uses a sizeof of 56...

It appears that Windows 2000 picks the first msvcr80.dll it finds on the
PATH. So I played with copying various versions of it in the target
directory. Here are the results, as reported by Visual Studio in the
Modules pane.

fails: C:\WINNT\system32\msvcr80.dll8.00.50727.1433
fails: C:\python\trunk\PC\VS8.0\msvcr80.dll 8.00.50727.1433
works: C:\python\trunk\PC\VS8.0\msvcr80.dll 8.00.50727.762  
fails: C:\python\trunk\PC\VS8.0\msvcr80.dll 8.00.50727.163  
fails: C:\python\trunk\PC\VS8.0\msvcr80.dll 8.00.50727.42
works: C:\WINNT\system32\msvcr80d.dll   8.00.50727.762

DLL hell...

The manifest embedded inside python27.dll contains
version=8.0.50727.762, which is the only working version.
So the problem will likely not happen on Windows XP, which enforces
manifests.

Is there a way to enforce the manifest information on Windows 2000 as well?
If not, there may be several solutions:
- disable the _PyVerify_fd() stuff on Windows 2000.
- write clever code to detect the real sizeof(ioinfo) (for example:
_get_osfhandle(1) returns __pioinfo[0][1]-osfhnd, which is a file
opened for writing)

--
components: Windows
messages: 84798
nosy: amaury.forgeotdarc, loewis, mhammond
priority: critical
severity: normal
status: open
title: test_fdopen fails with vs2005, release build on Windows 2000
type: behavior
versions: Python 2.7, Python 3.1

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



[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

Good sleuthing Nick!  It's clearly the same bug that Fredrik found.

I tried to test if using Brett' importlib has the same problem, but it
can import neither p.a nor p.b, so that's not helpful as to sorting out
the import semantics.

I believe that at some point many of the details of importlib should be
seen as the reference documentation for the darkest corners of import
semantics.  But it seems we aren't there yet.

--
nosy: +gvanrossum

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



[issue5621] Add description of special case to Assignment statements section

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I'm not sure it belongs there, since normal assignments do not say 
*anything* about the RHS.

--

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



[issue5624] Py3K branch import _winreg instead of winreg

2009-03-31 Thread Maksim Kozyarchuk

New submission from Maksim Kozyarchuk maksim_kozyarc...@yahoo.com:

Number of modules in py3k branch are importing _winreg instead of winreg.

According to fix_import.py module in libpy2to3 all _winreg imports need
to be converted to winreg.

--
components: Library (Lib)
messages: 84801
nosy: Kozyarchuk
severity: normal
status: open
title: Py3K branch import _winreg instead of winreg
type: behavior
versions: Python 3.1

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



[issue5624] Py3K branch import _winreg instead of winreg

2009-03-31 Thread Maksim Kozyarchuk

Maksim Kozyarchuk maksim_kozyarc...@yahoo.com added the comment:

Looking at this now.

--

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



[issue992389] attribute error after non-from import

2009-03-31 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

Sorry, never mind about the importlib bug, that was my mistake.
importlib actually behaves exactly the same way as the built-in import.

I conclude that this is probably the best semantics of import that we
can hope for in this corner case.

I propose to close this as works as intended -- and perhaps document
it somewhere.

--

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



[issue5519] Deletion of some statements in re documentation

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Fixed in r70824.

--
resolution:  - fixed
status: open - closed

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



[issue5621] Add description of special case to Assignment statements section

2009-03-31 Thread John Posner

John Posner john_posner_a...@post.harvard.edu added the comment:

The Assignment statements section *does* talk about the RHS -- but in
a subtle way:

  For targets which are attribute references, the initial
  value is retrieved with a getattr()

The retrieving of the initial value (maybe current value would be
better) occurs on the RHS of the assignment statement.

--

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



[issue3392] subprocess fails in select when descriptors are large

2009-03-31 Thread Mike Coleman

Mike Coleman m...@users.sourceforge.net added the comment:

My original report didn't mention it specifically, but I believe I was
hitting the FD_SETSIZE limit that Frank mentioned.  (Thanks for working
on this!)

--

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



[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-03-31 Thread Ned Deily

New submission from Ned Deily n...@acm.org:

[NOTE: applies to 2.x urllib2 and similar code in merged 3.x urllib]

test_urllib2 can fail because urllib2.FileHandler assumes incorrectly
that the local host has only a single IP address.  It is not uncommon
to have host IP configurations where a host has more than one network
interface and the same IP host name is associated with each address.

Both the urllib module and test_urllib2 use
socket.gethostbyname(socket.gethostname())
to find the host IP address.  But, as can be seen here, 
consecutive calls may produce different addresses depending on the
network configuration and underlying os implementation:

Python 2.6.1 (r261:67515, Dec 17 2008, 23:27:50) 
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type help, copyright, credits or license for more information.
 import socket
 socket.gethostbyname(socket.gethostname())
'10.52.12.105'
 socket.gethostbyname(socket.gethostname())
'10.52.12.105'
 socket.gethostbyname(socket.gethostname())
'10.52.12.205'


This leads to predictable test failures when the calls in test_urllib2
and urllib2.FileHandler return different addresses:

test_urllib2
test test_urllib2 failed -- Traceback (most recent call last):
  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/test/te
st_urllib2.py, line 621, in test_file
r = h.file_open(Request(url))
  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2
.py, line 1229, in file_open
return self.open_local_file(req)
  File 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2
.py, line 1266, in open_local_file
raise URLError('file not on local host')
URLError: urlopen error file not on local host

The simplest way to avoid the test failure is to modify
urllib2.FileHandler to use socket.gethostbyname_ex which returns all
of the IPv4 addresses associated with a hostname:
 socket.gethostbyname_ex(socket.gethostname())
('myhost.net', [], ['10.52.12.205', '10.52.12.105'])

Attached patches for 2.x urllib2 and 3.x urllib do that.  Note that 
there remain other issues in this area:
- when urllib2 is enhanced to support IPv6, code is needed to return
  all of the host's IPv6 addresses as well (- adding a note to open
  Issue1675455)
- the merged 3.0 urlib has two nearly identical functions named
  open_local_file, one each from 2.x urllib.URLopener and
  urllib2.FileHandler, and both use similarly flawed
  socket.gethostbyname(socket.gethostname()) tests but the tests for
  local vs remote file URLs is somewhat different in each.
  (The patches here do not attempt to address this other than to add
   a comment.)

--
components: Library (Lib)
files: patch-nad0017-trunk-26.txt
messages: 84806
nosy: nad
severity: normal
status: open
title: test_urllib2 fails - urlopen error file not on local host
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file13514/patch-nad0017-trunk-26.txt

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



[issue5625] test_urllib2 fails - urlopen error file not on local host

2009-03-31 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


Added file: http://bugs.python.org/file13515/patch-nad0017-py3k-30.txt

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



[issue5566] Minor error in document of PyLong_AsSsize_t

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Fixed first issue in r70825.
Fixed second issue in r70827.

--
resolution:  - fixed
status: open - closed

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



[issue5581] abc.abstractproperty() docs list fget as required; fget is not required by abc.abstractproperty()

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Fixed in r70828, thanks!

--
resolution:  - fixed
status: open - closed

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



[issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support

2009-03-31 Thread Ned Deily

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

Note also Issue5625 - any work for IPv6 should keep in mind that local 
hosts may have more than one IP address.

--
nosy: +nad

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



[issue5548] In the tutorial, PyMODINIT_FUNC is shown as having a return type of void rather than PyObject *

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Thanks, fixed in r70829.

--
resolution:  - fixed
status: open - closed

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



[issue1608921] PyThread_release_lock with pthreads munges errno

2009-03-31 Thread Stephan R.A. Deibel

Stephan R.A. Deibel sdei...@wingware.com added the comment:

If you are at PyCon 2009 sprints, try to see if you can find John
Ehresman in the Python Core sprint to see it happen at line 115 of
threadops.c in the Wing 3.2 source base.  If you're not there or can't
find him, I'll try to make a small example later.  Feel free to email me
directly also at sdeibel at wingware dot com. Note I saw this w/
pthreads and it may be that it does not occur under other threading
implementations.

--

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



[issue991196] An inconsistency with nested scopes

2009-03-31 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

This code behaves as intended.  The module-level execution environment
is different than other environments.  The global scope and local scope
are the same dictionary.  Assignments at the top-level become globals
because of this behavior of the execution environment.  If you want exec
to mimic the top-level environment, you need to pass it a single dictionary.

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

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



[issue5540] file objects in python 3 tutorial

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I found nothing in that document that refers to file objects as seen in
Python 2, e.g. the file type.  I'd still refer to all of Python 3's IO
objects as file objects.

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

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



[issue5624] Py3K branch import _winreg instead of winreg

2009-03-31 Thread Maksim Kozyarchuk

Maksim Kozyarchuk maksim_kozyarc...@yahoo.com added the comment:

Fixed, patch is on appshot.
http://codereview.appspot.com/32083/show

--

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



[issue5626] misleading comment in socket.gethostname() documentation

2009-03-31 Thread Ned Deily

New submission from Ned Deily n...@acm.org:

The documentation for socket.gethostname() contains the following 
comment:

If you want to know the current machine’s IP address, you may want to 
use gethostbyname(gethostname()). This operation assumes that there is a 
valid address-to-host mapping for the host, and the assumption does not 
always hold.

This comment leads to the mistaken assumption that a machine has only 
one IP address, an assumption which results in bugs such as in 
Issue5625.  The comment also does not deal with other address families, 
i.e. IPv6 addresses.  Either the paragraph should be expanded to cover 
multiple addresses and families, requiring the use of other socket 
functions, or the paragraph should simply be removed.

--
assignee: georg.brandl
components: Documentation
messages: 84816
nosy: georg.brandl, nad
severity: normal
status: open
title: misleading comment in socket.gethostname() documentation
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

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



[issue1608805] Py_FileSystemDefaultEncoding can be non-canonical

2009-03-31 Thread Stephan R.A. Deibel

Stephan R.A. Deibel sdei...@wingware.com added the comment:

It appears to be specific to 2.x and does not occur under Python 3.0:

Python 3.0 (r30:67503, Jan 15 2009, 09:27:16)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type help, copyright, credits or license for more information.
 import sys
 sys.getfilesystemencoding()
'utf-8'

Python 2.6.1 (r261:67515, Dec 11 2008, 11:59:39)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type help, copyright, credits or license for more information.
import sys
 sys.getfilesystemencoding()
'UTF-8'

Python 2.5.4 (r254:67916, Mar 16 2009, 09:34:35)
[GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2
Type help, copyright, credits or license for more information.
 import sys
 sys.getfilesystemencoding()
'UTF-8'

(This is on a Ubuntu system where LANG=en_US.UTF-8 is the default)

--

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



[issue4831] exec() behavior - revisited

2009-03-31 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

I think this bug ran out of steam.  Python is behaving as intended, and
I think Georg addressed all of David's questions.

--
nosy: +jhylton
resolution:  - works for me
status: open - closed

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



[issue5529] Backport sys module docs involving import to 2.7

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Done in r70830.

--
resolution:  - fixed
status: open - closed

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



[issue5578] unqualified exec in class body

2009-03-31 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

exec is allowed in a class statement

--
resolution: accepted - rejected
status: open - closed

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



[issue5524] execfile() removed from Python3

2009-03-31 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

It doesn't seem helpful to leave this issue open, particularly since the
title suggest there's a problem with execfile being removed and that's
not going to change.

--
nosy: +jhylton
status: open - closed

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



[issue5621] Add description of special case to Assignment statements section

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Yes, it says that getattr() is used in the section about augassign; but
there the note you refer to is already present.

--
resolution:  - works for me
status: open - pending

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



[issue5623] test_fdopen fails with vs2005, release build on Windows 2000

2009-03-31 Thread Amaury Forgeot d'Arc

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


--
nosy: +krisvale

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



[issue4199] add shorthand global and nonlocal statements

2009-03-31 Thread Jeremy Hylton

Changes by Jeremy Hylton jer...@alum.mit.edu:


--
nosy: +jhylton

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



[issue1346238] A constant folding optimization pass for the AST

2009-03-31 Thread Jeremy Hylton

Changes by Jeremy Hylton jer...@alum.mit.edu:


--
priority: high - normal

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



[issue1503789] Cannot write source code in UTF16

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Why am I assigned this issue?

--
assignee: georg.brandl - 

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



[issue2344] Using an iteration variable outside a list comprehension needs a Py3K warning

2009-03-31 Thread Jeremy Hylton

Changes by Jeremy Hylton jer...@alum.mit.edu:


--
nosy: +jhylton

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



[issue2344] Using an iteration variable outside a list comprehension needs a Py3K warning

2009-03-31 Thread Jeremy Hylton

Jeremy Hylton jer...@alum.mit.edu added the comment:

Seemed like a good idea, but no one knew how to do it.

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

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



[issue1501979] syntax errors on continuation lines

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

I'm not sure if this is necessary; you could argue that the syntax error
really is on the last line, because there the parenthesis is missing.

--

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



[issue1653416] print f, Hello produces no error: normal?

2009-03-31 Thread Skip Montanaro

Changes by Skip Montanaro s...@pobox.com:


--
nosy:  -skip.montanaro

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



[issue1161031] Neverending warnings from asyncore

2009-03-31 Thread Josiah Carlson

Josiah Carlson josiahcarl...@users.sourceforge.net added the comment:

Your analysis WRT handle_expt_event() is correct.  I've been meaning to 
fix that for a while, but I forgot to do it in 2.6/3.0 with all of the 
other changes/fixes.  Looking at the docs, you are also right about 
POLLNVAL.

I also don't *know* what to do when presented with POLLERR, but few 
socket errors are transient (transient errors should be handled by the 
underlying stacks), so I agree with you that they should just be closed.

I went ahead and made the changes as you have suggested, and also made 
the same change with the select-based loop.  Errors on the socket just 
result in closing the socket, resulting in _exception() - close().

Thinking about it, I've also had a change of heart, and added a 
frozenset object called 'ignore_log_types', which specifies the log 
types to ignore.  By default it is populated with 'warning', which 
squelches all currently existing unhandled * event bits.  If you use 
self.log(arg) or self.log_info(one_arg), those lines are unchanged.  
Handle_error() uses the error type, which is also nice, but which you 
can also suppress with ease (though you really should be logging them so 
you can fix your code).

I've attached a version that I think is pretty reasonable.  Comments?  
Questions?

--
keywords: +needs review, patch
versions: +Python 2.7 -Python 2.6
Added file: http://bugs.python.org/file13516/async_no_warn.patch

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



[issue1386675] _winreg specifies EnvironmentError instead of WindowsError

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Re-fixed in r70832.

--
assignee: fdrake - georg.brandl
nosy: +georg.brandl
resolution:  - fixed
status: open - closed

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



[issue5624] Py3K branch import _winreg instead of winreg

2009-03-31 Thread Maksim Kozyarchuk

Maksim Kozyarchuk maksim_kozyarc...@yahoo.com added the comment:

Fixed Typo, and Re-Uploaded
http://codereview.appspot.com/28156/show

--

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



[issue2578] additional unittest type equality methods

2009-03-31 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

Reviewers: fuzzyman, GvR,

http://codereview.appspot.com/32080/diff/13/1006
File Doc/library/unittest.rst (right):

http://codereview.appspot.com/32080/diff/13/1006#newcode611
Line 611: assertTrue(expr[, msg])
On 2009/03/31 15:01:06, GvR wrote:
 Make assertTrue the first/preferred/recommended spelling.

Done.

http://codereview.appspot.com/32080/diff/13/1006#newcode623
Line 623: :const:`None`.  Note that using :meth:`failUnlessEqual`
improves upon
On 2009/03/31 15:01:06, GvR wrote:
 failUnlessEqal - assertEqual

Done.

http://codereview.appspot.com/32080/diff/13/1006#newcode624
Line 624: doing the comparison as the first parameter to
:meth:`failUnless`: the
On 2009/03/31 15:01:06, GvR wrote:
 failUnless - assertTrue

 (This kind of change may have to be done throughout.)

Done.

http://codereview.appspot.com/32080/diff/13/1010
File Lib/test/test_unittest.py (right):

http://codereview.appspot.com/32080/diff/13/1010#newcode75
Line 75: self.fail(%s and %s do not hash equal % (obj_1, obj_2))
On 2009/03/31 15:01:06, GvR wrote:
 maybe better %r and %r ?

Done.

http://codereview.appspot.com/32080/diff/13/1010#newcode84
Line 84: self.fail(%s and %s hash equal, but shouldn't %
On 2009/03/31 15:01:06, GvR wrote:
 ditto?

Done.

http://codereview.appspot.com/32080/diff/13/1010#newcode2313
Line 2313: self.assertRaises(self.failureException, self.assertIn,
'elephant', animals)
On 2009/03/31 15:01:06, GvR wrote:
 lin too long

Done.

http://codereview.appspot.com/32080/diff/13/1010#newcode2317
Line 2317: self.assertRaises(self.failureException, self.assertNotIn,
'cow', animals)
On 2009/03/31 15:01:06, GvR wrote:
 linr too long

Done.

http://codereview.appspot.com/32080/diff/13/1007
File Lib/unittest.py (right):

http://codereview.appspot.com/32080/diff/13/1007#newcode257
Line 257: class AssertRaisesContext(object):
On 2009/03/31 15:01:06, GvR wrote:
 While you're at it, can you add a docstring?

Done.  We also decided that this should be private so I've added an _.

http://codereview.appspot.com/32080/diff/13/1007#newcode332
Line 332: # Map types to custom assertEquals functions that will compare
On 2009/03/31 15:01:06, GvR wrote:
 assertEquals - assertEqual

Done.

http://codereview.appspot.com/32080/diff/13/1007#newcode512
Line 512: # should use their type specific assertSpamEquals method to
compare
On 2009/03/31 15:01:06, GvR wrote:
 assertSpamEqual

Done.

http://codereview.appspot.com/32080/diff/13/1007#newcode521
Line 521: def _baseAssertEquals(self, first, second, msg=None):
On 2009/03/31 15:01:06, GvR wrote:
 Mind dropping the trailing 's'?

Done.

http://codereview.appspot.com/32080/diff/13/1007#newcode526
Line 526: def failUnlessEqual(self, first, second, msg=None):
On 2009/03/31 15:01:06, GvR wrote:
 We had talked about making the 'def' define the recommended name, e.g.
 assertNotEqual, and using aliases to keep the other names.  Do you
want to do
 that at the same time as this change or in a separate one?

Yes I'm going to do that in the next revision immediately after this
one.

http://codereview.appspot.com/32080/diff/13/1007#newcode581
Line 581: def assertSequenceEquals(self, seq1, seq2, msg=None,
seq_type=None):
On 2009/03/31 15:01:06, GvR wrote:
 Drop the trailing 's' in the name?

Done.

Description:
http://bugs.python.org/issue2578 - additional unittest type specific
equality methods that print useful error messages and type introspection
within assertEqual to automatically use them when deemed appropriate.

Please review this at http://codereview.appspot.com/32080

Affected files:
   M Doc/library/unittest.rst
   M Lib/test/test_gc.py
   M Lib/test/test_struct.py
   M Lib/test/test_unittest.py
   M Lib/unittest.py

--

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



[issue5522] HTTPRedirectHandler documentation is wrong

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

This seems to be fixed in the development docs.

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

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



[issue2578] additional unittest type equality methods

2009-03-31 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

LG.

http://codereview.appspot.com/32080

--

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



[issue2073] asynchat push always sends 512 bytes (ignoring ac_out_buffer_size)

2009-03-31 Thread Josiah Carlson

Josiah Carlson josiahcarl...@users.sourceforge.net added the comment:

When push is called in the current trunk (as of 2.6), the data is 
automatically chopped up into self.ac_out_buffer_size blocks for later 
writing.

In order to force the use of the asynchat.simple_producer class (which 
takes an argument for the block size to send), you must pass the 
producer itself with push_with_producer() .

Closing as out of date.

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

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



[issue5627] PyDict_SetItemString() fails when the second argument is null

2009-03-31 Thread Euler Taveira de Oliveira

New submission from Euler Taveira de Oliveira eu...@timbira.com:

PyDict_SetItemString() fails when the second argument (key) is null
pointer. It occurs because PyString_FromString(key) call doesn't check
for null pointer and if we're in a disabled assert environment the
assert() is not caught and strlen() fails.

I don't know what is the best fix but we have two possibilities:

(i) check the second argument in PyDict_SetItemString() before calling
PyString_FromString() and returns null if that argument is null;
(ii) replace the assert() in PyString_FromString() to 'if (str == NULL)
return NULL;'.

This bug was reported as a PostgreSQL bug at [1].

[1] http://archives.postgresql.org/pgsql-hackers/2009-03/msg01344.php

--
components: Interpreter Core
messages: 84833
nosy: eulerto
severity: normal
status: open
title: PyDict_SetItemString() fails when the second argument is null
type: crash

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



[issue1569040] Speed up using + for string concatenation

2009-03-31 Thread Raymond Hettinger

Raymond Hettinger rhettin...@users.sourceforge.net added the comment:

I think lazy evaluation was discussed in the same thread.  Either I or
someone else suggested it and there was some issue because the string
struct had long been exposed and people were accessing it directly.

--

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



[issue5417] Reference to missing(?) function in Extending Embedding Document

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

The function is there, but not documented, so the examples are valid. I
now changed them to refer to PyObject_Call[Object] which are documented
in r70836.

--
resolution:  - fixed
status: open - closed

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



[issue2578] additional unittest type equality methods

2009-03-31 Thread Gregory P. Smith

Gregory P. Smith g...@krypto.org added the comment:

Comments applied.  committed to trunk in r70837.  Needs porting to
python 3.1.

Next changes TODO:
 * rename the method def's and add deprecation warnings to fail* variants.

In room discussion at pycon 2009 sprints consensus on Equal vs Equals
names is that existing Equals names will continue to exist but remain
undocumented.  Arguments can be made for both (and some others) and we'd
like to reduce clutter but not drive the world crazy with nitpicking
deprecations over a single 's'.

--

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



[issue992207] exec statement balks at CR/LF

2009-03-31 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Documented in r70838, r70840.

--
resolution:  - fixed
status: open - closed

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



[issue2578] additional unittest type equality methods

2009-03-31 Thread Guido van Rossum

Guido van Rossum gu...@python.org added the comment:

I think we should rename the method defs ASAP but not start deprecating
the old names until 3.2.  Otherwise many people's tests will be very
noisy and that's just annoying.  Give them time to migrate voluntarily.

--

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



[issue1161031] Neverending warnings from asyncore

2009-03-31 Thread Aleksi Torhamo

Aleksi Torhamo alexerion+pythonb...@gmail.com added the comment:

The _exception() - close() change seems to be wrong. The third set of
select() is supposed to represent oob data, so the previous use in the
select-based loop should have been correct?

Other than that, i can't see anything wrong with it.

Maybe handle_expt_event should be reverted to the old one, that just
calls handle_expt, too? The current version seems to assume that it is
called on socket error conditions.

--

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



  1   2   3   >