[issue13695] type specific to type-specific

2012-01-18 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Shut up, Georg! Ezio, please fix this two additional typos to close this bug report for good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13695

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I'm not sure what you're saying here. Is it that 'xx' should be ignored? The documentation says that 'xx' isn't fill and alignment, not that they don't exist. If they're not fill and alignment, then the format string is in error. --

[issue9208] SMTPHandler in the logging module does not handle unicode strings

2012-01-18 Thread Chris Withers
Chris Withers ch...@simplistix.co.uk added the comment: Just as a post-fix to this, the email handlers for the python logging framework that I maintain as a package on PyPI now handle unicode email correctly: http://pypi.python.org/pypi/mailinglogger/3.7.0 I'd suggest people looking for

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: Please fix the error message to invalid format specifier -- nosy: +Retro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13811 ___

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

2012-01-18 Thread Martin Häcker
Martin Häcker spamfaen...@gmx.de added the comment: @stutzbach: I believe you got me wrong, as the example topic.questions is meant to return a list of questions that need concatenating - thus you can't save the second step. -- ___ Python tracker

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

2012-01-18 Thread Austin Bingham
Changes by Austin Bingham austin.bing...@gmail.com: -- nosy: +abingham ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13807 ___ ___

[issue6531] atexit_callfuncs() crashing within Py_Finalize() when using multiple interpreters.

2012-01-18 Thread Graham Dumpleton
Graham Dumpleton graham.dumple...@gmail.com added the comment: What are the intentions with respect to atexit and sub interpreters? The original report was only about ensuring that the main interpreter doesn't crash if an atexit function was registered in a sub interpreter. So, was not

[issue13703] Hash collision security issue

2012-01-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I like what you've done in #13704 better than what I see in random-8.patch so far.  see the code review comments i've left on both issues. I didn't write 3106cc0a2024.diff patch attached to #13704, I just clicked on the button to

[issue13810] refer people to Doc/Makefile when not using 'make' to build main documentation

2012-01-18 Thread Sandro Tosi
Sandro Tosi sandro.t...@gmail.com added the comment: The outdated command is addressed in issue#12415, and I think it's better to provide a precise command in devguide, so that if you don't use make you don't even need to understand where to grab the information to checkout third-party tools.

[issue13814] Generators as context managers.

2012-01-18 Thread Arkadiusz Wahlig
New submission from Arkadiusz Wahlig arkadiusz.wah...@gmail.com: Generators should support the with statement with __exit__ calling self.close(). with genfunc() as g: for item in g: print(item) -- messages: 151530 nosy: yak priority: normal severity: normal status: open

[issue6531] atexit_callfuncs() crashing within Py_Finalize() when using multiple interpreters.

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: That said, for mod_wsgi I have extended sub interpreter destruction so that atexit callbacks registered in sub interpreters are called. For mod_wsgi though, sub interpreters are only destroyed on process shutdown. For the general case, a sub

[issue13814] Generators as context managers.

2012-01-18 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: If you want to call .close() automatically on something you can use contextlib.closing(): http://docs.python.org/library/contextlib.html#contextlib.closing -- nosy: +ezio.melotti ___ Python

[issue10109] itertools.product with infinite iterator cause MemoryError.

2012-01-18 Thread Sumudu Fernando
Sumudu Fernando sumu...@gmail.com added the comment: I don't agree with the response to this. It is true that as implemented (at least in 2.7, I don't have 3.x handy to check) itertools.product requires finite iterables. However this seems to be simply a consequence of the implementation and

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

2012-01-18 Thread Pedro Andres Aranda Gutierrez
Pedro Andres Aranda Gutierrez paag...@gmail.com added the comment: Thanks a lot again :-) We have a saying here: you'll never go to sleep without having learnt something new :-) On Tue, Jan 17, 2012 at 4:11 PM, patrick vrijlandt rep...@bugs.python.org wrote: patrick vrijlandt

[issue5689] Support xz compression in tarfile module

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset b86b54fcb5c2 by Lars Gustäbel in branch 'default': Issue #5689: Avoid excessive memory usage by using the default lzma preset. http://hg.python.org/cpython/rev/b86b54fcb5c2 --

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

2012-01-18 Thread Colin Watson
New submission from Colin Watson cjwat...@users.sourceforge.net: The file-like object returned by TarFile.extractfile can't be wrapped in an io.TextIOWrapper (which would be rather convenient in some cases to get something that reads str rather than bytes). The attached patch demonstrates the

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2012-01-18 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Revisiting memoryview.size: I foresee problems for NumPy users, since array.size has a different meaning there: x = array([[1,2,3], [4,5,6]], dtype='q') x.shape (2, 3) x.itemsize 8 len(x) 2 x.size 6 x.nbytes 48 So here we have:

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2012-01-18 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: nbytes sounds reasonable to me, given the unfortunate ambiguity of both size and len. As far as #12834 goes, I'm happy to go along with whatever you think is best. You've spent a lot more time down in the guts of the implementation than I

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2012-01-18 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Err, make that #12384 (oops) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2012-01-18 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- Removed message: http://bugs.python.org/msg151539 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___

[issue13803] Under Solaris, distutils doesn't include bitness in the directory name

2012-01-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Final code looks OK to me. -- type: enhancement - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13803 ___

[issue13813] sysconfig.py and distutils/util.py redundancy

2012-01-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I am afraid the distutils feature freeze prevents us from doing this, even in 3.3. Remember that Tarek initially moved sysconfig from distutils to the top level, and the removal was reverted alongside other improvements when there was outcry

[issue13813] sysconfig.py and distutils/util.py redundancy

2012-01-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: s/PEP 371/PEP 370/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13813 ___ ___

[issue11805] package_data only allows one glob per-package

2012-01-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I figured it would let people comment on the syntax I propose more easily if I extracted it from the patch. Here’s the example: package_data = cheese = data/templates/* doc/* doc/images/*.png We have a package name, equals

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Vincent Pelletier
Vincent Pelletier plr.vinc...@gmail.com added the comment: This change causes the following behaviour: import inspect class B(object): ... def f(self): ... pass ... inspect.getmembers(B, inspect.ismethod) [] While I would expect the result to contain f: inspect.ismethod(B.f) True

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Vincent Pelletier
Vincent Pelletier plr.vinc...@gmail.com added the comment: Sorry, I forgot to mention I'm using python2.7 . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1785 ___

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

2012-01-18 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- nosy: +barry ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13815 ___ ___ Python-bugs-list mailing

[issue13695] type specific to type-specific

2012-01-18 Thread Boštjan Mejak
Changes by Boštjan Mejak bostjan.me...@gmail.com: -- nosy: -georg.brandl resolution: remind - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13695 ___

[issue13695] type specific to type-specific

2012-01-18 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: I am closing this issue report and opening another issue report with the two new doc typos that were not reported here before the commit of Ezio Melotti. -- nosy: -docs@python, ezio.melotti, python-dev, rhettinger resolution: -

[issue13816] Two typos in the docs

2012-01-18 Thread Boštjan Mejak
New submission from Boštjan Mejak bostjan.me...@gmail.com: There's a typo in the docs for cmp_to_key() function. Fix the first sentence Transform an old-style comparison function to a key-function. to Transform an old-style comparison function to a key function. (delete the hyphen between

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Thanks for noticing. The doc for ismethod() says: “Return true if the object is a bound method written in Python.” and the docstring agrees with that: “Return true if the object is an instance method. [...]” So the change isn't properly a

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset f824744557ba by Antoine Pitrou in branch '2.7': Revert part of 13f56cd8dec1 (issue #1785) to avoid breaking getmembers() with unbound methods. http://hg.python.org/cpython/rev/f824744557ba --

[issue1785] inspect gets broken by some descriptors

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I've backed out the part of the changeset that fixed getmembers(), so the old behaviour is restored. Other parts of the changeset (that e.g. fixed pydoc) have not been reverted. -- versions: +Python 2.7, Python 3.3

[issue13816] Two typos in the docs

2012-01-18 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Just as a note: It is not acceptable to be rude on the tracker or to remove people from the nosy list as you did in #13695. -- nosy: +skrah ___ Python tracker rep...@bugs.python.org

[issue13816] Two typos in the docs

2012-01-18 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: And not really working, as I get updates for all assignments to docs@python anyway. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816

[issue13816] Two typos in the docs

2012-01-18 Thread Boštjan Mejak
Boštjan Mejak bostjan.me...@gmail.com added the comment: I am deeply and truly sorry. Can we now fix this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816 ___

[issue11805] package_data only allows one glob per-package

2012-01-18 Thread Erik Bray
Erik Bray erik.m.b...@gmail.com added the comment: This patch works for me, and I'm happy with the syntax. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11805 ___

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

2012-01-18 Thread Daniel Stutzbach
Daniel Stutzbach stutzb...@google.com added the comment: Ah - in your first example (the one with 3 lines) did you mean to use .extend instead of .append? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13804

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

2012-01-18 Thread Christoph Glaubitz
New submission from Christoph Glaubitz chris...@chrigl.de: Starting several threads, each just starting a subprocess.Popen and use communicate cause a deadlock in subprocess. (see attached file) I can only reproduce this with python 2.7.2, not with any other versions. 2.6.5, 2.6.7 and 3.2.2

[issue13795] CDATA Element missing

2012-01-18 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Note that there is no need to emit CDATA section: it's just another method to write data, just like in Python \x41 and A are not distinct. The workaround there is a hack, since it redefines an internal method _write(). This function

[issue13816] Two typos in the docs

2012-01-18 Thread Justin Wehnes
Justin Wehnes jweh...@gmail.com added the comment: Removed the hyphen in function keys. Didn't really see a problem with using an apostrophe in 'ith' instead of a hyphen because I have seen it done both ways but changed it anyways. This is my first contribution so i needed the practice. Hope I

[issue13816] Two typos in the docs

2012-01-18 Thread Justin Wehnes
Changes by Justin Wehnes jweh...@gmail.com: Added file: http://bugs.python.org/file24274/i_th_hyphen.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13816 ___

[issue13704] Random number generator in Python core

2012-01-18 Thread Dave Malcolm
Changes by Dave Malcolm dmalc...@redhat.com: -- nosy: +dmalcolm ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13704 ___ ___ Python-bugs-list

[issue10278] add time.wallclock() method

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: There are some issue on the Windows buildbots: == FAIL: test_wallclock (test.test_time.TimeTestCase) --

[issue13703] Hash collision security issue

2012-01-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: Patch version 7: - Make PyOS_URandom() private (renamed to _PyOS_URandom) - os.urandom() releases the GIL for I/O operation for its implementation reading /dev/urandom - move _Py_unicode_hash_secret_t

[issue13703] Hash collision security issue

2012-01-18 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: On Wed, Jan 18, 2012 at 10:59 AM, Marc-Andre Lemburg rep...@bugs.python.org wrote: Marc-Andre Lemburg m...@egenix.com added the comment: STINNER Victor wrote: Patch version 7: - Make PyOS_URandom() private (renamed to

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

2012-01-18 Thread Miguel Godinho
New submission from Miguel Godinho m...@miguelgodinho.com: Adding a 'required optional argument' as with: ``` app.add_argument('--dbsnp', required=True) ``` will still result on having that argument listed under the optional when the app is called with the help option (-h) Please note that

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

2012-01-18 Thread Lars Gustäbel
Changes by Lars Gustäbel l...@gustaebel.de: -- assignee: - lars.gustaebel nosy: +lars.gustaebel ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13815 ___

[issue13819] _warnings settings are process-wide

2012-01-18 Thread Antoine Pitrou
New submission from Antoine Pitrou pit...@free.fr: The settings in the C _warnings module are system-wide instead of being interpreter-wide. It seems the latter would be more desireable (and probably more compatible with the Python warnings module). -- components: Extension Modules,

[issue13763] Potentially hard to understand wording in devguide

2012-01-18 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I read 'program name' as referring to 'Mercurial', not 'hg'. Perhaps Tshepang did also. Read that way, it is not right. Reading it the intended way is not so obvious to one who has never typed 'hg' on a command line. It would be impossible

[issue13819] _warnings settings are process-wide

2012-01-18 Thread Alex Gaynor
Changes by Alex Gaynor alex.gay...@gmail.com: -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13819 ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I like this, esp. if for old releases the collision counting is on by default and the hash seeding is off by default, while in 3.3 both should be on by default. Different env vars or flags should be used to enable/disable them. I would hope

[issue13703] Hash collision security issue

2012-01-18 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: On Wed, Jan 18, 2012 at 1:05 PM, Antoine Pitrou rep...@bugs.python.orgwrote: Antoine Pitrou pit...@free.fr added the comment: I like this, esp. if for old releases the collision counting is on by default and the hash seeding is off by

[issue13703] Hash collision security issue

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Really? I'd expect the difference to be more than 2 nines. The randomized hashing has two problems: (a) change in dict order; (b) hash varies between processes. Personally I don't think the change in dict order is a problem (hashing already

[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-18 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: Looks like you've got commit privs (yay) so i'm assigning this to you to take care of that way for 2.7 as well. I'd add a comment to the fdopen C code where the fdopen constant lives as well as to the gzip.py module around the special case

[issue10278] add time.wallclock() method

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 83e8c3a6a81c by Antoine Pitrou in branch 'default': Be more lenient in test_wallclock (issue #10278). http://hg.python.org/cpython/rev/83e8c3a6a81c -- ___ Python tracker

[issue13722] distributions can disable the encodings package

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 46b245f03f54 by Antoine Pitrou in branch '3.2': Issue #13722: Avoid silencing ImportErrors when initializing the codecs registry. http://hg.python.org/cpython/rev/46b245f03f54 New changeset f55529aa023d by Antoine

[issue13722] distributions can disable the encodings package

2012-01-18 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13722 ___

[issue10278] add time.wallclock() method

2012-01-18 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10278 ___ ___ Python-bugs-list

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread py.user
py.user port...@yandex.ru added the comment: Eric V. Smith wrote: I'm not sure what you're saying here. Is it that 'xx' should be ignored? yes, the description says they are assumed absent -- ___ Python tracker rep...@bugs.python.org

[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a08e9e84f33f by Nadeem Vawda in branch '2.7': Issue #13781: Fix GzipFile to work with os.fdopen()'d file objects. http://hg.python.org/cpython/rev/a08e9e84f33f -- ___

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: The only error is the text of the ValueError. I'll look into fixing that. These characters will not be ignored. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13811

[issue13703] Hash collision security issue

2012-01-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Don't you think that the number of corrections you have to apply in order to get the tests working again shows how much impact such a change would have in real-world applications ? Let see the diffstat: Doc/using/cmdline.rst

[issue10109] itertools.product with infinite iterator cause MemoryError.

2012-01-18 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Proposing an expansion of the definition of product() is a *completely* different issue from the validity of count() as an input. I answered correctly given the current definition of product(): it is not valid input. It is also not valid

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread py.user
py.user port...@yandex.ru added the comment: If the second character of format_spec is not a valid alignment option, then it is assumed that both the fill character and the alignment option are absent. what does it mean ? -- ___ Python tracker

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: py.user: The format string must always match the grammar, which is just above the paragraph that you quoted: [[fill]align][sign][#][0][width][,][.precision][type] Thus, if fill and align are absent, it does not mean that you can

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Changing to 3.3: I don't think applying this to 3.2 would be appropriate. -- assignee: - eric.smith keywords: +easy priority: normal - low stage: - needs patch title: In str.format an incorrect alignment option doesn't make fill char

[issue10109] itertools.product with infinite iterator cause MemoryError.

2012-01-18 Thread Sumudu Fernando
Sumudu Fernando sumu...@gmail.com added the comment: tuple(itertools.cycle(enumerate(it)) for it in itertools.count()) ... TypeError: 'int' object is not iterable That is not what happens in the function, though! That would correspond to doing product(*itertools.count(2010)), but if you

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread py.user
py.user port...@yandex.ru added the comment: Stefan Krah wrote: Thus, if fill and align are absent, it does not mean that you can add arbitrary characters like xx. the descriptions says in other words: if you have used an incorrect alignment option, then the interpreter behaves like you

[issue13781] gzip module does the wrong thing with an os.fdopen()'ed fileobj

2012-01-18 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Done. -- resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13781

[issue13703] Hash collision security issue

2012-01-18 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: A possible advantage of having the 3.3 fix available in earlier versions is that people will be able to turn it on and have that be the *only* change -- just as with __future__ imports done one at a time. --

[issue13703] Hash collision security issue

2012-01-18 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: On Wed, Jan 18, 2012 at 1:10 PM, Guido van Rossum rep...@bugs.python.org wrote: On Wed, Jan 18, 2012 at 1:05 PM, Antoine Pitrou rep...@bugs.python.orgwrote: I would hope 3.3 only gets randomized hashing. Collision counting is a hack to

[issue13703] Hash collision security issue

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: MvL's suggestion of using AVL trees for hash bucket slots instead of our linear slot finding algorithm is a better way to fix the ultimate problem by never devolving into linear behavior at all. A dict can contain non-orderable keys, I don't

[issue13703] Hash collision security issue

2012-01-18 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: A dict can contain non-orderable keys, I don't know how an AVL tree can fit into that. good point! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13703

[issue13703] Hash collision security issue

2012-01-18 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: As much as the counting idea rubs me wrong, FWIW, the original 2003 paper reported that the url-caching system that they tested used collision-counting to evade attacks. -- ___ Python tracker

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The text speaks about the regular case of a second character that is not a valid alignment character, e.g.: format(3.222, .2f) Clearly the '2' fulfills this criterion, so the parser knows that the leading '.' is *not* a fill

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: As I look at it a little closer, I think I'm going to change the message to: Invalid format type specified. The code has determined that instead of a type that's a single character long, it's received xx10d. That's because xx doesn't match

[issue13703] Hash collision security issue

2012-01-18 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: On Wed, Jan 18, 2012 at 3:37 PM, Terry J. Reedy rep...@bugs.python.orgwrote: Terry J. Reedy tjre...@udel.edu added the comment: As much as the counting idea rubs me wrong, FWIW, the original 2003 paper reported that the url-caching

[issue13703] Hash collision security issue

2012-01-18 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: As much as the counting idea rubs me wrong, FWIW, the original 2003 paper reported that the url-caching system that they tested used collision-counting to evade attacks. I think that was DJB's DNS server/cache actually. But deciding to

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread py.user
py.user port...@yandex.ru added the comment: Stefan Krah wrote: After it has been established that [[fill]align] is not present you have to match the *whole string* with the rest of the grammar I think, there should be a text in the documentation: if the alignment optiont is invalid, it

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Eric V. Smith rep...@bugs.python.org wrote: As I look at it a little closer, I think I'm going to change the message to: Invalid format type specified. The code has determined that instead of a type that's a single character long, it's

[issue13813] sysconfig.py and distutils/util.py redundancy

2012-01-18 Thread Jesús Cea Avión
Jesús Cea Avión j...@jcea.es added the comment: Could you possibly provide some background?. I am afraid I am not familiar with the situation. I want to learn :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13813

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Stefan Krah rep...@bugs.python.org wrote: [xx10d] look at the code now, but would the message also be raised for this spec? format(9, xx10f) Argh, 'd' is of course also a valid type specifier. --

[issue13820] 2.6 is no longer in the future

2012-01-18 Thread Jim Jewett
New submission from Jim Jewett jimjjew...@gmail.com: http://docs.python.org/reference/lexical_analysis.html Changed in version 2.5: Both as and with are only recognized when the with_statement future feature has been enabled. It will always be enabled in Python 2.6. See section The with

[issue13703] Hash collision security issue

2012-01-18 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: On Wed, Jan 18, 2012 at 3:46 PM, Antoine Pitrou rep...@bugs.python.orgwrote: Antoine Pitrou pit...@free.fr added the comment: As much as the counting idea rubs me wrong, FWIW, the original 2003 paper reported that the url-caching

[issue13821] misleading return from isidentifier

2012-01-18 Thread Jim Jewett
New submission from Jim Jewett jimjjew...@gmail.com: Python identifiers are in NFKC form; string method .isidentifier() returns true on strings that are not in that form. In some contexts, these non-canonical strings will be replaced with their NFKC equivalent, but in other contexts (such as

[issue13821] misleading return from isidentifier

2012-01-18 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I don't see why that's invalid. str.isidentifier() returning True means Python will accept it as an identifier. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: The existing exceptions use the text format code for what the documentation calls type: format(9, h) Traceback (most recent call last): File stdin, line 1, in module ValueError: Unknown format code 'h' for object of type 'int' So to be

[issue13821] misleading return from isidentifier

2012-01-18 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: My preference would be for non_NFKC.isidentifier() to return False, but that may be a problem for backwards compatibility. It *may* be worth adding an asidentifier() method that returns either False or the canonicalized string that should be

[issue13821] misleading return from isidentifier

2012-01-18 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2012/1/18 Jim Jewett rep...@bugs.python.org: Jim Jewett jimjjew...@gmail.com added the comment: My preference would be for non_NFKC.isidentifier() to return False It *is* an identifier, though. Python will happily accept it. It

[issue13821] misleading return from isidentifier

2012-01-18 Thread Jim Jewett
Jim Jewett jimjjew...@gmail.com added the comment: @Benjamin -- the catch is, if it isn't already in NFKC form, then python won't really accept it as an identifier. Sometimes it will silently canonicalize it for you so that it seems to work, but other times it won't. And program calling

[issue13821] misleading return from isidentifier

2012-01-18 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: 2012/1/18 Jim Jewett rep...@bugs.python.org: Jim Jewett jimjjew...@gmail.com added the comment: @Benjamin -- the catch is, if it isn't already in NFKC form, then python won't really accept it as an identifier.  Sometimes it will

[issue13703] Hash collision security issue

2012-01-18 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: You mean as a fix or that they successfully attacked a collision-counting system? Successful anticipation and blocking of hash attack: after a chain of 100 DNS 'treats the request as a cache miss'. What is somewhat special for this app is

[issue10109] itertools.product with infinite iterator cause MemoryError.

2012-01-18 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: A relatively simple change would be to allow the first iterable to be 'infinite', when repeat==1, by not calling tuple() on it. The reason for turning the iterables into concrete sequences is because they might not be reiterable. (cycle()

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

2012-01-18 Thread Benjamin Peterson
New submission from Benjamin Peterson benja...@python.org: The isupper() and islower() methods currently use the Lowercase and Uppercase derived properties. Technically, they should use the Changes_When_(Lowercased/Uppercased/Titlecased) and Changes_When_Casemapped derived properties to

[issue2134] Add new attribute to TokenInfo to report specific token IDs

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 75baef657770 by Meador Inge in branch '2.7': Issue #2134: Clarify token.OP handling rationale in tokenize documentation. http://hg.python.org/cpython/rev/75baef657770 New changeset dfd74d752b0e by Meador Inge in

[issue2134] Add new attribute to TokenInfo to report specific token IDs

2012-01-18 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Fixed. Thanks for the reviews everyone. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue12705] Make compile('1\n2\n', '', 'single') raise an exception instead of silently truncating?

2012-01-18 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 2bd7f40108b4 by Meador Inge in branch 'default': Issue #12705: Raise SyntaxError when compiling multiple statements as single interactive statement http://hg.python.org/cpython/rev/2bd7f40108b4 -- nosy:

[issue12705] Make compile('1\n2\n', '', 'single') raise an exception instead of silently truncating?

2012-01-18 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: Fixed in 3.3. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12705

[issue7980] time.strptime not thread safe

2012-01-18 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7980 ___ ___ Python-bugs-list

  1   2   >