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

2012-01-17 Thread Nadeem Vawda
Nadeem Vawda added the comment: > As far as fixing this for 2.7 goes, i don't like the _sound_ of it > because it is gross... But i'm actually okay with having special case > code in the gzip module that rejects '' as an actual filename > and uses '' instead in that case. It is VERY unlikely th

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

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7d405058e458 by Nadeem Vawda in branch '3.2': Issue #13781: Fix GzipFile to work with os.fdopen()'d file objects. http://hg.python.org/cpython/rev/7d405058e458 New changeset fe36edf3a341 by Nadeem Vawda in branch 'default': Merge: #13781: Fix GzipF

[issue13703] Hash collision security issue

2012-01-17 Thread Gregory P. Smith
Gregory P. Smith 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. -- nosy: +gregory.p.smith ___ Python tracker

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

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 147ad02875fa by Jesus Cea in branch '3.2': And yet another emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't include bitness in the directory name http://hg.python.org/cpython/rev/147ad02875fa New changeset 582274636446 by

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

2012-01-17 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: A trivial check-in causing a nightmare at 5AM just hours before a day-long offline trip :-). Eric, could you possibly review the committed version?. I can't use "platform.architecture()" because bootstrap issues. For instance: http://www.python.org/dev/buil

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

2012-01-17 Thread Jesús Cea Avión
New submission from Jesús Cea Avión : During development of patch for issue #13803, I found redundancy between "sysconfig.py" and "distutils/util.py". The functions are the same, and the return values must be the same too. So programmers *MUST* remember to change both sources in sync. This re

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

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4074439c3894 by Jesus Cea in branch '2.7': Yet another emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't include bitness in the directory name http://hg.python.org/cpython/rev/4074439c3894 New changeset 37efae3bf912 by Jes

[issue13665] TypeError: string or integer address expected instead of str instance

2012-01-17 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue13665] TypeError: string or integer address expected instead of str instance

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset b4d9243d16c9 by Ezio Melotti in branch '3.2': #13665: s/string/bytes/ in error message. http://hg.python.org/cpython/rev/b4d9243d16c9 New changeset 0c0ffebfccb0 by Ezio Melotti in branch 'default': #13665: merge with 3.2. http://hg.python.org/cpyth

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

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2ec4ab2a6f65 by Jesus Cea in branch '2.7': Emergency fix for #13803 bootstrap issue: Under Solaris, distutils doesn't include bitness in the directory name http://hg.python.org/cpython/rev/2ec4ab2a6f65 New changeset 9d62f5aa35ff by Jesus Cea in br

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

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 284550d0d8ae by Jesus Cea in branch '2.7': Closes #13803: Under Solaris, distutils doesn't include bitness in the directory name http://hg.python.org/cpython/rev/284550d0d8ae New changeset eed73b16e71f by Jesus Cea in branch '3.2': Closes #13803:

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

2012-01-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: thanks that looks good. As far as fixing this for 2.7 goes, i don't like the _sound_ of it because it is gross... But i'm actually okay with having special case code in the gzip module that rejects '' as an actual filename and uses '' instead in that case.

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

2012-01-17 Thread py.user
py.user added the comment: absent fill char and align option: >>> '{0:10d}'.format(1) ' 1' >>> -- ___ Python tracker ___ ___

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

2012-01-17 Thread Jon Brandvein
Jon Brandvein added the comment: (Er, that should be /Lib/multiprocessing/process.py :: Process._bootstrap of course.) -- ___ Python tracker ___ ___

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

2012-01-17 Thread Jon Brandvein
New submission from Jon Brandvein : When a child process exits due to an exception, a traceback is written, but stderr is not flushed. Thus I see a header like "Process 1:\n", but no traceback. I don't have a development environment or any experience with Mecurial, so I'm afraid there's no pa

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

2012-01-17 Thread Eric V. Smith
Eric V. Smith added the comment: What is the expected output, and why? I think the error message might be incorrect, possibly it should be "invalid format specifier". -- nosy: +eric.smith ___ Python tracker

[issue10278] add time.wallclock() method

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1de276420470 by Victor Stinner in branch 'default': Issue #10278: fix a typo in the doc http://hg.python.org/cpython/rev/1de276420470 -- ___ Python tracker __

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

2012-01-17 Thread py.user
Changes by py.user : -- components: +Interpreter Core type: -> behavior versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-

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

2012-01-17 Thread py.user
New submission from py.user : http://docs.python.org/py3k/library/string.html#format-specification-mini-language "The fill character can be any character other than ‘{‘ or ‘}’. The presence of a fill character is signaled by the character following it, which must be one of the alignment option

[issue10278] add time.wallclock() method

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset bb10cd354e49 by Victor Stinner in branch 'default': Close #10278: Add time.wallclock() function, monotonic clock. http://hg.python.org/cpython/rev/bb10cd354e49 -- resolution: -> fixed stage: patch review -> committed/rejected status: open

[issue13763] Potentially hard to understand wording in devguide

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: Adding a native speaker for confirmation. -- nosy: +terry.reedy title: rm obsolete reference in devguide -> Potentially hard to understand wording in devguide ___ Python tracker ___

[issue13763] rm obsolete reference in devguide

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: I really think there is no bug. We don’t have to explain why Mercurial or hg are named so. The current text merely says that “hg”, which is the name of the executable, is commonly used as a short form of “Mercurial”. -- ___

[issue13763] rm obsolete reference in devguide

2012-01-17 Thread Tshepang Lekhonkhobe
Tshepang Lekhonkhobe added the comment: I included both suggestions in the latest patch. -- Added file: http://bugs.python.org/file24269/rm-obsolete-reference2.patch ___ Python tracker

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

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: Thank you both for fixing my incomplete understanding. Meador, unless you want a review from another core dev, I think you can just go ahead. -- ___ Python tracker

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

2012-01-17 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe : this is regarding "documenting.rst": The url for checking out Sphinx from svn has been outdated for a while, so I think it would be better to refer people to Doc/Makefile for the correct urls, instead of having to keep updating this file on each chang

[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Nadeem Vawda
Nadeem Vawda added the comment: Fix committed. For the test, it turns out we can get the desired behavior by telling import_fresh_module to block the threading module directly, instead of blocking _thread. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -

[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2fb93282887a by Nadeem Vawda in branch 'default': Issue #13809: Make bz2 module work with threads disabled. http://hg.python.org/cpython/rev/2fb93282887a -- nosy: +python-dev ___ Python tracker

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

2012-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch for subinterp-wise atexit functions. (I haven't got any specific test for the crash but the patch adds a test and it works) -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file24268/atexitsubinterps.patch

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

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset eb47af6e9e22 by Antoine Pitrou in branch '3.2': Test running of code in a sub-interpreter http://hg.python.org/cpython/rev/eb47af6e9e22 New changeset a108818aaa0d by Antoine Pitrou in branch 'default': Test running of code in a sub-interpreter http

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

2012-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm something else: currently the atexit funcs are only called when the main interpreter exits, but that doesn't really make sense: if I register a function from a sub-interpreter, why would it execute correctly from another interpreter? All kind of fun thing

[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Nadeem Vawda
Nadeem Vawda added the comment: As Georg suggested, it would be better to use dummy_threading.RLock, rather than providing our own implementation. The test in the patch fails when I try to run it on a no-thread build. support.import_fresh_module seems to treat the absence of the threading modul

[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Georg Brandl
Georg Brandl added the comment: Isn't there already a dummy lock in dummy_threading? -- nosy: +georg.brandl ___ Python tracker ___ __

[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue13809] bz2 does not work when threads are disabled

2012-01-17 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc : In bz2.py, "import threading" prevents the bz2 module from working when threads are not enabled. The attached patch removes the limitation and provides a fake lock object. I don't know if this should be backported to 3.2. -- components: Libr

[issue13808] url for Tutor mailing list is broken

2012-01-17 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report! -- assignee: -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement ___ Python tracker _

[issue13808] url for Tutor mailing list is broken

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 471f70b0b6b0 by Ezio Melotti in branch 'default': #13808: fix a link and specify the IRC server. http://hg.python.org/devguide/rev/471f70b0b6b0 -- nosy: +python-dev ___ Python tracker

[issue13808] url for Tutor mailing list is broken

2012-01-17 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe : faq.rst: correct url is http://mail.python.org/mailman/listinfo/tutor -- components: Devguide messages: 151488 nosy: ezio.melotti, tshepang priority: normal severity: normal status: open title: url for Tutor mailing list is broken _

[issue13787] PyCode_New not round-trippable (TypeError)

2012-01-17 Thread Mahmoud Hashemi
Mahmoud Hashemi added the comment: Yes, I knew it was an issue with crossed wires somewhere. The Python 2 code doesn't translate well to Python 3 because the function signature changed to add kwargonlycount. And I guess the argument order is substantially different, too, as described in Objec

[issue13727] Accessor macros for PyDateTime_Delta members

2012-01-17 Thread Amaury Forgeot d'Arc
Changes by Amaury Forgeot d'Arc : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13727] Accessor macros for PyDateTime_Delta members

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 463acb73fd79 by Amaury Forgeot d'Arc in branch 'default': Issue #13727: Add 3 macros to access PyDateTime_Delta members: http://hg.python.org/cpython/rev/463acb73fd79 -- nosy: +python-dev ___ Python trac

[issue5689] Support xz compression in tarfile module

2012-01-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Ping. Windows buildbots are still failing with MemoryError because of this preset=9. The patch looks good to me as well. -- nosy: +amaury.forgeotdarc ___ Python tracker ___

[issue13703] Hash collision security issue

2012-01-17 Thread Jim Jewett
Jim Jewett added the comment: To be more explicit about Martin A. Lemburg's msg151121 (which I agree with): Count the collisions on a single lookup. If they exceed a threshhold, do something different. Martin's strawman proposal was threshhold=1000, and raise. It would be just as easy to sa

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

2012-01-17 Thread Daniel Stutzbach
Daniel Stutzbach added the comment: If I'm understanding Martin Häcker's code correctly, the list comprehension equivalent is: self.questions = [topic.questions for topic in self.topics] The reduce() variants are not only much harder to read, but they will take O(n**2) operations because the

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

2012-01-17 Thread Georg Brandl
Georg Brandl added the comment: Because a class statement is one statement (it is a compound statement, but still just one). The docs don't talk about lines :) A "single interactive statement" is what you can enter at the interactive prompt in one line, or more than one line with only second

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

2012-01-17 Thread Meador Inge
Meador Inge added the comment: On Tue, Jan 17, 2012 at 10:56 AM, Éric Araujo wrote: > I don’t understand why some two-liners are allowed (like "class X:\n pass").   > The doc says “a single interactive statement”. Because a single statement can be multiple lines (as is the case for compound s

[issue13695] "type specific" to "type-specific"

2012-01-17 Thread Georg Brandl
Georg Brandl added the comment: Once you start contributing anything useful, I will start treating it as such. -- ___ Python tracker ___

[issue11240] Running unit tests in a command line tool leads to infinite loop with multiprocessing on Windows

2012-01-17 Thread Chris Jones
Chris Jones added the comment: You can work around this issue by using: python.exe -c "import nose; nose.main()" instead of nosetests Note that nose.main() with no args parses sys.argv -- nosy: +Chris.Jones ___ Python tracker

[issue11805] package_data only allows one glob per-package

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: Note that my proposed syntax does not allow something equivalent to {'': [etc.]} in distutils, i.e. package data for top-level modules. I think this is okay: modules should not install data in their installation dir. I don’t think it was widely used, but maybe

[issue11805] package_data only allows one glob per-package

2012-01-17 Thread Éric Araujo
Changes by Éric Araujo : Added file: http://bugs.python.org/file24266/fix-package_data-multivalue-d2.diff ___ Python tracker ___ ___ Python-bu

[issue11805] package_data only allows one glob per-package

2012-01-17 Thread Éric Araujo
Changes by Éric Araujo : -- keywords: +patch Added file: http://bugs.python.org/file24265/fix-package_data-multivalue-cpy33.diff ___ Python tracker ___ _

[issue11805] package_data only allows one glob per-package

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: Here are patches for CPython and the d2 repo. There is no doc update as the setupscript page still talks about setup.py and the setupcfg spec does not mention package_data at all (the negationists resources-promoters at work :), so this can wait for my big doc

[issue13787] PyCode_New not round-trippable (TypeError)

2012-01-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: co_freevars and co_cellvars are the last arguments of the function. Your "co_what2.py" version of the script is correct, but "co_what.py" has a different order. -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed __

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

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: I don’t understand why some two-liners are allowed (like "class X:\n pass"). The doc says “a single interactive statement”. -- ___ Python tracker __

[issue13703] Hash collision security issue

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: >> #13712 contains a patch for test_packaging. > It doesn't look related to randomized hash function. Trust me. (If you read the whole report you’ll see why it looks unrelated: instead of sorting things like your patch does mine addresses a more serious behavior

[issue13806] Audioop decompression frames size check fix

2012-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, you should just replace these calls with audioop_check_size() instead. Apparently the checks were blindly added in issue7673. By the way, I'm surprised audioop accepts unicode strings... :/ -- nosy: +haypo, pitrou versions: +Python 2.7

[issue13703] Hash collision security issue

2012-01-17 Thread STINNER Victor
STINNER Victor added the comment: > #13712 contains a patch for test_packaging. It doesn't look related to randomized hash function. random-8.patch contains a fix to test_packaging. -- ___ Python tracker

[issue12415] Missing: How to checkout the Doc sources

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: > I think "documentation sources" is a bit vague. I don’t know. I probably wrote it under the assumption that the audience of this doc was developers, who already know that programmers don’t write HTML manually but generate it, and just need to know where to fin

[issue6727] ImportError when package is symlinked on Windows

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: (3.1 doesn’t get non-security bug fixes either) -- versions: -Python 3.1 ___ Python tracker ___ ___ Py

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

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: OK. from distutils.spawn import spawn from distutils import log from distutils.errors import DistutilsByteCompileError +import platform Please put that import higher up (with the other “import X”, before the “from X import Y”). +machine += ".%s"

[issue13703] Hash collision security issue

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: #13712 contains a patch for test_packaging. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue13681] Aifc read compressed frames fix

2012-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- dependencies: +Audioop decompression frames size check fix ___ Python tracker ___ ___ Python-bugs-list

[issue13794] Copyright Year - Change it to 2012 please

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: Websites that Python devs can work on are updated, now the request should go to the pydotorg mailing list or webmaster email address. -- nosy: +eric.araujo resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed

[issue13589] Aifc low level serialization primitives fix

2012-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've finally committed the patch, thank you! -- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7 ___ Python tracker ___

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

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: I think this discussion would be more useful on the python-ideas mailing list. The request (adding map to sequences) will probably be rejected*, but you have a good chance to get an explanation for this design choice by Guido van Rossum or one of the old-timer

[issue13589] Aifc low level serialization primitives fix

2012-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset f715c4a5a107 by Antoine Pitrou in branch '3.2': Issue #13589: Fix some serialization primitives in the aifc module. http://hg.python.org/cpython/rev/f715c4a5a107 New changeset b039965b0066 by Antoine Pitrou in branch 'default': Issue #13589: Fix so

[issue13691] pydoc help (or help('help')) should show the doc for help

2012-01-17 Thread Éric Araujo
Changes by Éric Araujo : -- title: pydoc help (or help('help')) claims to run a help utility; does nothing -> pydoc help (or help('help')) should show the doc for help ___ Python tracker __

[issue13691] pydoc help (or help('help')) claims to run a help utility; does nothing

2012-01-17 Thread Éric Araujo
Éric Araujo added the comment: Just a heads-up: I’ll be offline between January 19 and the end of the month, so don’t worry if you make a patch and it’s not reviewed immediately (at least not by me, other developers may do it :) -- ___ Python track

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

2012-01-17 Thread Thomas Ryschawy
Changes by Thomas Ryschawy : Added file: http://bugs.python.org/file24264/traceback.txt ___ Python tracker ___ ___ Python-bugs-list mailing li

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

2012-01-17 Thread Thomas Ryschawy
Changes by Thomas Ryschawy : Removed file: http://bugs.python.org/file24263/traceback.txt ___ Python tracker ___ ___ Python-bugs-list mailing

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

2012-01-17 Thread Thomas Ryschawy
New submission from Thomas Ryschawy : It seems to be known that in case of a Windows GUI app that isn’t connected to a console sys.stderr can be None. See the Note on http://docs.python.org/py3k/library/sys.html: Under some conditions stdin, stdout and stderr as well as the original values __s

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

2012-01-17 Thread Meador Inge
Meador Inge added the comment: The attached patch fixes this be checking what is left in the input buffer after parsing. Anything but trailing whitespace and comments triggers the exception. Ignoring trailing whitespace and comments makes sense, but it is also somewhat required. Trailing com

[issue13681] Aifc read compressed frames fix

2012-01-17 Thread Oleg Plakhotnyuk
Oleg Plakhotnyuk added the comment: Ok, I have opened issue 13806 with audioop fix alone. However, I cannot change current issue's dependencies to reflect that current issue depends on issue 13806. Could anyone do this for me please? -- Added file: http://bugs.python.org/file24261/aif

[issue13806] Audioop decompression frames size check fix

2012-01-17 Thread Oleg Plakhotnyuk
New submission from Oleg Plakhotnyuk : According to documentation (http://docs.python.org/library/audioop.html), adpcm2lin, alaw2lin and ulaw2lin are using 'width' argument to represent output frames width. However, in audioop.c module there are checks that are raising exceptions if input fram

[issue13681] Aifc read compressed frames fix

2012-01-17 Thread Oleg Plakhotnyuk
Changes by Oleg Plakhotnyuk : Removed file: http://bugs.python.org/file24112/aifc_compression.patch ___ Python tracker ___ ___ Python-bugs-lis

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

2012-01-17 Thread patrick vrijlandt
patrick vrijlandt added the comment: Hi, Did you look at lxml (http://lxml.de)? from lxml.builder import E from lxml import etree tree = etree.ElementTree( E.Hello( "Good morning!", E.World("How do you do", humour = "excellent"), "Fine", E.Goodbye(),

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

2012-01-17 Thread Martin Häcker
Martin Häcker added the comment: Yes - however it has the same problem as the higher order version in the python libraries that to read it you need to constantly jump back and forth in the line. -- ___ Python tracker

[issue13695] "type specific" to "type-specific"

2012-01-17 Thread Boštjan Mejak
Boštjan Mejak added the comment: Well, actually, it's the only correct way to write it (i-th). This is a simple orthographical error that was made. Ezio, please fix those two additional typos. And Georg, stop being such a wise-ass. -- ___ Python tr

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

2012-01-17 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Proposed patch for Python 2.7: """ --- util.py.old 2011-12-12 01:34:04.412234183 +0100 +++ util.py 2012-01-17 15:15:23.262257886 +0100 @@ -12,6 +12,7 @@ from distutils.spawn import spawn from distutils import log from distutils.errors import DistutilsBy

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

2012-01-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Did you consider list comprehension? self.questions = sum((topic.questions for topic in self.topics), []) -- nosy: +amaury.forgeotdarc ___ Python tracker __

[issue13589] Aifc low level serialization primitives fix

2012-01-17 Thread Oleg Plakhotnyuk
Oleg Plakhotnyuk added the comment: I have absolutely no idea :-) I just covered every line of code with tests. Some bugs prevented me from do it, so I fixed them. -- ___ Python tracker __

[issue12600] Add example of using load_tests to parameterise Test Cases

2012-01-17 Thread Nick Coghlan
Nick Coghlan added the comment: I agree with David, so switching this over to a docs enhancement request. -- assignee: -> docs@python components: +Documentation nosy: +docs@python title: Support parameterized TestCases in unittest -> Add example of using load_tests to parameterise Tes

[issue13411] Hashable memoryviews

2012-01-17 Thread Stefan Krah
Stefan Krah added the comment: Reopening as a reminder that it isn't fixed yet in http://hg.python.org/features/pep-3118 . -- ___ Python tracker ___ ___

[issue13411] Hashable memoryviews

2012-01-17 Thread Stefan Krah
Changes by Stefan Krah : -- dependencies: +Problems with Py_buffer management in memoryobject.c (and elsewhere?) resolution: fixed -> remind status: closed -> open ___ Python tracker __

[issue12600] Support parameterized TestCases in unittest

2012-01-17 Thread R. David Murray
R. David Murray added the comment: I'd still like to see a recipe for creating parameterized test cases via load_tests added to the docs. It may be relatively obvious how to do it once you think of it, but it isn't obvious to a relative newcomer that you *can* do it, and it would make a grea

[issue13703] Hash collision security issue

2012-01-17 Thread STINNER Victor
STINNER Victor added the comment: Hum, test_runpy fails something with a segfault and/or a recursion limit because of my hack to rerun regrtest.py to set PYTHONHASHSEED environment variable. The fork should be defined if main() of regrtest.py is called directly. Example: diff --git a/Lib/test/r

[issue13703] Hash collision security issue

2012-01-17 Thread STINNER Victor
STINNER Victor added the comment: Patch version 8: the whole test suite now pass successfully. The remaining question is if CryptoGen should be used instead of the weak LCG initialized by gettimeofday() and getpid(). According to Martin von Loewis, we must link statically Python to advapi32.dll

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

2012-01-17 Thread Stefan Krah
Stefan Krah added the comment: Thanks for the comments. Most of them should be easy to fix. Nick Coghlan wrote: > [...] expose the Py_buffer len field as "memoryview.size" instead of > "memoryview.len" (to reduce confusion with "len(memoryview)" and > to encourage a conceptual link with sys.ge

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

2012-01-17 Thread Nadeem Vawda
Nadeem Vawda added the comment: Attached is a fix for 3.x. -- keywords: +patch Added file: http://bugs.python.org/file24258/gzip-fdopen.diff ___ Python tracker ___ _

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

2012-01-17 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Thanks Nick. Looking through this discussion it looks as though you encountered all the confusing bits that I ran into (dup_buffer, ownership issues, reference counting and so forth.) Good work. -- ___ Pyt

[issue12600] Support parameterized TestCases in unittest

2012-01-17 Thread Nick Coghlan
Nick Coghlan added the comment: Back on topic... While I can see the advantage of parameterisation at the level of individual tests, I'm not at all clear on the benefits at the TestCase level. For CPython's own test suite, if we want to share tests amongst multiple test cases, we just use or

[issue12600] Support parameterized TestCases in unittest

2012-01-17 Thread Nick Coghlan
Nick Coghlan added the comment: Mark, please stop discussing per-run parameters in this issue. Those are NOT the kind of parameters we're talking about (and are easily handled via a global settings module, anyway, the exact same way you can handle process global settings for *any* kind of app

[issue13805] [].sort() should return self

2012-01-17 Thread Ezio Melotti
Ezio Melotti added the comment: See also http://docs.python.org/faq/design.html#why-doesn-t-list-sort-return-the-sorted-list -- ___ Python tracker ___ _

[issue13805] [].sort() should return self

2012-01-17 Thread Ezio Melotti
Ezio Melotti added the comment: This is by design. Methods that mutate the object return None. Methods that create a new object return the new object. list.sort sorts the list in place, so it returns None. -- nosy: +ezio.melotti resolution: -> rejected stage: -> committed/rejected sta

[issue13805] [].sort() should return self

2012-01-17 Thread Martin Häcker
Martin Häcker added the comment: It really should return self. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue13805] [].sort() should return self

2012-01-17 Thread Martin Häcker
New submission from Martin Häcker : [].sort() returns None which means you can't chain it. So for example someDict.keys().sort()[0] doesn't work but you have to use sorted(someDict.keys())[0] instead which is harder to read as you have to read the line not from the beginning to the end but jum

[issue13792] The "os.execl" call doesn't give programs exit code

2012-01-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: No. On Windows the only way to start a new executable is to create a new process (with the CreateProcess function, which all spawn* and exec* functions ultimately call), and this yields a new PID. This is a fundamental difference with unix, where the onl

[issue13799] Base 16 should be hexadecimal in Unicode HOWTO

2012-01-17 Thread Ezio Melotti
Ezio Melotti added the comment: Do you mean the "base 16" in this sentence: "A code point is an integer value, usually denoted in base 16."? Why would "hexadecimal" be better than "base 16"? -- assignee: docs@python -> ezio.melotti nosy: +ezio.melotti versions: -Python 2.6, Python 3.1

[issue12415] Missing: How to checkout the Doc sources

2012-01-17 Thread Ezio Melotti
Ezio Melotti added the comment: +The documentation sources are part of the main :ref:`CPython Mercurial +repository `. I think "documentation sources" is a bit vague. If the goal is enable people to find those files, IMHO it would be better to state explicitly that there are bunch of rst fil

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

2012-01-17 Thread Martin Häcker
New submission from Martin Häcker : Code that uses higher order methods is often the clearest description of what you want to do. However since the higher order methods in python (filter, map, reduce) are free functions and aren't available on collection classes as methods, using them creates

[issue8285] IDLE not smart indenting correctly in nested statements

2012-01-17 Thread Tal Einat
Changes by Tal Einat : -- nosy: -taleinat ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

  1   2   >