[issue5819] Add PYTHONPREFIXES environment variable

2009-04-23 Thread Larry Hastings
New submission from Larry Hastings : The attached patch adds support for a new environment variable, PYTHONPREFIXES. PYTHONPREFIXES is similar to PYTHONUSERBASE: it lets you add "prefix directories" to be culled for site packages. It differs from PYTHONUSERBASE in three ways: * PYTHONPREFIXES

[issue5819] Add PYTHONPREFIXES environment variable

2009-04-23 Thread Larry Hastings
Larry Hastings added the comment: Whoops, didn't classify the patch before submission. -- components: +Library (Lib) type: -> feature request versions: +Python 3.1 ___ Python tracker __

[issue5816] Simplify parsing of complex numbers and make complex('inf') valid.

2009-04-23 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch: 4. also simplify complex printing: no special handling for nans or infinities. This means that e.g. complex(1, inf) prints as "1 + infj" instead of "1+inf*j". This might look ugly, but I think it's better than what was there befor

[issue5820] Very small bug in documentation of json.load()

2009-04-23 Thread P.C. Shyamshankar
New submission from P.C. Shyamshankar : The suggestion that non-ASCII based encodings should be wrapped in a codecs.getreader instance has a small bug, ie instead of codecs.getreader(fp)(encoding), it should be the other way around, codecs.getreader(encoding)(fp). It's a very small bug, and I

[issue5820] Very small bug in documentation of json.load()

2009-04-23 Thread Georg Brandl
Georg Brandl added the comment: It's all right! Thanks for the patch, committed in r71814. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ _

[issue5813] Pointer into language reference from __future__ module documentation

2009-04-23 Thread Georg Brandl
Georg Brandl added the comment: I added a "seealso" in r71816. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue5816] Simplify parsing of complex numbers and make complex('inf') valid.

2009-04-23 Thread Eric Smith
Eric Smith added the comment: Wow, that does greatly simplify printing. One nit: the variable named 'im' isn't needed any more, you could just use 'pim'. Not sure if the asymmetry with 're' and 'pre' is worthwhile, though. Mark Dickinson wrote: > 6. Change PyOS_ascii_strtod to always output a

[issue5816] Simplify parsing of complex numbers and make complex('inf') valid.

2009-04-23 Thread Eric Smith
Eric Smith added the comment: The fallback code, around line 633 in the patched version of pystrtod.c, probably also needs to be modified. It's this code that would need backporting to 2.7. -- ___ Python tracker __

[issue1540386] SocketServer.ForkingMixIn.collect_children() waits on pid 0

2009-04-23 Thread Stefan Ring
Stefan Ring added the comment: Jeffrey, this very commit broke it. See also issue 5814. The same happened for me last week. What makes it especially bad is that even once enough children terminate, the SocketServer won't be able to handle any more connections; it just throws this Exception again

[issue1109963] bdist_wininst ignores build_lib from build command

2009-04-23 Thread Andrew I MacIntyre
Andrew I MacIntyre added the comment: The offending code appears to have been introduced in r33090 and tweaked in r37025, which both originated from Mark Hammond. >From the comments, there seems to be no reason why the build_lib override should apply when the target version is specifically diff

[issue1533520] Allow thread(ing) tests to pass without setting stack size

2009-04-23 Thread Andrew I MacIntyre
Andrew I MacIntyre added the comment: Pretty much all the test structure in the patch has made it through the re-write to unittest, so closed as out of date. -- resolution: -> out of date status: pending -> closed ___ Python tracker

[issue3868] patch for review: OS/2 EMX port fixes for 2.6

2009-04-23 Thread Andrew I MacIntyre
Changes by Andrew I MacIntyre : -- status: pending -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue1074333] input from numeric pad always dropped when numlock off

2009-04-23 Thread Guilherme Polo
Guilherme Polo added the comment: Unfortunately this is not that easy for us, while we could add some code like this: import Tkinter text = Tkinter.Text() text.event_add("<>", "") text.event_add("<>", "") text.bind_class("Text", "<>", text.bind_class("Text", "")) text.pack() text.mainloop() i

[issue1074333] input from numeric pad always dropped when numlock off

2009-04-23 Thread Guilherme Polo
Guilherme Polo added the comment: > When numlock is on, it would still > move one line up. We could change it to fix this problem, but then we > would be using tk::TextUpDownLine which is marked as unsupported > (basically everything that could help us in such situations is marked as > unsupport

[issue4608] urllib.request.urlopen does not return an iterable object

2009-04-23 Thread Senthil
Senthil added the comment: This issue is already fixed by jeremy at Revision 70815, wherein "The response from an HTTP request is now an HTTPResponse instance instead of an addinfourl() wrapper instance." So the issue won't be present in the py3k code ( confirmed). However, the test added by D

[issue5821] Documentation: mention 'close' and iteration for tarfile.TarFile.extractfile()

2009-04-23 Thread Ben North
New submission from Ben North : The current documentation for tarfile.TarFile.extractfile() does not mention that the returned 'file-like object' supports close() and also iteration. The attached patch (against svn trunk) fixes this. (Background: I was wondering whether I could write def pro

[issue3493] No Backslash (\) in IDLE 1.2.2

2009-04-23 Thread Guilherme Polo
Guilherme Polo added the comment: Can you verify if it is possible to type '\' in a standard Tkinter.Text ? -- nosy: +gpolo type: feature request -> ___ Python tracker ___ _

[issue1540386] SocketServer.ForkingMixIn.collect_children() waits on pid 0

2009-04-23 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Yes, sorry. That was fixed in r69927. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue1525806] Tkdnd mouse cursor handling patch

2009-04-23 Thread klappnase
klappnase added the comment: Maybe this depends on whether the dragged item is "clickable" like listbox items and buttons or not , like the Labels in the Tkdnd demo. Ok, I wrote a second patch that solves this by adding another option to dnd_start(); if this option is set to True (the default) t

[issue5819] Add PYTHONPREFIXES environment variable

2009-04-23 Thread Ian Bicking
Ian Bicking added the comment: This has a similar purpose to virtualenv, but using an environmental variable. An earlier package, workingenv, also used an environmental variable, and this led to a set of problems. The biggest problem is that the environmental variable is inherited by subproces

[issue5819] Add PYTHONPREFIXES environment variable

2009-04-23 Thread Ian Bicking
Ian Bicking added the comment: Also with respect to the patch, for consistency there needs to be changes to distutils to make use of this variable. PYTHONUSERBASE included changes so that you can install based on that variable. -- ___ Python tracke

[issue3493] No Backslash (\) in IDLE 1.2.2

2009-04-23 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: -tjreedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue5822] inconsistent behavior of range when used in combination with remove

2009-04-23 Thread Michael Gilbert
New submission from Michael Gilbert : using range in combination with remove is inconsistent. for example in python 2.x: >>> x = range(0,3) >>> x.remove(1) >>> x [0, 2] >>> x = range(0,3).remove(1) >>> x >>> and in python 3.x: >>> x = list(range(0,3)) >>> x.remove(1) >>> x [0, 2] >>> x = list

[issue5816] Simplify parsing of complex numbers and make complex('inf') valid.

2009-04-23 Thread Mark Dickinson
Mark Dickinson added the comment: Committed to py3k, r71818, with the changes Eric suggested. I ran build and tests both with and without the -DPY_NO_SHORT_FLOAT_REPR compiler option. Will backport. -- versions: +Python 2.7 -Python 3.1 ___ Python

[issue5822] inconsistent behavior of range when used in combination with remove

2009-04-23 Thread R. David Murray
R. David Murray added the comment: >>> [1,2,3].remove(1) >>> repr([1,2,3].remove(1)) 'None' The remove method mutates the list, and therefore like all such mutating methods, it returns None. -- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open ->

[issue5822] inconsistent behavior of range when used in combination with remove

2009-04-23 Thread Michael Gilbert
Michael Gilbert added the comment: ok, i see now. the list itself is changed in place, and the return value of the remove() method is always None. since i din't assign the list to a variable in the first place, there is hence no way now to access that modified list. thanks for your help.

[issue5823] feature request: a conditional "for" statement

2009-04-23 Thread Michael Gilbert
New submission from Michael Gilbert : hello, i've recently been working on some code where i am processing a list, but excluding certain items. the solution is to use a list comprehension in the for statement, which for example looks like: for m in [n for n in range( 0 , 5 ) if n != 2] det

[issue5823] feature request: a conditional "for" statement

2009-04-23 Thread Benjamin Peterson
Benjamin Peterson added the comment: You should bring this up on the python-ideas mailing list. I'm closing this unless it gets support on that list or python-dev. -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed ___ Python

[issue5823] feature request: a conditional "for" statement

2009-04-23 Thread Michael Gilbert
Michael Gilbert added the comment: hello, i've recently been working on some code where i am processing a list, but excluding certain items. the solution is to use a list comprehension in the for statement, which for example looks like: for m in [n for n in range( 0 , 5 ) if n != 2] deter

[issue5824] SocketServer.DatagramRequestHandler Broken under Linux

2009-04-23 Thread Jim Dennis
New submission from Jim Dennis : .../lib/python2.*/SocketServer.py in class DatagramRequestHandler contains the following comment: # XXX Regrettably, I cannot get this working on Linux; # s.recvfrom() doesn't return a meaningful client address. This is a poor way to document the limita

[issue5824] SocketServer.DatagramRequestHandler Broken under Linux

2009-04-23 Thread Jim Dennis
Jim Dennis added the comment: Addendum: What I said about the default sendto() in finish() causing a loop in server_forever() was wrong. I'd seen that behavior in an experimental variation of the code. The exceptions raised (and deficiencies in documentation) are the issue. -- _

[issue1109963] bdist_wininst ignores build_lib from build command

2009-04-23 Thread Mark Hammond
Mark Hammond added the comment: So it looks like I broke the ability to override --build-lib :( Without testing, I think you might also need to handle the cross-compile case - the version may be the same, but the platform different. I know distutils is a PITA so might make this difficult, but

[issue5819] Add PYTHONPREFIXES environment variable

2009-04-23 Thread Larry Hastings
Larry Hastings added the comment: Thanks for your battle-tested feedback, Mr. Bicking! I reply inline. > The biggest problem is that the environmental variable is inherited by > subprocesses. [...] Another problem is that scripts aren't really > sticky with respect to the environment. [...]

[issue4111] Add DTrace probes

2009-04-23 Thread Robert Kern
Robert Kern added the comment: Is there any interest in my expanding the list of probes? Ruby has quite a few more than function-entry and function-return, to give some examples of what is possible: http://dev.joyent.com/projects/ruby-dtrace/wiki/Ruby+DTrace+probes+and+arguments I think that a

[issue4111] Add DTrace probes

2009-04-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: > Is there any interest in my expanding the list of probes? Definitively!!!. -- ___ Python tracker ___ __

[issue1794] Hot keys must work in any keyboard layout

2009-04-23 Thread Guilherme Polo
Guilherme Polo added the comment: That bug report is talking about gtk and modifiers affecting bindings (in the first comments at least), or maybe it even talks about your problem but it is so long that I would ask to include the relevant parts here. Nevertheless, after reading your comments I

[issue5825] Patch to add "remove" method to tempfile.NamedTemporaryFile

2009-04-23 Thread Miki Tebeka
New submission from Miki Tebeka : Adding "remove" method to NamedTemporaryFile will reduce the need to import os.unlink when creating a NamedTemporaryFile with delete=False. -- components: Library (Lib) files: tempfile.diff keywords: patch messages: 86387 nosy: tebeka severity: normal st

[issue5826] new unittest function listed as assertIsNotNot() instead of assertIsNotNone()

2009-04-23 Thread Mike Rooney
New submission from Mike Rooney : On http://docs.python.org/dev/py3k/whatsnew/3.1.html under unittest changes, you will find the last new function listed is assertIsNotNot() instead of assertIsNotNone() -- assignee: georg.brandl components: Documentation messages: 86388 nosy: georg.brand

[issue4111] Add DTrace probes

2009-04-23 Thread Skip Montanaro
Skip Montanaro added the comment: Robert> Is there any interest in my expanding the list of probes? Yes. Jeff Garrett (a guy I work with) added some more DTrace probes to a 2.4 source tree at work. I mentioned them in an earlier message. I'll check with him at work tomorrow and see about ma

[issue3613] base64.encodestring does not actually accept strings

2009-04-23 Thread Matt Giuca
Matt Giuca added the comment: I've attached a patch which renames encodestring to encodebytes (keeping encodestring around as an alias). Updated test and documentation. I also renamed decodestring to decodebytes, because it also refuses to accept a string (only a bytes). I have an alternative s

[issue3613] base64.encodestring does not actually accept strings

2009-04-23 Thread Matt Giuca
Matt Giuca added the comment: Now, base64.encodestring and decodestring seem a bit weird because the Base64 encoded string is also required to be a bytes. It seems to me that once something is Base64-encoded, it's considered to be ASCII text, not just some byte string, and therefore it should b

[issue4111] Add DTrace probes

2009-04-23 Thread Robert Kern
Robert Kern added the comment: We could probably merge Apple's and Sun's probes without too much trouble. Apple simply extended function-entry to include the argcount in addition to Sun's (filename, funcname, lineno) arguments. We could use Apple's probe while retaining compatibility with Sun-or

[issue3565] array documentation, method names not 3.0 compliant

2009-04-23 Thread Matt Giuca
Matt Giuca added the comment: OK since the patches I submitted are now eight months old, I just did an update and re-applied them. I am submitting new patch files which don't change anything, but are patches against revision 71822 (should be much easier to apply). I'd still like to see doc+byte

[issue3565] array documentation, method names not 3.0 compliant

2009-04-23 Thread Matt Giuca
Matt Giuca added the comment: Full method renaming patch. -- Added file: http://bugs.python.org/file13756/doc+bytesmethods.patch ___ Python tracker ___ __

[issue5827] os.path.normpath doesn't preserve unicode

2009-04-23 Thread Matt Giuca
New submission from Matt Giuca : In the Python 2.x branch, os.path.normpath will sometimes return a str even if given a unicode. This is not an issue in the Python 3.0 branch. This happens specifically when it throws away all string data and constructs its own: >>> os.path.normpath(u'') '.' >>>

[issue5827] os.path.normpath doesn't preserve unicode

2009-04-23 Thread Matt Giuca
Changes by Matt Giuca : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue4111] Add DTrace probes

2009-04-23 Thread Robert Kern
Robert Kern added the comment: James McIlree from Apple has informed me on dtrace-discuss that ustack helpers cannot currently be built on OS X. Bummer. -- ___ Python tracker ___

[issue3565] array documentation, method names not 3.0 compliant

2009-04-23 Thread Martin v. Löwis
Martin v. Löwis added the comment: I think this patch is unacceptable for Python 3.1. It is an incompatible change (removing a method), one would have to deprecate the method to be removed first. I also agree with Benjamin that a wider-audience approval of the deprecation would be required. I, m

[issue3565] array documentation, method names not 3.0 compliant

2009-04-23 Thread Matt Giuca
Matt Giuca added the comment: I agree with that -- too big a change to make now. But can we please get the documentation patch accepted? It's been waiting here for eight months with corrections to clearly-incorrect documentation. -- ___ Python track

[issue4111] Add DTrace probes

2009-04-23 Thread Robert Kern
Robert Kern added the comment: Ah, I misread the Apple function-return probe code. Its extra argument is the type name of the return object or "error" if an exception was raised, not the returned object itself. Could be useful. -- ___ Python tracker