[issue13840] create_string_buffer rejects str init_or_size parameter

2012-01-22 Thread Georg Brandl
Georg Brandl added the comment: It should only take bytes; "str" is Unicode in 3.x. So the docs and the error message are wrong, the behavior is correct. Reclassifying as a docs issue. -- assignee: -> docs@python components: +Documentation -ctypes nosy: +docs@python, georg.brandl _

[issue13840] create_string_buffer rejects str init_or_size parameter

2012-01-22 Thread Vincent Pelletier
New submission from Vincent Pelletier : ctypes.create_string_buffer documentation[1] says init_or_size parameter should accept a string. As of 3.2, it raises: >>> import ctypes >>> ctypes.create_string_buffer('foo') Traceback (most recent call last): File "", line 1, in File "/usr/lib/pytho

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

2012-01-22 Thread Jon Brandvein
Jon Brandvein added the comment: It turns out the file output was flushing due to garbage collection. When I created and held a global reference to it, it ceased to flush. Clearly, reassigning sys.stdout also held a reference to it. So it wasn't any kind of special sys.stdout-specific logic.

[issue13703] Hash collision security issue

2012-01-22 Thread Dave Malcolm
Dave Malcolm added the comment: I arbitrarily started with 50, and then decided a power of two would be quicker when multiplying. There wasn't any rigorous analysis behind the choice of factor. Though, as noted in msg151796, I've gone off this idea, since I think the "protection" creates addit

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

2012-01-22 Thread Jon Brandvein
Jon Brandvein added the comment: Some more information: When I write to a new file created by open(), all versions flush correctly. However, if I reassign sys.stdout to that file, Python 3.x does not (again, under Windows). I wonder what it is that causes these other files to flush. (Note: I

[issue13703] Hash collision security issue

2012-01-22 Thread Dave Malcolm
Dave Malcolm added the comment: On Sat, 2012-01-21 at 23:47 +, Alex Gaynor wrote: > Alex Gaynor added the comment: > > On Sat, Jan 21, 2012 at 5:42 PM, Gregory P. Smith > wrote: > > > > > Gregory P. Smith added the comment: > > > > On Sat, Jan 21, 2012 at 2:45 PM, Antoine Pitrou > > wr

[issue12684] profile does not dump stats on exception like cProfile does

2012-01-22 Thread Matt Joiner
Changes by Matt Joiner : -- resolution: works for me -> status: languishing -> open versions: +Python 3.4 ___ Python tracker ___ ___

[issue13839] -m pstats should combine all the profiles given as arguments

2012-01-22 Thread Matt Joiner
New submission from Matt Joiner : Frequently when profiling multiple threads, I need to combine several dump stat files. Currently -m pstats reads the profiling data at only the first path given. It should merge all the profiling data from all the paths given. $ python3.3 -m pstats prof/5506-7

[issue13703] Hash collision security issue

2012-01-22 Thread STINNER Victor
STINNER Victor added the comment: @dmalcolm: How did you chose Py_MAX_AVERAGE_PROBES_PER_INSERT=32? Did you try your patch on applications like the test suite of Django or Twisted? -- ___ Python tracker _

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread py.user
py.user added the comment: my question is about the "#" option it is described as working with Decimal but it doesn't work with Decimal -- ___ Python tracker ___ ___

[issue7098] g formatting for decimal types should always strip trailing zeros.

2012-01-22 Thread py.user
Changes by py.user : -- nosy: +py.user ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/ma

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +mark.dickinson -mark ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

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

2012-01-22 Thread Jon Brandvein
Jon Brandvein added the comment: I've been looking over this package some more, and in particular, /Lib/multiprocessing/forking.py. There's plenty I don't understand, and I do have questions, if you would be willing to indulge me. I see that both the unix and windows codepaths define an "exit

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread Eric V. Smith
Eric V. Smith added the comment: See issue #7098 for a discussion. I propose to close this issue. -- nosy: +eric.smith, mark, skrah ___ Python tracker ___ _

[issue13838] In str.format "{0:#.5g}" for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread py.user
New submission from py.user : http://docs.python.org/py3k/library/string.html#format-specification-mini-language The '#' option: "For floats, complex and Decimal the alternate form causes the result of the conversion to always contain a decimal-point character, even if no digits follow it. Nor

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

2012-01-22 Thread Georg Brandl
Georg Brandl added the comment: Fixed, thanks! -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

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

2012-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 960d93deb8c2 by Georg Brandl in branch '3.2': Fix #13834: strip() strips leading and trailing whitespace. http://hg.python.org/cpython/rev/960d93deb8c2 -- nosy: +python-dev ___ Python tracker

[issue13816] Two typos in the docs

2012-01-22 Thread Georg Brandl
Georg Brandl added the comment: Sorry, but the patch introduces two markup errors: - *i*th is invalid reST, it needs to be *i*\ th - you broke the table markup (the vertical lines must be aligned) -- ___ Python tracker

[issue13816] Two typos in the docs

2012-01-22 Thread Boštjan Mejak
Boštjan Mejak added the comment: I fixed Justin's patch. Anyone cares to incorporate it? -- Added file: http://bugs.python.org/file24293/fixed patch final.diff ___ Python tracker __

[issue13520] Patch to make pickle aware of __qualname__

2012-01-22 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue13772] listdir() doesn't work with non-trivial symlinks

2012-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Another issue with the detection scheme is that it's not atomic: there can be a race condition between the GetFileAttributesExW() and CreateSymbolicLinkW() calls. I propose applying the following patch to 3.2 and 3.3 (+ doc fix, not included in the patch).

[issue13837] test_shutil fails with symlinks enabled under Windows

2012-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: (tests were added in #12715 and #9993) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue13837] test_shutil fails with symlinks enabled under Windows

2012-01-22 Thread Antoine Pitrou
New submission from Antoine Pitrou : This happens when symlinks are enabled under Windows. This doesn't affect any buildbots since they don't run the tests as administrator (or they are not recent enough to have symlink support): ===

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

2012-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le dimanche 22 janvier 2012 à 17:58 +, Jon Brandvein a écrit : > Jon Brandvein added the comment: > > On Windows, the problem appears under Python 3.2.2 and 3.1.3, but not > under 2.7.1. On Linux, I have not reproduced the problem on versions > 2.6.3, 2.7.

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

2012-01-22 Thread Jon Brandvein
Jon Brandvein added the comment: On Windows, the problem appears under Python 3.2.2 and 3.1.3, but not under 2.7.1. On Linux, I have not reproduced the problem on versions 2.6.3, 2.7.2, 3.1.1, or 3.2.2. So to summarize: - It seems there should be a stderr flush call on the line I indicated

[issue9625] argparse: Problem with defaults for variable nargs

2012-01-22 Thread Michał Michalski
Michał Michalski added the comment: Maybe it will sound strange, but what is this task REALLY about? I mean - I can see two problems here, but no clear information about which problem is a real problem and - if it is - what is the expected behavior. Problems I can see are: 1) Type of returned

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

2012-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But I observe that unless I explicitly flush stdout and stderr before > terminating, the output is lost entirely, even if the exit is not > abnormal. This isn't the desired behavior, is it? Indeed that's a bit surprising. Which Python version are you using?

[issue6792] Distutils-based installer does not detect 64bit versions of Python

2012-01-22 Thread vr gamer
vr gamer added the comment: I'm not certain that I agree with the argument used to justify keeping this as a 'normal' priority issue. Apparently, since it doesn't effect the entire python community and being as there is no readily available solution, the decision is to treat it as a minor pro

[issue13814] Document why generators don't support the context management protocol

2012-01-22 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-22 Thread Ezio Melotti
Ezio Melotti added the comment: Éric is without Internet till the end of the month, so I think it's OK if you go ahead and start working on this. -- ___ Python tracker ___ _

[issue6727] ImportError when package is symlinked on Windows

2012-01-22 Thread Jason R. Coombs
Jason R. Coombs added the comment: After hearing back from Microsoft support (and by proxy, the Visual Studio development team), it is clear that this issue is very low priority for them (they see it as having trivial business impact), so we cannot expect it to be fixed in the upstream librar

[issue13816] Two typos in the docs

2012-01-22 Thread Terry J. Reedy
Terry J. Reedy added the comment: Justin, if you do a new patch, put both changes in one .diff. -- ___ Python tracker ___ ___ Python-

[issue4966] Improving Lib Doc Sequence Types Section

2012-01-22 Thread Nick Coghlan
Nick Coghlan added the comment: Éric, are you still planning to work on this? Otherwise I'll make a first pass at doing the split into 3 sections (as per my earlier comment) and implementing some of Terry's suggestions. Linked Hg repo is a 2.7 based feature branch where I'll be publishing my

[issue13829] exception error

2012-01-22 Thread Dan kamp
Dan kamp added the comment: I have received this from the macpython listserv it that helps. Would really like to find this issue. >From the traceback, it appears that there is a problem with Python's _scproxy module; that's an internal helper C module that provides an interface to the OS X Sys

[issue13609] Add "os.get_terminal_size()" function

2012-01-22 Thread Charles-François Natali
Charles-François Natali added the comment: > As a Python user (and not a committer), I disagree. > > As an user, I don't care too much where the function should be placed > (although I believe os or sys are sensible choices). What I do care is > that I want a extremely simple function that will

[issue13836] Define key failed

2012-01-22 Thread olivier
New submission from olivier : Hi, I tried to define new key in python idle and then python 2.5.1 failed to launch. What I did : I defined a new key, applied and changed my mind, removed my key set named 'ole'. I launched cmd C:\Python25\Lib\idlelib>..\..\python idle.py got dozens of messag

[issue13703] Hash collision security issue

2012-01-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24198/random-5.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24253/random-7.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13703] Hash collision security issue

2012-01-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24254/random-fix_tests.patch ___ Python tracker ___ ___ Python-bugs-list

[issue13703] Hash collision security issue

2012-01-22 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file24222/random-6.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13835] whatsnew/3.3 misspelling/mislink

2012-01-22 Thread Sandro Tosi
Sandro Tosi added the comment: Thanks July, I've just committed your patches! -- nosy: +sandro.tosi resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue13835] whatsnew/3.3 misspelling/mislink

2012-01-22 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8a38bbf92048 by Sandro Tosi in branch 'default': Issue #13835: fixes to What's new 3.3; patch by July Tikhonov http://hg.python.org/cpython/rev/8a38bbf92048 -- nosy: +python-dev ___ Python tracker

[issue13816] Two typos in the docs

2012-01-22 Thread Boštjan Mejak
Boštjan Mejak added the comment: Yeah, I guess I was kind of rude. Sorry about that. I think my proposal is acceptable. What do you think? -- ___ Python tracker ___

[issue13816] Two typos in the docs

2012-01-22 Thread Stefan Krah
Stefan Krah added the comment: > This is the last decision. Also, if anyone of you can, please then just > > incorporate that final patch that Justin will make. Thanks. Stop acting like a manager. A while ago a person had his account disabled for constantly bumping up issues and telling other

[issue13816] Two typos in the docs

2012-01-22 Thread Boštjan Mejak
Boštjan Mejak added the comment: Terry, I agree with you on having *i*th instead of *i*-th. The fact that "i" is written in italics eliminates the need of a hyphen. Justin, can I ask you to make a new patch which fixes "key-function" to "key function" and *i*'th to *i*th This is the last dec

[issue13835] whatsnew/3.3 misspelling/mislink

2012-01-22 Thread July Tikhonov
New submission from July Tikhonov : 1) Paragraph describing range() comparison links to issue13021. This issue seems unrelated. It should be issue13201. 2) Paragraph describing of unicode_internal codec, mentions "(utf-16-le or utf-16-le)" and "(utf-32-le or utf-32-le)". It should be "(utf-16-le

[issue457066] pow(a,b,c) should accept b<0

2012-01-22 Thread Thomas Dybdahl Ahle
Thomas Dybdahl Ahle added the comment: For anyone who finds this through google, if you are finding the inverse mod a prime, you can use fermats little theorem: pow(a, -1, mod) = pow(a, a-2, mod). (You also need that mod doesn't divide a). -- nosy: +Thomas.Dybdahl.Ahle ___