[issue4285] Use a named tuple for sys.version_info

2009-02-03 Thread Eric Smith
Changes by Eric Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4124] Patch for adding "default" to itemgetter and attrgetter

2009-02-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: That makes sense. You've found two object models that have optional attributes and have had some need to extract them with a default. My remaining concern is about adding complexity for functionality that is not often needed. It wouldn't be an issue if ite

[issue2124] xml.sax and xml.dom fetch DTDs by default

2009-02-03 Thread Damien Neil
Damien Neil added the comment: On Feb 3, 2009, at 11:23 AM, Martin v. Löwis wrote: > I don't think this is actually the case. Did you try calling getSystemId > on the locator? EntityResolver.resolveEntity() is called with the publicId and systemId as arguments. It does not receive a locator.

[issue4804] Python on Windows disables all C runtime library assertions

2009-02-03 Thread Martin v. Löwis
Martin v. Löwis added the comment: As for checking CRT handles: it seems that __pioinfo is exported from msvcr90.dll. So we could check whether osfile has the FOPEN flag set, and we could check whether fh >= 0. Unfortunately, there seems to be no way to check for _nhandle. However, that might no

[issue5127] UnicodeEncodeError - I can't even see license

2009-02-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: > I must be missing some detail, but what does the Unicode database > have to do with the unicodeobject.c C API ? Ah, now I understand your concerns. My suggestion is to change only the 20 functions in unicodectype.c: _PyUnicode_IsAlpha, _PyUnicode_ToLo

[issue4285] Use a named tuple for sys.version_info

2009-02-03 Thread Eric Smith
Changes by Eric Smith : -- assignee: brett.cannon -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2124] xml.sax and xml.dom fetch DTDs by default

2009-02-03 Thread Martin v. Löwis
Martin v. Löwis added the comment: > The EntityResolver's resolveEntity() method is not, however, passed the > base path to resolve the relative systemId from. > > This makes it impossible to properly implement a parser which caches > fetched DTDs. I don't think this is actually the case. Did

[issue5143] OS X: Py_SetProgramName argument has type char*; should be wchar_t*

2009-02-03 Thread Ned Deily
Ned Deily added the comment: Thanks for the patches, I'll report back on them. ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue5145] struct.calcsize('cd') returns 16 instead of 9

2009-02-03 Thread bob gailer
New submission from bob gailer : struct.calcsize('cd') returns 16 instead of 9 struct.calcsize('dc') returns 9 as expected -- components: Extension Modules messages: 81085 nosy: bgailer severity: normal status: open title: struct.calcsize('cd') returns 16 instead of 9 type: behavior ver

[issue5094] datetime lacks concrete tzinfo impl. for UTC

2009-02-03 Thread Rafe Kaplan
Rafe Kaplan added the comment: I'm going to attempt to implement this feature. -- nosy: +rafe ___ Python tracker ___ ___ Python-bugs-l

[issue4753] Faster opcode dispatch on gcc

2009-02-03 Thread Skip Montanaro
Skip Montanaro added the comment: This has been checked in, right? Might I suggest that the TARGET and TARGET_WITH_IMPL macros not include the trailing colon? I think that will make it more friendly toward "smart" editors such as Emacs' C mode. I definitely get better indentation with TA

[issue5148] gzip.open breaks with 'U' flag

2009-02-03 Thread Christopher Barker
New submission from Christopher Barker : If you pass the 'U' (Universal newlines) flag into gzip.open(), the flag gets passed into the file open command used to open the gzip file itself. As the 'U' flag can cause changes in teh data (Lineffed translation), when it is used with a binary file open

[issue2124] xml.sax and xml.dom fetch DTDs by default

2009-02-03 Thread Damien Neil
Damien Neil added the comment: On Feb 3, 2009, at 3:12 PM, Martin v. Löwis wrote: > This is DOM parsing, not SAX parsing. 1) The title of this ticket begins with "xml.sax and xml.dom...". 2) I am creating a SAX parser and passing it to xml.dom, which uses it. > So break layers of abstraction,

[issue5149] syntactic sugar: type coercion on pointer assignment

2009-02-03 Thread Peter A Silva
New submission from Peter A Silva : tough% cat toy.py from ctypes import * class foo(Structure): _fields_ = [ ( "bar", c_char_p ) ] foofoo = foo() babar = create_string_buffer(32) foofoo.bar = babar tough% python toy.py Traceback (most recent call last): File "toy.py", line 11, in

[issue2422] Automatically disable pymalloc when running under valgrind

2009-02-03 Thread James Henstridge
James Henstridge added the comment: Attached is an updated version of the patch against trunk (2.7). It simply fixes the conflicts that have occurred since the previous patch. Added file: http://bugs.python.org/file12935/disable-pymalloc-on-valgrind-py27.patch ___

[issue5135] Expose simplegeneric function in functools module

2009-02-03 Thread Ryan Freckleton
Ryan Freckleton added the comment: PJE seems to have borrowed the time machine :-). Based on the code the register function is already a decorator: def register(typ, func=None): if func is None: return lambda f: register(typ, f) registry[typ] = func retur

[issue2578] Figure out what to do with unittest's redundant APIs

2009-02-03 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue4347] Circular dependency causes SystemError when adding new syntax

2009-02-03 Thread Brett Cannon
Brett Cannon added the comment: So I finally got around to reviewing the patch and while it looks fine, I ended up with some failing tests: test_compiler test_quopri test_sys test_transformer. Do you know what is going on Thomas? This is after repeated make/make clean calls and using your non-r

[issue5128] compileall: consider ctime

2009-02-03 Thread Brett Cannon
Brett Cannon added the comment: Patch is really close. Can you use a context manager for the file management? That way the file is guaranteed to be closed without issue. ___ Python tracker __

[issue5139] Add combinatoric counting functions to the math module.

2009-02-03 Thread Ezio Melotti
Ezio Melotti added the comment: itertools.permutations_with_repetitions(iterable[, r]) is not necessary, writing in the doc that set(itertools.permutations(iterable[, r])) has the same result is probably enough (I put the set() in the wrong place in the previous message - this version is also le

<    1   2