[issue13405] Add DTrace probes

2012-01-20 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: I am an almost complete 0 in C system programming and in DTrace matters, but I feel like DTrace has a potential to help me understand internal CPython processes better. If maintenance of the code with DTrace is hard, there are several ways

[issue13703] Hash collision security issue

2012-01-20 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: A dict can contain non-orderable keys, I don't know how an AVL tree can fit into that. They may be non-orderable, but since they are required to be hashable, I guess one can build an comparison function with the following: def

[issue13703] Hash collision security issue

2012-01-20 Thread Frank Sievertsen
Frank Sievertsen pyt...@sievertsen.de added the comment: They may be non-orderable, but since they are required to be hashable, I guess one can build an comparison function with the following: Since we are are trying to fix a problem where hash(X) == hash(Y), you can't make them orderable by

[issue13736] urllib.request.urlopen leaks exceptions from socket and httplib.client

2012-01-20 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- assignee: - orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13736 ___ ___

[issue13703] Hash collision security issue

2012-01-20 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Since we are are trying to fix a problem where hash(X) == hash(Y), you can't make them orderable by using the hash-values and build a binary out of the (equal) hash-values. That's not what I suggested. Keys would be considered equal

[issue13703] Hash collision security issue

2012-01-20 Thread Frank Sievertsen
Frank Sievertsen pyt...@sievertsen.de added the comment: The hash value is just used to know if the key belongs to the left or the right child tree. Yes, that's what I don't understand: How can you do this, when ALL hash-values are equal. -- ___

[issue13817] deadlock in subprocess while running several threads using Popen

2012-01-20 Thread Martijn van Oosterhout
Martijn van Oosterhout klep...@gmail.com added the comment: What a concidence, we had this problem as well and just today tracked it down, and turns out someone filed this bug yesterday. I note the referenced bug (#13156) says that it's been fixed in the release branch but not yet released. I

[issue13703] Hash collision security issue

2012-01-20 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Yes, that's what I don't understand: How can you do this, when ALL hash-values are equal. You're right, that's stupid. Short night... -- ___ Python tracker rep...@bugs.python.org

[issue13703] Hash collision security issue

2012-01-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Charles-François Natali wrote: Anyway, I still think that the hash randomization is the right way to go, simply because it does solve the problem, whereas the collision counting doesn't: Martin made a very good point on python-dev with

[issue13807] logging.Handler.handlerError() may raise AttributeError in traceback.print_exception()

2012-01-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b60c789c4ccd by Vinay Sajip in branch '2.7': Closes #13807: Now checks for sys.stderr being there before writing to it. http://hg.python.org/cpython/rev/b60c789c4ccd New changeset 73dad4940b88 by Vinay Sajip in

[issue13516] Gzip old log files in rotating handlers

2012-01-20 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Refactoring in 57295c4d81ac supports this use case. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2012-01-20 Thread Maxim Yegorushkin
Maxim Yegorushkin maxim.yegorush...@gmail.com added the comment: I am still having this issue with Python-2.7.2 (which includes the patch) and openssl-devel-1.0.0e-1.fc14.x86_64: File ./download.py, line 195, in download_file ftp.retrbinary(retr + filename, lambda data:

[issue13703] Hash collision security issue

2012-01-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Note that the collision counting demo patch is trivial - I just wanted to demonstrate how it works. As already mentioned, there's room for improvement: If Python objects were to provide an additional method for calculating a

[issue13736] urllib.request.urlopen leaks exceptions from socket and httplib.client

2012-01-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I think the general pattern of wrapping exceptions in other exceptions is rather unfortunate. It makes it harder to examine the original problem (for example the ``errno`` attribute) for no actual gain. -- nosy: +pitrou

[issue13703] Hash collision security issue

2012-01-20 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: So you get the best of both worlds and randomization would only kick in when it's really needed to keep the application running. Of course, but then the collision counting approach loses its main advantage over randomized hashing:

[issue13760] ConfigParser exceptions are not pickleable

2012-01-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset e63e2471f46f by Łukasz Langa in branch 'default': #13760: picklability tests for configparser exceptions http://hg.python.org/cpython/rev/e63e2471f46f New changeset 76077971ee1f by Łukasz Langa in branch '3.2':

[issue13822] is(upper/lower/title) are not exactly correct

2012-01-20 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13822 ___

[issue13814] Generators as context managers.

2012-01-20 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +ncoghlan versions: +Python 3.3 -Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13814 ___

[issue13832] tokenization assuming ASCII whitespace; missing multiline case

2012-01-20 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: Ignoring non-ascii whitespace is defensible, and I agree that it should match the rest of the parser. Ignoring 2nd lines is still a problem, and supposedly part of what got fixed. Test case: s=x=5 # comment x=6 compile(s, testbadsingle,

[issue13832] tokenization assuming ASCII whitespace; missing multiline case

2012-01-20 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: $ ./python Python 3.3.0a0 (default:50a4af2ca654+, Jan 20 2012, 10:59:48) [GCC 4.5.3] on linux Type help, copyright, credits or license for more information. s=x=5 # comment ... x=6 ... compile(s, blah, single) Traceback (most recent

[issue13760] ConfigParser exceptions are not pickleable

2012-01-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 5ecf650ede7c by Łukasz Langa in branch '2.7': Fixes #13760: picklability of ConfigParser exceptions http://hg.python.org/cpython/rev/5ecf650ede7c -- ___ Python tracker

[issue13760] ConfigParser exceptions are not pickleable

2012-01-20 Thread Łukasz Langa
Łukasz Langa luk...@langa.pl added the comment: 3.2 and 3.3 already worked as expected. For 2.7 I did the __reduce__ workaround that's also used by SQLAlchemy. -- resolution: - fixed stage: test needed - committed/rejected status: open - closed type: - behavior

[issue13736] urllib.request.urlopen leaks exceptions from socket and httplib.client

2012-01-20 Thread Jyotirmoy Bhattacharya
Jyotirmoy Bhattacharya jyotir...@jyotirmoy.net added the comment: Antoine, could raise ... from be used here? Perhaps also using new subclasses of URLError to allow the exceptions to be caught with finer granularity. That way no information would be lost while at the same time not surprising

[issue13822] is(upper/lower/title) are not exactly correct

2012-01-20 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13822 ___ ___

[issue13736] urllib.request.urlopen leaks exceptions from socket and httplib.client

2012-01-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Antoine, could raise ... from be used here? That's a possible compromise indeed. It's up to Senthil to decide anyway. Perhaps also using new subclasses of URLError to allow the exceptions to be caught with finer granularity. That way no

[issue13703] Hash collision security issue

2012-01-20 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: Marc-Andre Lemburg: So you get the best of both worlds and randomization would only kick in when it's really needed to keep the application running. Charles-François Natali The only argument in favor the collision counting is that it will

[issue13703] Hash collision security issue

2012-01-20 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: On Thu, Jan 19, 2012 at 8:58 PM, Frank Sievertsen rep...@bugs.python.orgwrote: Frank Sievertsen pyt...@sievertsen.de added the comment: That's true. But without the suffix, I can pretty easy and efficient guess the prefix by just

[issue13703] Hash collision security issue

2012-01-20 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: On Fri, Jan 20, 2012 at 7:58 AM, STINNER Victor If the hash output depends on an argument, the result cannot be cached. They can still be cached in a separate dict based on id, rather than string contents. It may also be possible to cache

[issue13806] Audioop decompression frames size check fix

2012-01-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Do you think it would be possible to add a test for valid compressed data that used to trigger the check? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13806

[issue13703] Hash collision security issue

2012-01-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I ran the test suite of Twisted 11.1 using a limit of 20 collisions: there is no test failing because of hash collisions. -- ___ Python tracker rep...@bugs.python.org

[issue13760] ConfigParser exceptions are not pickleable

2012-01-20 Thread Faheem Mitha
Faheem Mitha fah...@faheem.info added the comment: Thanks for the quick attention to this, Lukasz. I'm just curious. Why do 3.2 and 3.3 already work? My understanding was that the basic exception issue in http://bugs.python.org/issue1692335 was still open. --

[issue11076] Iterable argparse Namespace

2012-01-20 Thread Jean-Lou Dupont
Changes by Jean-Lou Dupont jeanlou.dup...@gmail.com: -- nosy: +Jean-Lou.Dupont ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11076 ___ ___

[issue13829] exception error

2012-01-20 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Can you isolate the cause? There is way too much in that core dump to try to debug the problem. Without knowing what code in this Moviegrabber app caused the bug we can't do anything to debug the issue. -- nosy: +brett.cannon status:

[issue13405] Add DTrace probes

2012-01-20 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list

[issue13829] exception error

2012-01-20 Thread Dan kamp
Dan kamp bitbuc...@roontoon.com added the comment: On Jan 20, 2012, at 4:20 PM, Brett Cannon wrote: Can you isolate the cause? There is way too much in that core dump to try to debug the problem. Without knowing what code in this Moviegrabber app caused the bug we can't do anything to

[issue13703] Hash collision security issue

2012-01-20 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: On Fri, 2012-01-06 at 12:52 +, Marc-Andre Lemburg wrote: Marc-Andre Lemburg m...@egenix.com added the comment: Demo patch implementing the collision limit idea for Python 2.7. -- Added file:

[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Confirmed with on 3.2.2 Win7 for all three methods. Docs say .append should raise AssertionError (see below). However, that is unusual and TypeError is normal practice. I am not sure what to do. Our docs say: ''' append(subelement) Adds the

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Doc patch attached to make sure correct. Should {} be quoted? Eric, do you want to close off the idea of changing :d errors, or switch back after the doc fix? -- keywords: +patch nosy: +terry.reedy stage: - test needed Added file:

[issue13405] Add DTrace probes

2012-01-20 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: My point about DTrace probes is not performance per-se but observability. An OS with DTrace support can be completely inspected and shows you ALL the inner working. You can see a particular pattern in the operating system and locate the syscalls

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-20 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I don't think {} is the correct way to document this. These all have an empty format specifier: {}.format(foo) {:}.format(foo) {0}.format(foo) {0:}.format(foo) {name}.format(name=foo) format(foo, ) format(foo) That is, they all call

[issue13796] use 'text=...' to define the text attribute of and xml.etree.ElementTree.Element

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Pedro and Patrick: if you are going to respond by email rather than by typing in the browser box, PLEASE delete the quoted text. Or on occasion, quote a line or two if really necessary, as when responding to a previous message other than the

[issue13798] Pasting and then running code doesn't work in the IDLE Shell

2012-01-20 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- resolution: - duplicate status: open - closed superseder: - Pasted \n not same as typed \n ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13798

[issue13799] Base 16 should be hexadecimal in Unicode HOWTO

2012-01-20 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13799 ___ ___ Python-bugs-list

[issue13804] Python library structure creates hard to read code when using higher order functions

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I am closing this because map has even less chance of being made a collection method than join. Unlike join, map takes any positive number of iterables as args, not just one. 'Iterables' includes iterators, which intentionally need have no

[issue13812] multiprocessing package doesn't flush stderr on child exception

2012-01-20 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +jnoller stage: - test needed versions: -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13812 ___

[issue13703] Hash collision security issue

2012-01-20 Thread Dave Malcolm
Dave Malcolm dmalc...@redhat.com added the comment: On Fri, 2012-01-20 at 22:55 +, Dave Malcolm wrote: Dave Malcolm dmalc...@redhat.com added the comment: On Fri, 2012-01-06 at 12:52 +, Marc-Andre Lemburg wrote: Marc-Andre Lemburg m...@egenix.com added the comment: Demo patch

[issue6631] Disallow relative files paths in urllib*.open()

2012-01-20 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- title: urlparse.urlunsplit() can't handle relative files (for urllib*.open() - Disallow relative files paths in urllib*.open() ___ Python tracker rep...@bugs.python.org

[issue6631] Disallow relative files paths in urllib*.open()

2012-01-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f6008e936fbc by Senthil Kumaran in branch '2.7': Fix Issue6631 - Disallow relative files paths in urllib*.open() http://hg.python.org/cpython/rev/f6008e936fbc -- nosy: +python-dev

[issue6631] Disallow relative files paths in urllib*.open()

2012-01-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 4366c0df2c73 by Senthil Kumaran in branch '2.7': NEWS entry for Issue6631 http://hg.python.org/cpython/rev/4366c0df2c73 New changeset 514994d7a9f2 by Senthil Kumaran in branch '3.2': Fix Issue6631 - Disallow

[issue6631] Disallow relative files paths in urllib*.open()

2012-01-20 Thread Senthil Kumaran
Changes by Senthil Kumaran sent...@uthcode.com: -- resolution: - fixed stage: - committed/rejected status: open - closed type: performance - behavior versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org

[issue13814] Generators as context managers.

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Calling g.close() is pointless for a generator used in normal pull mode and run to completion, as in the example. The generator is already 'closed', so g.close() does not do anything useful. See

[issue13834] In help(bytes.strip) there is no info about leading ASCII whitespace

2012-01-20 Thread py.user
New submission from py.user port...@yandex.ru: help(bytes.strip): strip(...) B.strip([bytes]) - bytes Strip leading and trailing bytes contained in the argument. If the argument is omitted, strip trailing ASCII whitespace. -- assignee: docs@python components:

[issue13815] tarfile.ExFileObject can't be wrapped using io.TextIOWrapper

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Based on other examples in the doc, I think the note ... and also supports iteration over its lines. should be extended with It also has a dummy `flush` method, so that it can be wrapped using :class:`io.TextIOWrapper`. Then just add ..

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-20 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Oh, I see. Yes, that is a problem. object.__format__ knows the type of the object it was called on, right? Couldn't it catch the error and re-raise it with the correct type? (If the type isn't str, of course, we don't want to get

[issue13816] Two typos in the docs

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: The Chicago Manual of Style. which is perhaps the mostly widely used general style manual in the US, uses 'th' as a suffix without ' or -. ie, 28th, etc except for 22d ('preferred' to 22nd) and 23d ('preferred' to 23rd).

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-20 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Oh, never mind that comment about recursion, I wasn't thinking it through. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13790 ___

[issue13818] argparse: -h listening required options under optional arguments

2012-01-20 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +bethard stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13818 ___ ___

[issue13820] 2.6 is no longer in the future

2012-01-20 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c84b39c18963 by Terry Jan Reedy in branch '2.7': Issue13820 as and with really became keywords in 2.6. http://hg.python.org/cpython/rev/c84b39c18963 -- nosy: +python-dev

[issue13820] 2.6 is no longer in the future

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I verified that 'as' and 'with' are in the 2.6 keyword.kwlist. http://svn.python.org/projects/python/branches/release26-maint/Lib/keyword.py. I verified that they work as keywords in 2.7.

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-20 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: OK, the example of an empty format spec should be dropped. Let people figure it out ;-). format([], 'd') Traceback (most recent call last): File stdin, line 1, in module ValueError: Unknown format code 'd' for object of type 'str' One

[issue1602] windows console doesn't print or input Unicode

2012-01-20 Thread akira
Changes by akira 4kir4...@gmail.com: -- nosy: +akira ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1602 ___ ___ Python-bugs-list mailing list