[issue7883] CallTips.py _find_constructor does not work

2011-12-22 Thread Bernt Røskar Brenna
Bernt Røskar Brenna added the comment: Attached is Lib/test/test_idlelib.py, containing a unit test for the issue. -- Added file: http://bugs.python.org/file24075/test_idlelib.py ___ Python tracker

[issue13585] Add contextlib.ContextStack

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > with ContextStack() as stack: > files = [stack.enter_context(open(fname)) for fname in filenames] I find this a bit distasteful. Cleaning up resources now needs something called a "ContextStack" and an "enter_context" method call. There's a bit t

[issue13636] Python SSL Stack doesn't have a Secure Default set of ciphers

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, here are the default ciphers in our Windows OpenSSL build: Z:\openssl-1.0.0a>out64\openssl.exe ciphers -v WARNING: can't open config file: /usr/local/ssl/openssl.cnf ECDHE-RSA-AES256-SHASSLv3 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA1 ECDHE-

[issue13626] Python SSL stack doesn't support DH ciphers

2011-12-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 33dea851f918 by Antoine Pitrou in branch 'default': Issue #13626: Add support for SSL Diffie-Hellman key exchange, through the http://hg.python.org/cpython/rev/33dea851f918 -- nosy: +python-dev ___ Pytho

[issue13626] Python SSL stack doesn't support DH ciphers

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you Meador. I've committed an updated patch. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue8604] Adding an atomic FS write API

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm not sure about the best module to host this, though: os.path ? os.path is mostly about path manipulation functions, although it also performs directory I/O (e.g. realpath()). -- ___ Python tracker

[issue5689] Support xz compression in tarfile module

2011-12-22 Thread Nadeem Vawda
Nadeem Vawda added the comment: This failure seems to crop up often, but not on every run: http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/3941/steps/test/logs/stdio http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%203.x/builds/3940/steps/test/logs/stdio

[issue13643] 'ascii' is a bad filesystem default encoding

2011-12-22 Thread akira
Changes by akira <4kir4...@gmail.com>: -- nosy: +akira ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue13636] Python SSL Stack doesn't have a Secure Default set of ciphers

2011-12-22 Thread naif
naif added the comment: Regarding the mainteneance i expect that, if we make a future-proof choice, it would take at least 5 years before that someone will need to have other ciphers added. Consider that a new cipher is standardized once every X year, and typically, if it get diffused/adopte

[issue8604] Adding an atomic FS write API

2011-12-22 Thread Charles-François Natali
Charles-François Natali added the comment: > I prefer to write a "best-effort" function I disagree. People who explicitely use an atomic file API want atomicity/persistency, otherwise they wouldn't use it. Exposing a function that may, or may not, be atomic is just plain wrong. IMHO, the righ

[issue5689] Support xz compression in tarfile module

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Perhaps Paul can try to reproduce and diagnose the issue directly on the buildbot? -- nosy: +pmoore ___ Python tracker ___

[issue13644] Python 3 crashes (segfaults) with this code.

2011-12-22 Thread maniram maniram
maniram maniram added the comment: Well, I expect Python 3 to raise RuntimeError about recursion not to segfault. -- ___ Python tracker ___ _

[issue13585] Add contextlib.ContextStack

2011-12-22 Thread Nick Coghlan
Nick Coghlan added the comment: ContextStack is intended to be a building block that makes it easy to compose context managers and other callbacks, not necessarily an API you'd regularly use directly. For example, given ContextStack (as currently implemented in contextlib2), it's trivial to w

[issue10296] ctypes catches BreakPoint error on windows 32

2011-12-22 Thread Sacha Brants-Menard
Changes by Sacha Brants-Menard : -- nosy: +Sacha.Brants-Menard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, getoutput and getstatusoutput are arguably ugly. However, since they are very high-level functions meant to quickly execute commands, returning str makes sense. You can't do anything smart with the output anyway, since stdout and stderr are intermingled

[issue13585] Add contextlib.ContextStack

2011-12-22 Thread Nick Coghlan
Nick Coghlan added the comment: The comparison to Go's defer statement is interesting, though: ContextStack.register basically *is* the same as defer. While a nested with statement is a better option in Python, if we ignore that for the moment, you *could* write that simply copying example:

[issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError

2011-12-22 Thread Nick Coghlan
Nick Coghlan added the comment: It is indeed unfortunate that these two functions weren't killed off in the Py3k transition instead of being migrated from the commands module to subprocess (their current implementation runs counter to the entire subprocess security design by implicitly invoki

[issue13647] Python SSL stack doesn't securely validate certificate (as client)

2011-12-22 Thread naif
New submission from naif : It has been noticed by the well known security researcher Dan Kaminsky ( http://dankaminsky.com/) that Python SSL binding doesn't securely validate a digital certificate while used. There is a new "match_hostname"http://pypi.python.org/pypi/backports.ssl_match_hostna

[issue13644] Python 3 crashes (segfaults) with this code.

2011-12-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: There is no place for it to raise a RuntimeError which will continue to propogate! -- ___ Python tracker ___ __

[issue13648] xml.sax.saxutils.escape does not escapes \x00

2011-12-22 Thread Alexey
New submission from Alexey : function xml.sax.saxutils.escape('\x00qweqwe<') returns '\x00qweqwe<' \x00 did not escaped to � is this is a correct behavior? this is influences tools like xmpppy, which sends \x00 not encoded and leads to xmpp error. -- messages: 150096 nosy: Animus pri

[issue13648] xml.sax.saxutils.escape does not escapes \x00

2011-12-22 Thread Alexey
Changes by Alexey : -- components: +XML ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue13648] xml.sax.saxutils.escape does not escapes \x00

2011-12-22 Thread Alexey
Alexey added the comment: sorry, xmpppy uses it's own escape method, but anyway... :) -- ___ Python tracker ___ ___ Python-bugs-list

[issue13649] termios.ICANON is not documented

2011-12-22 Thread anatoly techtonik
New submission from anatoly techtonik : http://docs.python.org/library/termios.html is missing documentation for ICANON flag used to put terminal to "raw" mode. It is also worth to place `termios` raw/canonical mode equivalent on `tty` pages, so that people porting C code to Python could under

[issue13443] wrong links and examples in the functional HOWTO

2011-12-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset c6880edaf6f3 by Senthil Kumaran in branch '2.7': Issue13443 - Remove the functional module examples from 2.7 (as module is http://hg.python.org/cpython/rev/c6880edaf6f3 -- nosy: +python-dev ___ Python tr

[issue13443] wrong links and examples in the functional HOWTO

2011-12-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Fixed this in 2.7. -- nosy: +orsenthil resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue13644] Python 3 crashes (segfaults) with this code.

2011-12-22 Thread Roger Serwy
Roger Serwy added the comment: With Python 2, I can inspect the error to see where it occurred using traceback. With Python 3, I'd need to use gdb. -- nosy: +serwy ___ Python tracker _

[issue13650] urllib HTTPRedirectHandler does not implement documented behavior

2011-12-22 Thread tom kel
New submission from tom kel : Python 3.2.2, Here is a blokck of code from the HTTPRedirectHandler: m = req.get_method() if (not (code in (301, 302, 303, 307) and m in ("GET", "HEAD") or code in (301, 302, 303) and m == "POST")): raise HTTPError(req.full_u

[issue13650] urllib HTTPRedirectHandler does not implement documented behavior

2011-12-22 Thread tom kel
Changes by tom kel : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13651] Improve redirection in urllib

2011-12-22 Thread tom kel
New submission from tom kel : refer to patch for improvements -- components: Library (Lib) files: http-redirect-3.2.diff keywords: patch messages: 150103 nosy: tom.kel priority: normal severity: normal status: open title: Improve redirection in urllib type: enhancement versions: Python 3

[issue13651] Improve redirection in urllib

2011-12-22 Thread Brian Curtin
Brian Curtin added the comment: Can you explain the patch and state why you would like that change included? This would require a test. -- nosy: +brian.curtin ___ Python tracker __

[issue13651] Improve redirection in urllib

2011-12-22 Thread tom kel
tom kel added the comment: I created this patch to further the functionality of redirection using the "location" header in the HTTPRedirectHandler class under urllib/request.py Currently, the method http_error_302, which will handle code 302 redirection will parse the location header and buil

[issue5492] Error on leaving IDLE with quit() or exit() under Linux

2011-12-22 Thread Roger Serwy
Roger Serwy added the comment: The attached patch fixes the problem. The close method does not need to wait for poll_subprocess rescheduling to stop. The subprocess will be killed, which would cause the socket to timeout. With closing=True, poll_subprocess will return and not reschedule. ---

[issue13652] Creating lambda functions in a loop has unexpected results when resolving variables used as arguments

2011-12-22 Thread WIl Hall
New submission from WIl Hall : When creating lambda functions in a loop, variables involved in the lambda statements appear to not resolve until the loop finishes. This results in all of the defined lambda functions using the same variable to resolve to the last value of that variable. For ex

[issue13592] repr(regex) doesn't include actual regex

2011-12-22 Thread Matthew Barnett
Matthew Barnett added the comment: I'm just adding this to the regex module and I've come up against a possible issue. The regex module supports named lists, which could be very big. Should the entire contents of those lists also be shown in the repr?They would have to be if the repr is to be

[issue13652] Creating lambda functions in a loop has unexpected results when resolving variables used as arguments

2011-12-22 Thread Matthew Barnett
Matthew Barnett added the comment: That's not a bug. This might help to explain what's going on: What do (lambda) function closures capture in Python? http://stackoverflow.com/questions/2295290/what-do-lambda-function-closures-capture-in-python -- nosy: +mrabarnett __

[issue13652] Creating lambda functions in a loop has unexpected results when resolving variables used as arguments

2011-12-22 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13652] Creating lambda functions in a loop has unexpected results when resolving variables used as arguments

2011-12-22 Thread WIl Hall
WIl Hall added the comment: Makes sense. Misunderstanding on my part, then. Closing as invalid (not a bug). -- ___ Python tracker ___ ___

[issue5689] Support xz compression in tarfile module

2011-12-22 Thread Paul Moore
Paul Moore added the comment: A simple rebuild and test run of that test in debug mode didn't fail... I'll run the full test suite as a check, but that could take some time - that buildslave isn't the fastest in the world... -- ___ Python tracker

[issue13592] repr(regex) doesn't include actual regex

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm just adding this to the regex module and I've come up against a > possible issue. The regex module supports named lists, which could be > very big. Should the entire contents of those lists also be shown in > the repr?They would have to be if the repr is t

[issue13592] repr(regex) doesn't include actual regex

2011-12-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: "I don't see how eval()able repr is a big deal. Most reprs aren't, ..." Sometimes, I wonder if we're even talking about the same programming language. Historically, a good deal of effort has gone into creating evalable reprs, if only because they accurate

[issue13619] Add a new codec: "locale", the current locale encoding

2011-12-22 Thread STINNER Victor
STINNER Victor added the comment: + encoding = locale.getpreferredencoding() It should be locale.getpreferredencoding(False). -- ___ Python tracker ___

[issue13592] repr(regex) doesn't include actual regex

2011-12-22 Thread Alex Gaynor
Alex Gaynor added the comment: Raymond, Antoine: I don't see your claims as contradictory, it's definitely true that the Python standardlib has historically tried to keep reprs as being eval-able, I think Antoine's correct that the vast majority of 3rd-party code does not keep with that trend

[issue13078] IDLE: Python Crashes When Saving Or Opening

2011-12-22 Thread STINNER Victor
Changes by STINNER Victor : -- title: Python Crashes When Saving Or Opening -> IDLE: Python Crashes When Saving Or Opening ___ Python tracker ___ ___

[issue13592] repr(regex) doesn't include actual regex

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But it only takes one committer who doesn't care about evalable reprs > to permanently break the pattern for everyone :-( So 95% of our datatypes were committed by a single person? :) -- ___ Python tracker

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-22 Thread Charles-François Natali
Charles-François Natali added the comment: Here's a new version with a test (untested). Note that I'm absolutely not sure that the 'memsize' argument to bigmemtest is correct. -- Added file: http://bugs.python.org/file24079/pickle_overflow-2.diff ___

[issue13647] Python SSL stack doesn't securely validate certificate (as client)

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > There is a new "match_hostname" that doesn't implement all the > required, standard SSL/TLS Client security checks that should be done. Indeed, as the name indicates, it just checks the hostname. Please detail what the other security checks are (bonus points

[issue5689] Support xz compression in tarfile module

2011-12-22 Thread Nadeem Vawda
Nadeem Vawda added the comment: Not to worry - as I said in my previous message, I can reproduce the error on my own XP machine. I also noticed that running test_tarfile alone doesn't trigger the errors, which leads me to suspect that the failure is due to some interaction with another test get

[issue13565] test_multiprocessing.test_notify_all() hangs on "AMD64 Snow Leopard 02 03.x"

2011-12-22 Thread Charles-François Natali
Charles-François Natali added the comment: Victor, could you try the attached script on FreeBSD, to see if you get ECONNREFUSED? -- ___ Python tracker ___ _

[issue13052] IDLE: replace ending with '\' causes crash

2011-12-22 Thread Roger Serwy
Roger Serwy added the comment: issue13052.patch against 3.3a0 fixes the replace dialog. It also stops "Replace All" from closing the dialog. (What other application actually does this?) When 'Regular Expression' is not checked, the find and the replace dialogs treat the fields as raw strings.

[issue13619] Add a new codec: "locale", the current locale encoding

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure I like this idea. I think it would be nice to see it discussed on python-dev. -- nosy: +pitrou ___ Python tracker ___ ___

[issue9039] IDLE and module Doc

2011-12-22 Thread Roger Serwy
Roger Serwy added the comment: Is this still an issue? -- nosy: +serwy type: crash -> behavior ___ Python tracker ___ ___ Python-bugs-

[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Andrew Dalke
New submission from Andrew Dalke : In Issue3069, Arnaud Delobelle proposed support for multiple values to set.intersection() and set.union(), writing "Intersection is optimized by sorting all sets/frozensets/dicts in increasing order of size and only iterating over elements in the smallest."

[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue13654] IDLE: Freezes and/or crash on SyntaxWarning... is used prior to global declaration

2011-12-22 Thread Marco Scataglini
New submission from Marco Scataglini : Writing the following code in the IDLE module/scriptneditor and then running it (F5) will momentarily freeze without giving the expected warning message ("SyntaxWarning: name 'GLOBAL1' is used prior to global declaration") and it will crash all IDLE windo

[issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang

2011-12-22 Thread Michael P. Reilly
Michael P. Reilly added the comment: I'm seeing that shutdown does have a race condition just using BaseHTTPServer.HTTPServer. See the attached simple script. Then access http://localhost:8081. This is using both Python 2.6.6 (r266:84292, May 22 2011, 16:47:42) on Oracle Linux Server 6.1 a

[issue9039] IDLE and module Doc

2011-12-22 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> works for me status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue8313] message in unittest tracebacks

2011-12-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: http://pypi.python.org/pypi/unittest2 says "There are several places in unittest2 (and unittest) that call str(...) on exceptions to get the exception message. This can fail if the exception was created with non-ascii unicode. This is rare and I won't addr

[issue8313] message in unittest tracebacks

2011-12-22 Thread Gregory P. Smith
Gregory P. Smith added the comment: We're on python 2.6, otherwise this would be a moot point. but you might want to include something like that in a new unittest2 backport release. -- ___ Python tracker

[issue12798] Update mimetypes documentation

2011-12-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset aef79ff1bc9b by Senthil Kumaran in branch '3.2': Issue12798 - Update mimetypes documentation. Correct the doc section where http://hg.python.org/cpython/rev/aef79ff1bc9b New changeset 4b306aee21a4 by Senthil Kumaran in branch 'default': Merge chang

[issue12798] Update mimetypes documentation

2011-12-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset cfa3fe9d7b1f by Senthil Kumaran in branch '2.7': porting mimetype doc changes from 3.2. http://hg.python.org/cpython/rev/cfa3fe9d7b1f -- ___ Python tracker __

[issue12798] Update mimetypes documentation

2011-12-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9c19df6c8ea0 by Senthil Kumaran in branch '3.2': News entry for Issue12798 http://hg.python.org/cpython/rev/9c19df6c8ea0 -- ___ Python tracker ___

[issue13654] IDLE: Freezes and/or crash on SyntaxWarning... is used prior to global declaration

2011-12-22 Thread Roger Serwy
Roger Serwy added the comment: I ran IDLE with a console and then ran your script against the latest release. The error message is due to a bug in idle_showwarning. Your script works with the development version, however. This is a duplicate of issue12438 which was fixed in e9c406a53972, but

[issue12798] Update mimetypes documentation

2011-12-22 Thread Senthil Kumaran
Senthil Kumaran added the comment: Updated the doc with Sandro Tosi's suggested changes in all the codelines. -- nosy: +orsenthil resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue13654] IDLE: Freezes and/or crash on SyntaxWarning... is used prior to global declaration

2011-12-22 Thread Ned Deily
Ned Deily added the comment: The fix has been released in Python 3.2.2. It will be in Python 2.7.3 when released. -- nosy: +ned.deily resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> IDLE problem displaying warning message ___

[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks guys. I'll look at this in detail when I get a chance. Offhand, it seems like a good idea though it may rarely be of benefit. The only downsides I see are that it overrides the user's ability to specify the application order and that it would be