[issue7883] CallTips.py _find_constructor does not work

2011-12-22 Thread Bernt Røskar Brenna
Bernt Røskar Brenna bernt.bre...@gmail.com 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 rep...@bugs.python.org

[issue13585] Add contextlib.ContextStack

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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.

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

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: For the record, here are the default ciphers in our Windows OpenSSL build: Z:\openssl-1.0.0aout64\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)

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

2011-12-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

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

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thank you Meador. I've committed an updated patch. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue8604] Adding an atomic FS write API

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue5689] Support xz compression in tarfile module

2011-12-22 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com 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

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

2011-12-22 Thread akira
Changes by akira 4kir4...@gmail.com: -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13643 ___ ___ Python-bugs-list mailing list

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

2011-12-22 Thread naif
naif n...@globaleaks.org 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

[issue8604] Adding an atomic FS write API

2011-12-22 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr 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.

[issue5689] Support xz compression in tarfile module

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Perhaps Paul can try to reproduce and diagnose the issue directly on the buildbot? -- nosy: +pmoore ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5689

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

2011-12-22 Thread maniram maniram
maniram maniram maniandra...@gmail.com added the comment: Well, I expect Python 3 to raise RuntimeError about recursion not to segfault. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13644

[issue13585] Add contextlib.ContextStack

2011-12-22 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com 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

[issue10296] ctypes catches BreakPoint error on windows 32

2011-12-22 Thread Sacha Brants-Menard
Changes by Sacha Brants-Menard sa...@brants.fr: -- nosy: +Sacha.Brants-Menard ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10296 ___ ___

[issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

[issue13585] Add contextlib.ContextStack

2011-12-22 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com 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

[issue9922] subprocess.getstatusoutput can fail with utf8 UnicodeDecodeError

2011-12-22 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com 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

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

2011-12-22 Thread naif
New submission from naif n...@globaleaks.org: 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

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

2011-12-22 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: There is no place for it to raise a RuntimeError which will continue to propogate! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13644

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

2011-12-22 Thread Alexey
New submission from Alexey ani...@wayround.org: function xml.sax.saxutils.escape('\x00qweqwe') returns '\x00qweqwelt;' \x00 did not escaped to #0; is this is a correct behavior? this is influences tools like xmpppy, which sends \x00 not encoded and leads to xmpp error. -- messages:

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

2011-12-22 Thread Alexey
Changes by Alexey ani...@wayround.org: -- components: +XML ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13648 ___ ___ Python-bugs-list mailing

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

2011-12-22 Thread Alexey
Alexey ani...@wayround.org added the comment: sorry, xmpppy uses it's own escape method, but anyway... :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13648 ___

[issue13649] termios.ICANON is not documented

2011-12-22 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: 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

[issue13443] wrong links and examples in the functional HOWTO

2011-12-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

[issue13443] wrong links and examples in the functional HOWTO

2011-12-22 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: Fixed this in 2.7. -- nosy: +orsenthil resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13443

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

2011-12-22 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com 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 rep...@bugs.python.org

[issue13650] urllib HTTPRedirectHandler does not implement documented behavior

2011-12-22 Thread tom kel
New submission from tom kel tomke...@gmail.com: 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

[issue13650] urllib HTTPRedirectHandler does not implement documented behavior

2011-12-22 Thread tom kel
Changes by tom kel tomke...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13650 ___ ___ Python-bugs-list

[issue13651] Improve redirection in urllib

2011-12-22 Thread tom kel
New submission from tom kel tomke...@gmail.com: 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

[issue13651] Improve redirection in urllib

2011-12-22 Thread Brian Curtin
Brian Curtin br...@python.org 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 rep...@bugs.python.org

[issue13651] Improve redirection in urllib

2011-12-22 Thread tom kel
tom kel tomke...@gmail.com 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

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

2011-12-22 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com 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

[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 w...@wilhall.com: 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

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

2011-12-22 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com 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

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

2011-12-22 Thread Matthew Barnett
Matthew Barnett pyt...@mrabarnett.plus.com 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:

[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 benja...@python.org: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13652 ___

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

2011-12-22 Thread WIl Hall
WIl Hall w...@wilhall.com added the comment: Makes sense. Misunderstanding on my part, then. Closing as invalid (not a bug). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13652 ___

[issue5689] Support xz compression in tarfile module

2011-12-22 Thread Paul Moore
Paul Moore p.f.mo...@gmail.com 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... --

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

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2011-12-22 Thread Raymond Hettinger
Raymond Hettinger raymond.hettin...@gmail.com 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

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

2011-12-22 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: + encoding = locale.getpreferredencoding() It should be locale.getpreferredencoding(False). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13619

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

2011-12-22 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com 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

[issue13078] IDLE: Python Crashes When Saving Or Opening

2011-12-22 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: Python Crashes When Saving Or Opening - IDLE: Python Crashes When Saving Or Opening ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13078

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

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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

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

2011-12-22 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr 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 pit...@free.fr 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

[issue5689] Support xz compression in tarfile module

2011-12-22 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com 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

[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 neolo...@free.fr added the comment: Victor, could you try the attached script on FreeBSD, to see if you get ECONNREFUSED? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13565

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

2011-12-22 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com 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

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

2011-12-22 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org http://bugs.python.org/issue13619

[issue9039] IDLE and module Doc

2011-12-22 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com added the comment: Is this still an issue? -- nosy: +serwy type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9039 ___

[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Andrew Dalke
New submission from Andrew Dalke da...@dalkescientific.com: 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

[issue13653] reorder set.intersection parameters for better performance

2011-12-22 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13653 ___

[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 atlant...@gmx.com: 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

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

2011-12-22 Thread Michael P. Reilly
Michael P. Reilly arc...@gmail.com 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

[issue9039] IDLE and module Doc

2011-12-22 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9039 ___

[issue8313] unprintable AssertionError object message in unittest tracebacks

2011-12-22 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org 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

[issue8313] unprintable AssertionError object message in unittest tracebacks

2011-12-22 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org 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 rep...@bugs.python.org

[issue12798] Update mimetypes documentation

2011-12-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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

[issue12798] Update mimetypes documentation

2011-12-22 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za 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 devn...@psf.upfronthosting.co.za 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 rep...@bugs.python.org

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

2011-12-22 Thread Roger Serwy
Roger Serwy roger.se...@gmail.com 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

[issue12798] Update mimetypes documentation

2011-12-22 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com 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 rep...@bugs.python.org

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

2011-12-22 Thread Ned Deily
Ned Deily n...@acm.org 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 raymond.hettin...@gmail.com 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