[issue5573] multiprocessing Pipe poll() and recv() semantics.

2009-03-27 Thread Vaibhav Mallya

Vaibhav Mallya mally...@umich.edu added the comment:

On second thought, it seems like it shouldn't make sense. This forces a
destructive check. Suppose we do child.poll() and then child.recv() but
it's legitimate data; that data will be removed from the queue even if
we just wanted to check if the pipe was alive. This seems like it
shouldn't have to happen.

I'm unfamiliar with the lower level workings of sockets; is this
destructive checking behavior forced by the socket internals? Is it
standard?

--

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



[issue5214] Add KOI8-RU as a known encoding

2009-03-27 Thread Marc-Andre Lemburg

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

Viktor, I found this reference which has some background information
regarding koi8-ru and other cyrillic encodings:
http://segfault.kiev.ua/cyrillic-encodings/

This charset wasn't supported by Ukrainian Internet community due to
political reasons; KOI8-U was invented as opposition to KOI8-RU.

Provided that resource is correct, it also appears that its inventor
Yuri Demchenko now switched to KOI8-U as well:
http://staff.science.uva.nl/~demch/

So I guess, we can close this request and leave the codec attached to
the ticket for interested parties to download and install if they need it.

--
status: open - closed

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



[issue5577] yield in iterators

2009-03-27 Thread qwjqwj

New submission from qwjqwj q...@papayamobile.com:

In Python 3.0,3.1a1:

 def f():
[(yield i) for i in range(10)]
 f()
 f() is None
True

 def f():
((yield i) for i in range(10))
 f()
 f() is None
True

However it is correct in Python 2.5,2.6

 def f():
... [(yield i) for i in range(10)]
... 
 f()
generator object f at 0x2b84bbe3ae60

--
components: Interpreter Core
messages: 84257
nosy: qwjqwj
severity: normal
status: open
title: yield in iterators
type: behavior
versions: Python 3.0, Python 3.1

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



[issue5463] Remove deprecated features from struct module

2009-03-27 Thread Mark Dickinson

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

Thanks for the patch.  A couple of questions and comments:

(1) at line 300-ish of test_struct, should (struct.error, TypeError) be 
(struct.error, OverflowError)?  I don't think out-of-range values should 
be raising TypeError.  If they are, perhaps we should change that.

(2) It looks like the deprecated_err function isn't needed any more 
(yay!);  let's remove it.

(3) I'd prefer to keep the test_1229380 bit, but just replace the 
deprecated_err with an assertRaises, just like you already did further 
up.  As far as I can see those tests aren't entirely duplicated by 
others, and one can never have too many tests...

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5463
___
___
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-27 Thread Maciek Fijalkowski

New submission from Maciek Fijalkowski fi...@genesilico.pl:

A patch and a test. The problem is a bit broader - what about import * etc?

Patch fixes that, but without a test.

--
components: Interpreter Core
files: out.diff
keywords: patch
messages: 84259
nosy: fijal
severity: normal
status: open
title: unqualified exec in class body
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7
Added file: http://bugs.python.org/file13435/out.diff

___
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



[issue5468] urlencode does not handle bytes, and could easily handle alternate encodings

2009-03-27 Thread Jeremy Hylton

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

Indeed, I think I confused some other character encoding issues related
to HTTP with the URI issue.  The discussion in RFC 3986 is length and
only occasionally clarifying for this issue.  That is, it doesn't say
anything definitive like applications are free to use any character
encoding when decoding a URI.  But I think it agrees with your
assessment that an application is free to interpret the binary data
however it wants, e.g. http://tools.ietf.org/html/rfc3986#section-2.1

--
assignee:  - jhylton
resolution:  - accepted

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



[issue5579] Display for OrderedDict

2009-03-27 Thread Todd Weiler

New submission from Todd Weiler twei...@raggedcreek.com:

Now that python has an ordered dictionary it would be great to have a
display sytax for creating them.

To create a dict I just use the dict display syntax:
newdict = {'fred':'flintstone', 'barney':'rubble', 'dino':'thedinosaur'}

I'd like to be able to create an OrderedDict in the same way - I realize
that a list of tuples would do the trick, but I find the dict display
more convenient and readable.  Back in the archives there is probably a
whole discussion of why dict displays are useful.  My reason for liking
displays is that I like to put dictionaries inside dictionaries - the
display format spread out over several lines makes this easy to read.

Possible solutions:

1. maybe use ^{ for OrderedDicts
newdict = ^{'fred':'flintstone', 'barney':'rubble', 'dino':'thedinosaur'}

2. have OrdredDict accept a dictionary display string
newodict = OrderedDict({'fred':'flintstone', 'barney':'rubble',
'dino':'thedinosaur'}}

--
messages: 84261
nosy: tweiler
severity: normal
status: open
title: Display for OrderedDict
type: feature request
versions: Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5579
___
___
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-27 Thread Amaury Forgeot d'Arc

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

Why should this code fail? I cannot see the problem you try to solve.

--
nosy: +amaury.forgeotdarc

___
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



[issue5568] self.writer.closed() extraneous parens in BufferedRWPair of io module

2009-03-27 Thread Amaury Forgeot d'Arc

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

The wrong closed() call was corrected with r67923.

Then, the io module is by design very picky about the distinction
between bytes and unicode. This is different from the philosophy of
other parts of the library, but io comes from python 3.0...

StringIO only accepts and return unicode strings; its default encoding
of StringIO is an implementation (how the text is stored in memory) and
is even not used anymore in python 3.0

--
nosy: +amaury.forgeotdarc
resolution:  - out of date
status: open - closed

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



[issue5580] Strange error message in Python/getargs.c

2009-03-27 Thread Andrii V. Mishkovskyi

New submission from Andrii V. Mishkovskyi misho...@gmail.com:

I think the following message is a little bit confusing:
Python 2.7a0 (trunk, Mar 17 2009, 12:06:19)
[GCC 4.3.2] on linux2
Type help, copyright, credits or license for more information.
 open('abc\x00')
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: file() argument 1 must be (encoded string without NULL
bytes), not str

This message could be much more better if unneeded parentheses were
removed. :)
The message on line 861 in Python/getargs.c reads much better:
string without null bytes
Would it be appropriate to change the message in topic to something like
this?

--
messages: 84264
nosy: mishok13
severity: normal
status: open
title: Strange error message in Python/getargs.c
versions: Python 2.7

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



[issue5090] import tkinter library Visual C++ Concepts:C Run-Time Error R6034 when embeded python in c++

2009-03-27 Thread Amaury Forgeot d'Arc

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

The issue seems fixed now.

--
status: pending - closed

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



[issue5577] yield in iterators

2009-03-27 Thread Antoine Pitrou

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

Perhaps you forgot to return the value. In 3.1:

 def f():
...  return [(yield i) for i in range(10)]
... 
 f()
generator object listcomp at 0x7f9bcc2257d0

--
nosy: +pitrou

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



[issue5577] yield in iterators

2009-03-27 Thread Antoine Pitrou

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

It's true, however, that there is a difference in behaviour between 2.x
and 3.x here.
In 2.x, the function containing the list comprehension is a generator.
In 3.x, it's the list comprehension itself which becomes a generator.
I'm not sure which one is more useful. Also, it's likely that this won't
be changed, because it's due to the compilation model of list
comprehensions (which are compiled as a separate code object in 3.x).

--

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



[issue3138] Hang when calling get() on an empty queue in the queue module

2009-03-27 Thread Tuure Laurinolli

Tuure Laurinolli tu...@laurinolli.net added the comment:

Is it also intended that Queue.get() eats SIGINTs, requiring one to kill
the process with something heavier?

--
nosy: +tazle

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



[issue5577] yield in iterators

2009-03-27 Thread qwjqwj

qwjqwj q...@papayamobile.com added the comment:

Why should yield can be put inside the iterator? The behavior here is
very weired.

 x = [(yield i) for i in range(10)]
 print(list(x))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, [None, None, None, None, None, None,
None, None, None, None]]

--

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



[issue5577] yield in iterators

2009-03-27 Thread qwjqwj

qwjqwj q...@papayamobile.com added the comment:

 x = ((yield i) for i in range(10))
 list(x)
[0, None, 1, None, 2, None, 3, None, 4, None, 5, None, 6, None, 7, None,
8, None, 9, None]

--

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



[issue5577] yield in iterators

2009-03-27 Thread qwjqwj

qwjqwj q...@papayamobile.com added the comment:

 x = {(yield i) for i in range(10)}
 x
generator object setcomp at 0x02A453F0
 list(x)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, {None}]

--

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



[issue5577] yield in iterators

2009-03-27 Thread Antoine Pitrou

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

 More experiments:
 The tuple pair (10,20) don't correspond to (i,i*i)

This is normal, since it corresponds to ((yield i), (yield i*i)).
The value of a yield expression is what the caller puts into send(), not
what is yielded to the caller. And since you sent 10 then 20, the
resulting tuple is (10, 20).

 The yield order is distorted

It is quite logical actually. The generator first has to yield two
values before being able to produce a third one (the tuple consisting of
the value of two yield expressions).

--

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



[issue5577] yield in iterators

2009-03-27 Thread qwjqwj

qwjqwj q...@papayamobile.com added the comment:

Ok, I see. Thanks.
However, I don't think yield should be consumed at the iterator's level.
It may be more useful for the outside function to consume the yield.

For example, some function want to change some data with another thread.

def f():
...fetch data...
x = [yield i for i in data]

It should be written as belowed in Python 3.1 now
def f():
x = []
for i in data:
x.append((yield i))

--

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



[issue4629] getopt should not accept no_argument that ends with '='

2009-03-27 Thread Amaury Forgeot d'Arc

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

The patch is good.

--
nosy: +amaury.forgeotdarc
resolution:  - accepted

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4629
___
___
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-27 Thread Devin Jeanpierre

New submission from Devin Jeanpierre jeanpierr...@gmail.com:

The documentation uses the function signature 
`abc.abstractproperty(fget[, fset[, fdel[, doc]]])`, implying that 
fget is mandatory, and all other arguments are optional. The correct 
version would be `abc.abstractproperty([fget[, fset[, fdel[, 
doc)`, or else to change abc.abstractproperty() to require fget (I 
have not compiled 2.7+ to test if this is the case, I only know that 
the docs in trunk continue to use this signature).

I initially suspected that I misunderstood the signature syntax, but 
other functions use it as I would assume-- for instance, the Built-In 
Functions documentation lists `property([fget[, fset[, fdel[, 
doc)`.

--
assignee: georg.brandl
components: Documentation
messages: 84277
nosy: Devin Jeanpierre, georg.brandl
severity: normal
status: open
title: abc.abstractproperty() docs list fget as required; fget is not required 
by abc.abstractproperty()
versions: Python 2.6

___
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



[issue5577] yield in iterators

2009-03-27 Thread Guido van Rossum

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

Can anyone think of a *reason* to put a yield inside a generator
expression?  ISTM we could just forbid this syntactically.  It seems
insane and hard to read so if someone has a reason they should write it
out using an explicit for-statement.

--
nosy: +gvanrossum

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



[issue5314] http client error

2009-03-27 Thread Jeremy Hylton

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

The documentation is pretty vague on this point.  If you send something
other than plain ascii, it gets a bit tricky to figure out what other
headers need to be added.  It would be safer for the client to pick an
encoding (e.g. utf-8) and encode the string before calling request(). 
It affects the content-length and presumably also the content-type.

--

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



[issue5314] http client error

2009-03-27 Thread Jeremy Hylton

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

Ok.  Discovered that RFC 2616 says that iso-8859-1 is the default
charset, so I will use that to encode strings instead of ascii.  If you
want utf-8, you could encode the string yourself before calling
request().  Presumably, you should also add a content-type that explains
the charset.  I'll clarified this in the docs.

--
assignee:  - jhylton

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



[issue5035] Compilation --without-threads fails

2009-03-27 Thread Guilherme Polo

Changes by Guilherme Polo ggp...@gmail.com:


--
nosy: +gpolo

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



[issue4958] email/header.py ecre regular expression issue

2009-03-27 Thread Amaury Forgeot d'Arc

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


--
resolution:  - duplicate
status: open - closed
superseder:  - decode_header does not follow RFC 2047

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



[issue5314] http client error

2009-03-27 Thread Jeremy Hylton

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

Committed revision 70638.

--
resolution:  - fixed
status: open - closed

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



[issue5468] urlencode does not handle bytes, and could easily handle alternate encodings

2009-03-27 Thread Ezio Melotti

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


--
nosy: +ezio.melotti

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



[issue5035] Compilation --without-threads fails

2009-03-27 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Victor, I have changed your tkinter patch a bit and applied on r70641.

The issue is marking only python 2.7 right now, aren't these changes
supposed to be applied 26-maint, py3k and 30-maint too ?

--

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



[issue4630] IDLE no longer respects .Xdefaults insertOffTime

2009-03-27 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Maybe we can agree on the feature being added ? I don't see much use for
controlling how much time the insertion cursor is on and how much time
it is off, but maybe just choosing between blink and no-blink would be
good to have. I would prefer to just get an option inside the General
tab that would affect the Text widget creation, instead of depending on
how each platform changes the behaviour.

I personally didn't have any issue with seeing the cursor blinking (I
think I never watched it blinking carefully), but now that you say this
it does annoy me if I watch it :)

--
nosy: +gpolo
type:  - feature request
versions: +Python 2.7, Python 3.1 -Python 3.0

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



[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2009-03-27 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/issue5542
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5582] Incorrect DST transition on Windows

2009-03-27 Thread acummings

New submission from acummings acummi...@aperiogroup.com:

On Windows, the calculation of when DST starts is incorrect. Windows OS 
seems to be fully patched, and correctly changed to DST on 3-8-2009. 
However, datetime.now() is 1 hour less then Windows displayed time.

I even tried setting the TZ environment variable to 
PST8PDT,M3.2.0,M11.1.0 to fully specify the date change.

Below you can see that today (3-27-08) is marked as standard time, while 
July 1st is DST and Jan 1st is Standard, if I understand the meaning of 
the 9th element of the timetuple:

ON WINDOWS, with windows reporting the time as 3:59pm:
 july1 = datetime(2009, 7, 1)
 jan1 = datetime(2009, 1, 1)
 time.localtime(time.mktime(july1.timetuple()))
(2009, 7, 1, 0, 0, 0, 2, 182, 1)
 time.localtime(time.mktime(jan1.timetuple()))
(2009, 1, 1, 0, 0, 0, 3, 1, 0)
 time.localtime(time.mktime(datetime.now().timetuple()))
(2009, 3, 27, 14, 59, 46, 4, 86, 0)

It worked correctly on Linux, though: 
 july1 = datetime(2009,7,1)
 jan1 = datetime(2009,1,1)
 time.localtime(time.mktime(july1.timetuple()))
(2009, 7, 1, 0, 0, 0, 2, 182, 1)
 time.localtime(time.mktime(jan1.timetuple()))
(2009, 1, 1, 0, 0, 0, 3, 1, 0)
 time.localtime(time.mktime(datetime.now().timetuple()))
(2009, 3, 27, 15, 57, 2, 4, 86, 1)

--
components: Windows
messages: 84286
nosy: acummings
severity: normal
status: open
title: Incorrect DST transition on Windows
versions: Python 2.5

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



[issue1517993] IDLE: config-main.def contains windows-specific settings

2009-03-27 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

For config-extensions.def:
  What do you think about moving all shortcuts to config-keys and then
always use the name of the shorcut in config-extensions instead of the
shorcut ?

For config-main.def:
  For the [Keys] section I believe it would be better to rename the
default option to custom. If custom is true, then idle uses the key
set defined by the name option, otherwise it uses the one that fits
better the platform. If the user changes the key set that supposedly
fits better his platform through the Configure IDLE dialog then we set
custom to True (independently of this new key set being a custom one or
a default one but that is not the default for his platform) and set the
name option to the name of the key set. Any thoughts ?

--
nosy: +gpolo

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



[issue5577] yield in iterators

2009-03-27 Thread Terry J. Reedy

Terry J. Reedy tjre...@udel.edu added the comment:

I think this should just be closed.

The original implied claim that 3.0 is not correct is not correct.  The
change of behavior is a clear side effect of and intended and documented
change in the semantics of comprehensions.

As near as I can tell, the results of the experiments are all correct
according to the doc for yield.

Python-list or the python-ideas list is more appropriate than the
tracker to discuss a semantic change.  In any case, comprehensions are
function expressions, like lambda expressions, and expressions therein
should act much the same as the expression in a lambda expression.

Even if unclear, slightly insane, and not very useful, I do not think
yield should be prohibited in generators expression because
1) it would introduce a back-incompatibility in 3.1;
2) it would slightly break the parallelism with other comprehensions;
3) it would slightly break the parallelism with the expanded for-form;
4) such use is unlikely in real practice; and
5) it would raise the question of where else to prohibit yield.

--
nosy: +tjreedy

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



[issue5577] yield in iterators

2009-03-27 Thread Guido van Rossum

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

Fine!

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

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



[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2009-03-27 Thread Jeremy Hylton

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

Wow!  Old issue.  This behavior was present in Greg's original version
of the code.

--

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



[issue1562092] IDLE: Dedent with Italian keyboard

2009-03-27 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

Shift+Tab does look better to me too. But, one can change the default
shortcut like Kurt mentioned.

Are IDLE users ready to have the default dedent shortcut changed ?

--
nosy: +gpolo

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



[issue5035] Compilation --without-threads fails

2009-03-27 Thread STINNER Victor

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

gpolo Victor, I have changed your tkinter patch a bit and applied on r70641.

Ok, thanks.

gpolo The issue is marking only python 2.7 right now, aren't these changes
gpolo supposed to be applied 26-maint, py3k and 30-maint too ?

Since it only fixes warnings, we don't have to fix *-maint versions. But I 
would like to see your fix in py3k (I think that trunk and py3k should be as 
close as possible).

--

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



[issue5583] Optional extensions in setup.py

2009-03-27 Thread Georg Brandl

New submission from Georg Brandl ge...@python.org:

Adds a new kwarg to the Extension constructor that does what Python's
own /setup.py does to ignore build failure in an extension with a warning.

I'm not sure if that's everything that's needed, but it seems to work in
a simple test case.

--
assignee: tarek
components: Distutils
files: opt-ext.diff
keywords: patch
messages: 84293
nosy: georg.brandl, tarek
severity: normal
status: open
title: Optional extensions in setup.py
versions: Python 2.7
Added file: http://bugs.python.org/file13436/opt-ext.diff

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



[issue1468223] Hitting CTRL-C while in a loop closes IDLE on cygwin

2009-03-27 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

I have just tried it using Python 2.5.2 under cygwin 1.5.25 and that did
not happen.

This looks like to be an issue with the cygwin you were using, not
python or idle. If you (Miki) are still around, please retry with a
newer cygwin and report it here, otherwise I can just see this being closed.

--
nosy: +gpolo

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



[issue786827] IDLE starts with no menus (Cygwin)

2009-03-27 Thread Guilherme Polo

Guilherme Polo ggp...@gmail.com added the comment:

I just tried idle here under cygwin and menus are not shown. This cygwin
includes python 2.5.2, btw.

But I verified what Daniel Joyce said and I see the problem is no longer
there, so it has to be tracked down again.

--
nosy: +gpolo

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



[issue1174606] Reading /dev/zero causes SystemError

2009-03-27 Thread R. David Murray

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

I applied the patch against the trunk, and 'make' failed:


  File /home/rdmurray/python/Issue1174606/Lib/platform.py, line 932,
in _syscmd_uname
output = string.strip(f.read())
OverflowError: requested number of bytes is more than a Python string
can hold

I can confirm that the issue still exists on the trunk.

Py3k doesn't benefit from the linux /dev/zero optimization because it
has its own I/O layer, so it takes it a _lot_ longer to get to the
failure point...which is more pathological than the py2 behavior:

rdmur...@partner:~/python/py3k./python -c 'open(/dev/zero).read()'
zsh: segmentation fault  ./python -c 'open(/dev/zero).read()'

Which I think makes this a 'crash' bug on py3k.

--
nosy: +benjamin.peterson, bitdancer
stage:  - needs patch
type:  - crash
versions: +Python 2.6, Python 2.7, Python 3.1

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



[issue5377] Strange behavior when performing int on a Decimal made from -sys.maxint-1

2009-03-27 Thread Mark Dickinson

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

Thanks for the patch, Victor.  I think this is the right thing to do, 
though I'm still not sure why anyone would care about getting longs 
instead of ints back from int(x).

Comments and questions:

(0) Please could you add some tests!
(1) Shouldn't the first line you added include a check for res == NULL?  
(2) It looks as though the patched code ends up calling PyLong_Check twice 
when __int__ returns a long.  Can you find a clear rewrite that avoids 
this duplication?

By the way, I realized after posting my last comment that the issue with 
Fraction has nothing to do with extreme int values.  For example, with the 
current trunk (not including Victor's patch):

 int(Fraction(2L))
2L
 int(int(Fraction(2L)))
2

I don't think should be considered a bug in Fraction---I think Victor's 
solution of making the int() machinery always return int when possible is 
the right one here.  The need to call int(int(x)) if you *really* want an 
int seems a little ugly.

--
stage:  - test needed

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



[issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent

2009-03-27 Thread Jeremy Hylton

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

I think it makes sense to leave the socket open in this case.  (In
general, I think httplib is too aggressive about closing the socket.) 
I'm checking in a version for py3k, and will get around to backporting
it later.

Committed revision 70643.

--
resolution:  - accepted

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



[issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug)

2009-03-27 Thread Bob Ippolito

New submission from Bob Ippolito b...@redivi.com:

http://code.google.com/p/simplejson/issues/detail?id=43

Need a = where there's a  in the unicode float scanner. problem only 
exists when decoding a unicode float that is not in any sort of container 
(e.g. array or object).

--
assignee: bob.ippolito
keywords: easy
messages: 84299
nosy: bob.ippolito
severity: normal
stage: needs patch
status: open
title: json.loads(u'3.14') fails unexpectedly (minor scanner bug)
type: behavior
versions: Python 2.7, Python 3.1

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



[issue5584] json.loads(u'3.14') fails unexpectedly (minor scanner bug)

2009-03-27 Thread Bob Ippolito

Changes by Bob Ippolito b...@redivi.com:


--
components: +Library (Lib)

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