[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

[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

[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

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

[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

[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

[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

[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

[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

[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

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

[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

[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

[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

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

[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

[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

[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

[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():

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

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

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

[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

[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

[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

[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

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

[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

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

[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

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

[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

[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

[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

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

[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

[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

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

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

[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

[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

[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

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

[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

[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). --

[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