[issue7417] open builtin has no signature in docstring

2009-12-01 Thread flox
flox added the comment: According to PEP257: «Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description.» Maybe this second patch is more conventional? -- Added file: http://bugs.python.org/file154

[issue7422] Document inspect.get(full)argspec limitation to Python function

2009-12-01 Thread Brett Cannon
Brett Cannon added the comment: That's basically what I said. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7424] segmentation fault in listextend during install

2009-12-01 Thread Jon Buller
New submission from Jon Buller : On a NetBSD/sparc-current system building from the 2.6.4.tgz file... Compiling /usr/pkg/lib/python2.6/test/test_bool.py ... Compiling /usr/pkg/lib/python2.6/test/test_bsddb.py ... Compiling /usr/pkg/lib/python2.6/test/test_bsddb185.py ... Compiling /usr/pkg/lib/p

[issue7327] format: minimum width: UTF-8 separators and decimal points

2009-12-01 Thread Eric Smith
Eric Smith added the comment: I can duplicate this on Linux. The difference is the values in the locale for the separators, specifically, locale.localeconv()['thousands_sep']. >>> locale.localeconv()['thousands_sep'] '\xc2\xa0' The question is: since a struct lconv contains char*s, how to inte

[issue7422] Document inspect.get(full)argspec limitation to Python function

2009-12-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: Sorry, you confuse me a bit. get(full)argspec also does not work with builtins. I am asking that the doc be clarified to match behavior so that people are not surprised by TypeError: arg is not a Python function as in written in Python versus C. -- ___

[issue7423] nested generator expression produces strange results

2009-12-01 Thread R. David Murray
R. David Murray added the comment: I'd already written then when Benjamin posted his answer, but rather than waste having written it I'm going to post it anyway :) You must remember that the purpose of a generator is to evaluate lazily. Your expression involving the generator would unwrap this

[issue7423] nested generator expression produces strange results

2009-12-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: By using a generator expression, you are deferring evaluation of the expression until map() is actually invoked. By that time, the closure over 'x' has been changed to 'b', so when the genexp is forced, 'x' yields 'b' each time. -- nosy: +benjamin.pe

[issue7423] nested generator expression produces strange results

2009-12-01 Thread bogklug
New submission from bogklug : The first of the two maps below gives strange result due to the nested generator expression (I guess it should give the same result as the second map). In [1]: map(list, [(x+y for y in 'c') for x in 'ab']) Out[1]: [['bc'], ['bc']] In [2]: map(list, [[x+y for y in '

[issue7422] Document inspect.get(full)argspec limitation to Python function

2009-12-01 Thread Brett Cannon
Brett Cannon added the comment: Just in case anyone else gets confused, Terry's desire for the clarification is that getargspec() won't work with functions originating from an extension module. -- nosy: +brett.cannon ___ Python tracker

[issue7327] format: minimum width: UTF-8 separators and decimal points

2009-12-01 Thread R. David Murray
R. David Murray added the comment: Interesting. My regular locale is LC_CTYPE=en_US.UTF-8, and here is what I get: Python 2.7a0 (trunk:76501, Nov 24 2009, 13:59:01) [GCC 4.4.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import local >>> import locale

[issue7327] format: minimum width: UTF-8 separators and decimal points

2009-12-01 Thread Eric Smith
Eric Smith added the comment: In 2.7, I get: $ ./python.exe Python 2.7a0 (trunk:76501, Nov 24 2009, 14:57:21) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_NUMERIC, "cs_CZ.U

[issue7420] turtle - turtle.update() doesn't override turtle.tracer()

2009-12-01 Thread R. David Murray
R. David Murray added the comment: I see a line when I try this on 3.1 and trunk. There were some updates, so I suppose this has been fixed. 3.0 has been replaced by 3.1 and is no longer maintained. -- nosy: +gregorlingl, r.david.murray priority: -> normal resolution: -> out of date

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread flox
flox added the comment: Indentation is not easy on this part. The list of arguments overflow the 79 chars limit. With the proposed patch, the generated output is something like: open(file, mode='r', buffering=None, encoding=None, errors=None, newline=None, closefd=True) -> file obje

[issue7327] format: minimum width: UTF-8 separators and decimal points

2009-12-01 Thread R. David Murray
R. David Murray added the comment: In python3: >>> locale.setlocale(locale.LC_NUMERIC, "cs_CZ.UTF-8") 'cs_CZ.UTF-8' >>> s = format(Decimal("-1.5"), ' 019.18n') >>> len(s) 20 >>> print(s) -0 000 000 000 001,5 Python3 uses unicode for strings. Python2 uses bytes. To format unicode in python2,

[issue7413] datetime.datetime.isoformat truncation problem

2009-12-01 Thread Eric Smith
Eric Smith added the comment: I think you need to put an assert before the line with bufflen-x, since that's the calculation you're trying to ensure doesn't underflow. And I guess that technically you should inspect the result of PyOS_snprintf for an error, but given that we know the buffer size

[issue7413] datetime.datetime.isoformat truncation problem

2009-12-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Here is a new patch against a fresh trunk, and with the suggested changes: they indeed make the code more consistent with other parts. -- keywords: +needs review Added file: http://bugs.python.org/file15433/isoformat-2.patch

[issue7419] Crash in _locale.setlocale on windows

2009-12-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Fixed with r76625 (trunk), r76626 (py3k) and r76627 (relase31-maint) -- resolution: -> fixed status: open -> closed ___ Python tracker __

[issue4482] 10e667.__format__('+') should return 'inf'

2009-12-01 Thread Mark Dickinson
Mark Dickinson added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue7422] Document inspect.get(full)argspec limitation to Python function

2009-12-01 Thread Terry J. Reedy
New submission from Terry J. Reedy : "inspect.getargspec(func) Get the names and default values of a function’s arguments. " "inspect.getfullargspec(func) Get the names and default values of a function’s arguments." 'Function' must be a Python function (or a bound method wrapper thereof). (Som

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread Georg Brandl
Georg Brandl added the comment: Make that "modulo." -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread Georg Brandl
Georg Brandl added the comment: Looks good to me (module indentation). -- assignee: -> pitrou nosy: +georg.brandl, pitrou ___ Python tracker ___

[issue4482] 10e667.__format__('+') should return 'inf'

2009-12-01 Thread Eric Smith
Eric Smith added the comment: This version adds format() testing and fixes the comments (I hope). -- Added file: http://bugs.python.org/file15432/issue4482_tests-2.patch ___ Python tracker _

[issue4482] 10e667.__format__('+') should return 'inf'

2009-12-01 Thread Mark Dickinson
Mark Dickinson added the comment: Looks good to me, except that the second comment in the patch doesn't make a lot of sense any more. -- ___ Python tracker ___ _

[issue4482] 10e667.__format__('+') should return 'inf'

2009-12-01 Thread Eric Smith
Eric Smith added the comment: This patch has tests that currently pass on trunk. I think this is the desired behavior. I need to augment the tests for format() testing. -- Added file: http://bugs.python.org/file15431/issue4482_tests-1.patch ___ Pytho

[issue5027] xml namespace not understood by xml.sax.saxutils.XMLGenerator

2009-12-01 Thread Troy J. Farrell
Troy J. Farrell added the comment: I've duplicated the issue and the fix using Python 2.6.2. I'm attaching Soren Roug's fix in patch form. (I created the patch against r53754 of saxutils.py.) -- keywords: +patch nosy: +troy versions: +Python 2.6 Added file: http://bugs.python.org/fi

[issue7421] Given

2009-12-01 Thread Eric Smith
Eric Smith added the comment: If you have a question to ask, this is not the proper forum. Please see python-list http://mail.python.org/mailman/listinfo/python-list -- nosy: +eric.smith resolution: -> invalid status: open -> closed ___ Python track

[issue7421] Given

2009-12-01 Thread Angel
New submission from Angel : # Area calculation program print "Show Area" print "--" print # Print out the menu: print "Please select a shape:" print "1 Rectangle" print "2 Circle" # Get the user's choice: shape = input ("> ") # Calculate the area: if shape == 1:

[issue4057] Popen(..., cwd=...) does not set PWD environment variable

2009-12-01 Thread R. David Murray
R. David Murray added the comment: I agree that this is not something that Popen should be doing. If you need the environment variable set, the correct thing to do is what you did: set it in the environment you pass to Popen. -- nosy: +r.david.murray priority: -> normal resolution: -

[issue6974] test_posix getcwd test leaves tmp dir

2009-12-01 Thread R. David Murray
R. David Murray added the comment: This was fixed in response to another bug report a few months ago. -- nosy: +r.david.murray resolution: -> out of date status: open -> closed ___ Python tracker _

[issue7420] turtle - turtle.update() doesn't override turtle.tracer()

2009-12-01 Thread "Dragon" Dave McKee
New submission from "Dragon" Dave McKee : Problem: Using the following code gives different behaviour on versions 2.6.4 and 3.0.1: nothing will be drawn under 3.0.1, but turtle.update() will force the line to be drawn under 2.6.4. 2.6.4's behaviour is compatible with the documentation: "turtle.up

[issue7418] hashlib : the names of the different hash algorithms

2009-12-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7317] Display full tracebacks when an error occurs asynchronously

2009-12-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Seconded. But such messages are also printed when the interpreter exits, when poorly written __del__ methods access already disposed modules. Raising a full traceback could cause users to think that the error is more severe than it is. Is there an alread

[issue7416] select module compile errors breaks OS X multi-architecture builds

2009-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: Fixed in r76623 (trunk) and r76624 (3.2). (The commit message mentions another issue, that's a copy-paste error on my end) -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python t

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: Hugh: never mind There is a workaround for this issue: use socketpair(2) instead of pipe(2). I haven't thought enough about the consequences yet to have an firm opinion on implementing os.pipe using socketpair(2) on OSX. My gut feeling is that we shou

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-12-01 Thread Martin v . Löwis
Martin v. Löwis added the comment: Thanks, closing it here as third-party. Feel free to follow up here with news on Apple's resolution of the issue. -- resolution: -> wont fix status: open -> closed versions: +3rd party ___ Python tracker

[issue7419] Crash in _locale.setlocale on windows

2009-12-01 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc : import _locale _locale.setlocale(12345) Crashes on Windows with exit code 0xc417, a.k.a STATUS_INVALID_CRUNTIME_PARAMETER. 2.6 and 3.0 are not affected. setlocale should check the category before passing it to the C runtime: LC_MIN <= category &

[issue7416] select module compile errors breaks OS X multi-architecture builds

2009-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: Hugh: why did you remove the .c file? I'd prefer to keep the .c file in the python tracker as, just in case someone else runs into the same issue and starts debugging the issue. -- ___ Python tracker

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-12-01 Thread Hugh Secker-Walker
Hugh Secker-Walker added the comment: Updated the C program to deal with command-line args. This is the version submitted to Apple Bug Reporter, issue 7433004. -- Added file: http://bugs.python.org/file15429/os_pipe_write_close_bug.c ___ Python trac

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-12-01 Thread Hugh Secker-Walker
Changes by Hugh Secker-Walker : Removed file: http://bugs.python.org/file15420/os_pipe_write_close_bug.c ___ Python tracker ___ ___ Python-bugs

[issue7418] hashlib : the names of the different hash algorithms

2009-12-01 Thread flox
flox added the comment: I guess you missed the quotes. $ ./python foo.py Traceback (most recent call last): File "foo.py", line 2, in from hashlib import * TypeError: attribute name must be string, not 'tuple' -- nosy: +flox ___ Python track

[issue7416] select module compile errors breaks OS X multi-architecture builds

2009-12-01 Thread Ronald Oussoren
Ronald Oussoren added the comment: I'm currently testing a patch that adds the required SIZEOF_ macros to pymacconfig.h, simular to how SIZEOF_LONG and SIZEOF_VOIDP are handled. I expect to commit a fix later today to the 2.7 and 3.2 branches. The new SIZEOF_ macros are only needed for new fu

[issue7416] select module compile errors breaks OS X multi-architecture builds

2009-12-01 Thread Michael Broghton
Changes by Michael Broghton : -- nosy: +mbroughton ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread flox
flox added the comment: Proposed docstring patch. -- keywords: +patch nosy: +flox versions: +Python 3.2 Added file: http://bugs.python.org/file15428/issue7417_py3k.diff ___ Python tracker __

[issue7418] hashlib : the names of the different hash algorithms

2009-12-01 Thread Carl Chenet
New submission from Carl Chenet : Hi, The hashlib module could provide a tuple offering the names of the different hash algorithms which are guaranteed to be supported. The expected result: >>> import hashlib >>> hashlib.algorithms ('md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512') Here

[issue7417] open builtin has no signature in docstring

2009-12-01 Thread ulrik
New submission from ulrik : Python 3.1.1's open has no signature in the docstring so the documentation for this builtin function is unfortunately very confusing (IMO is missing the most important part). >>> help(open) open(...) Open file and return a stream. Raise IOError upon failure.

[issue7401] os.write and os.close on pipe from separate threads hangs on Mac OS X

2009-12-01 Thread Hugh Secker-Walker
Hugh Secker-Walker added the comment: I have an ADC account that I only ever use to get XCode. I'll file a bug-report with Apple. -- ___ Python tracker ___ _

[issue7413] datetime.datetime.isoformat truncation problem

2009-12-01 Thread Eric Smith
Eric Smith added the comment: The patch looks okay to me, and works on 2.7. Although it's slightly out of date with respect to line numbers, it still applies cleanly. My trivial suggestions are that I'd replace: x += PyOS_snprintf(buffer + 8, bufflen - 8, ".%06d", us); with x += PyOS_snprintf(b

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2009-12-01 Thread egaudry
egaudry added the comment: I came across this (very) interesting thread after experiencing some redistribution issue with a python(2.6)-based package built with msvc9 compiler. I used to struggled with the SxS Microsoft policy in the past. After I finally went for the private assembly/crt runti

[issue7211] select module - kevent ident field 64 bit issue

2009-12-01 Thread Ned Deily
Ned Deily added the comment: This patch causes build errors on 32-bit/64-bit multi-architecture builds on OS X. See Issue7416 for more info and a patch. -- nosy: +ned.deily ___ Python tracker

[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes

2009-12-01 Thread flox
Changes by flox : Removed file: http://bugs.python.org/file15388/issue7380.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue7380] uuid.UUID.bytes gives a bytearray() instead of bytes

2009-12-01 Thread flox
Changes by flox : Added file: http://bugs.python.org/file15426/issue7380_py3k.diff ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue7416] select module compile errors breaks OS X multi-architecture builds

2009-12-01 Thread Ned Deily
New submission from Ned Deily : Release blocker The changes for Issue7211 to support 64-bit kevent ident fields in 64-bit builds cause compile errors on those OS X multi-arch builds which include both 32-bit and 64-bit variants. Problem is reproducible by this simplified build config: confi

[issue7413] datetime.datetime.isoformat truncation problem

2009-12-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Here is a test + fix. -- assignee: -> amaury.forgeotdarc keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file15424/isoformat.patch ___ Python tracker

[issue691291] codecs.open(filename, 'U', 'UTF-16') corrupts text

2009-12-01 Thread flox
Changes by flox : Added file: http://bugs.python.org/file15423/issue691291_py3k.diff ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue691291] codecs.open(filename, 'U', 'UTF-16') corrupts text

2009-12-01 Thread flox
flox added the comment: Proposed patch following suggestion of And Clover. Compliant with documentation: «Files are always opened in binary mode, even if no binary mode was specified. This is done to avoid data loss due to encodings using 8-bit values. This means that no automatic conversion of