[issue2541] Unicode escape sequences not parsed in raw strings.

2008-04-02 Thread John Millikin
New submission from John Millikin <[EMAIL PROTECTED]>: According to , raw strings with \u and \U escape sequences should have these sequences parsed as usual. However, they are currently escaped. >>> r'\u0020' '\\u0020' Expecte

[issue2540] If HAVE_LONG_LONG is not defined, longval will not be initialized (_sqlite)

2008-04-02 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto <[EMAIL PROTECTED]>: -- keywords: -easy __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsub

[issue2540] If HAVE_LONG_LONG is not defined, longval will not be initialized (_sqlite)

2008-04-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: Oh, I forgot this. When I debuged with #undef HAVE_LONG_LONG I noticed test_sqlite.py failed with this error message. == ERROR: CheckLargeInt (sqlite3.test.types.SqliteTyp

[issue2540] If HAVE_LONG_LONG is not defined, longval will not be initialized (_sqlite)

2008-04-02 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto <[EMAIL PROTECTED]>: I noticed compiler warned "'longval' is not used anywhere." And I found 'longval' was not initialized where HAVE_LONG_LONG was not defined. Is attached patch intended behavior? Thanks. -- components: Extension Modules files: fix.

[issue2539] Windows Registry issue with 2.5.2 AMD64 msi

2008-04-02 Thread Jason
New submission from Jason <[EMAIL PROTECTED]>: I have tried multiple times and even checking manually, but the Python 2.5.2 AMD64 msi installer does not register Python correctly, or it doesn't enter it into the registry correctly. I'm not sure. I install it after uninstalling 2.5.1 and and whe

[issue2538] memoryview of bytes is not readonly

2008-04-02 Thread Gregory P. Smith
Changes by Gregory P. Smith <[EMAIL PROTECTED]>: -- nosy: +gregory.p.smith __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue2538] memoryview of bytes is not readonly

2008-04-02 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>: Bytes should be immutable, but in test_socket.py: buf = b" "*1024 nbytes = self.cli_conn.recv_into(buf) This patch attempts to enforce readonly buffer on bytes -- components: Interpreter Core files: buffer.patch keywo

[issue1561] py3k: test_mailbox fails on Windows

2008-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Applied 2nd solution as r61951 -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2513] 64bit cross compilation on windows

2008-04-02 Thread Mark Hammond
Mark Hammond <[EMAIL PROTECTED]> added the comment: I'd like to keep this issue specifically about cross-compilation in the current tree, and while some of the other ideas may have merit, let's not bog this issue down with them unless they directly impact the patch. Does anyone have any comments

[issue2507] Exception state lives too long in 3.0

2008-04-02 Thread Barry A. Warsaw
Barry A. Warsaw <[EMAIL PROTECTED]> added the comment: Knocking the priority down to critical for the next alpha release. This can be readdressed once the release is made. -- nosy: +barry priority: release blocker -> critical __ Tracker <[EMAIL PROTECTED

[issue2318] TimedRotatingFileHandler: rotate every month, or every year

2008-04-02 Thread Vinay Sajip
Vinay Sajip <[EMAIL PROTECTED]> added the comment: I'm not sure how much of a need there is for this, and I don't have much think time I can devote to it, but I'll be happy to consider a patch ;-) -- resolution: -> later status: open -> closed __ Tracker

[issue2444] Adding __iter__ to class Values of module optparse

2008-04-02 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Closing on OP's request. -- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed __ Tracker <[EMAIL PROTECTED]> ___

[issue2315] TimedRotatingFileHandler does not account for daylight savings time

2008-04-02 Thread Vinay Sajip
Vinay Sajip <[EMAIL PROTECTED]> added the comment: Updated SVN, but not backported to 2.5 or earlier maintenance branches. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue2317] TimedRotatingFileHandler logic for removing files wrong

2008-04-02 Thread Vinay Sajip
Vinay Sajip <[EMAIL PROTECTED]> added the comment: Updated SVN, but not backported to 2.5 or earlier maintenance branches. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue2316] TimedRotatingFileHandler names files incorrectly if nothing is logged during an interval

2008-04-02 Thread Vinay Sajip
Vinay Sajip <[EMAIL PROTECTED]> added the comment: Updated SVN, but not backported to 2.5 or earlier maintenance branches. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue2424] Logging module hides user code errors (bare except)

2008-04-02 Thread Vinay Sajip
Vinay Sajip <[EMAIL PROTECTED]> added the comment: This has already been fixed in trunk. -- nosy: +vsajip resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue2517] Error when printing an exception containing a Unicode string

2008-04-02 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: We can't do much about that because only security fixes are backported to version < 2.5. __ Tracker <[EMAIL PROTECTED]> __ _

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Daniel Diniz
Daniel Diniz <[EMAIL PROTECTED]> added the comment: Thomas: I confirm your patch triggers this behavior. I can reliably get a __subclasscheck__ error by trying to "import sys" after the bogus catching happens: >>> def g(): ... try: ... return g() ... except ValueError: ... return sy

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: I'd be okay with only covering 1987 and later. But it's probably good to have a table-based solution anway, to make it easy to handle future changes -- I'm sure 2007 is not the last year this is changing. :-) ___

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Daniel Diniz
Changes by Daniel Diniz <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9926/tzinfo-examples.patch __ Tracker <[EMAIL PROTECTED]> __ ___ P

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Daniel Diniz
Daniel Diniz <[EMAIL PROTECTED]> added the comment: Er... 2007- : from the second Sunday in March to the first Sunday in November. :/ __ Tracker <[EMAIL PROTECTED]> __

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Daniel Diniz
Daniel Diniz <[EMAIL PROTECTED]> added the comment: That was a such silly mistake, sorry :) Updated patch tries to keep the old behavior, but I just found out it's mostly wrong too (DST start and end days changed a bit in the last 80 years). >From http://aa.usno.navy.mil/faq/docs/daylight_time.

[issue2444] Adding __iter__ to class Values of module optparse

2008-04-02 Thread Guilherme Polo
Guilherme Polo <[EMAIL PROTECTED]> added the comment: Given the disagreement found here, I suggest closing this rfe and moving further discussions to c.l.p. Thanks djc and rhettinger for your support, and, bethard and shawnmorel for your different p.o.v. __ Tracke

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Running Daniels code interactively, with a debug build on Windows, additionally prints 'XXX undetected error' before the Runtime error is raised. I cannot see anything that is wrong with my code. Maybe this, and the test failure, has to do wi

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Daniel Diniz
Daniel Diniz <[EMAIL PROTECTED]> added the comment: The test fails on this: def g(): try: return g() except ValueError: return -1 self.assertRaises(RuntimeError, g) Changing that "return -1" to "return sys.exc_info()" shows that a RuntimeError was raised indeed. Also, u

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: Hi Daniel, Can you change it so that the start and end values are chosen dynamically based on the year? I.e. if year < 2007 use the old values otherwise use the new ones. A tzinfo object is supposed to (within reason) handle historical ti

[issue1733757] RuntimeWarning: tp_compare didn't return -1 or -2

2008-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The "funny" errors around trace & exceptions have been corrected with issue1265. The remaining problem is a livelock: when the interpreter exits, threading.Thread.__delete is called, and this calls "_active_limbo_lock.acquire". But th

[issue2517] Error when printing an exception containing a Unicode string

2008-04-02 Thread Christoph Burgmer
Christoph Burgmer <[EMAIL PROTECTED]> added the comment: JFTR: > print unicode(e.message).encode("utf-8") only works for Python 2.5, not downwards. __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2537] re.compile(r'((x|y+)*)*') should fail

2008-04-02 Thread Jason Orendorff
New submission from Jason Orendorff <[EMAIL PROTECTED]>: Below, the second regexp seems just as guilty as the first to me. Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type "help", "copyright", "credits" or "license" for more informati

[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192

2008-04-02 Thread Karen Tracey
Karen Tracey <[EMAIL PROTECTED]> added the comment: Opening the file in universal newline mode doesn't work for cases where the 'file' contains multipart MIME data (eg. multipart/form-data) where one of the included parts is binary data (eg. application/octet-stream). In that case, blind transla

[issue2532] file that breaks 2to3 (despite being correct python)

2008-04-02 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: Yes, this is a known problem with the pattern matching system. -- priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ __

[issue2444] Adding __iter__ to class Values of module optparse

2008-04-02 Thread Steven Bethard
Steven Bethard <[EMAIL PROTECTED]> added the comment: Subclassing dict seems like a bad idea. The options value returned by .parse_args() is not supposed to be dict-like, it's supposed to be object-like. That is, the natural way of accessing values from it is through dotted attribute access, not

[issue2529] list/generator comprehension parser doesn't match spec

2008-04-02 Thread Nick Guenther
Nick Guenther <[EMAIL PROTECTED]> added the comment: Oh, okay. That's really confusing because I expect "in" to always return a bool, but in the spirit of python there's no reason it should I guess. __ Tracker <[EMAIL PROTECTED]>

[issue2513] 64bit cross compilation on windows

2008-04-02 Thread Trent Nelson
Trent Nelson <[EMAIL PROTECTED]> added the comment: Updated PCbuild/readme.txt in r62105 and r62106 for trunk and py3k respectively. __ Tracker <[EMAIL PROTECTED]> __ __

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: I find similar speedups: isinstance(42, int) -2% isinstance(42, type) 45% isinstance(object, type) -1% isinstance(object, int) 42% isinstance(float, int)44% (both negative ones are actually lower than original, but so low

[issue1733757] RuntimeWarning: tp_compare didn't return -1 or -2

2008-04-02 Thread Alain Spineux
Alain Spineux <[EMAIL PROTECTED]> added the comment: This has chnaged with python-2.5.2. runing python openpkg under linux centos-5.1, the test case case4.py don't give any error message anymore, but still block like with 2.5.1: # strace -p 937 Process 937 attached - interrupt to quit futex(0x9b

[issue2527] Pass a namespace to timeit

2008-04-02 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: On Wed, Apr 2, 2008 at 2:42 AM, Peter Otten <[EMAIL PROTECTED]> wrote: > Alexander, I'm fine with a more specific argument name. ns was what > the Timer already used internally. > Maybe it should be "locals" after all. It does not l

[issue2210] Nested module import clutters package namespace

2008-04-02 Thread Daniel Diniz
Daniel Diniz <[EMAIL PROTECTED]> added the comment: Not a bug IMHO, but a gotcha. Change x.py to "from pack import y as q" and you get the desired result. Check http://effbot.org/zone/import-confusion.htm -- nosy: +ajaksu2 __ Tracker <[EMAIL PROTECTED]> <

[issue2531] float compared to decimal is silently incorrect.

2008-04-02 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Which version of 2.4 are you talking about? This line in the tests... self.assertNotEqual(da, 32.7) is there since almost 4 years ago (release 36325, and 2.4 is tagged in release 37906). Anyway, this behaviour is ok, as is the following

[issue643841] New class special method lookup change

2008-04-02 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: I've started a discussion on the Py3k development list regarding the possibility of adding a new method to type to aid in converting proxy classes from classic- to new-style. Tracker <[EMAIL PROTECTED]>

[issue643841] New class special method lookup change

2008-04-02 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Agreed that section of the docs should be more explicit in pointing out that __getattr__ and __getattribute__ won't work for proxying special methods for new-style classes. It's also true that there are quite a few special methods where nothing

[issue2444] Adding __iter__ to class Values of module optparse

2008-04-02 Thread Guilherme Polo
Guilherme Polo <[EMAIL PROTECTED]> added the comment: I have asked that myself, shawnmore. Why not let Value subclass dict ? __ Tracker <[EMAIL PROTECTED]> __ __

[issue2444] Adding __iter__ to class Values of module optparse

2008-04-02 Thread Shawn Morel
Shawn Morel <[EMAIL PROTECTED]> added the comment: gpolo: The argument still doesn't hold. As you point out, it's the Values class output from __str__ and other behaviour that is being un- pythonic and leading you to believe it's a dictionary. Adding the __itter__ method would only make this wo

[issue2525] class USTimeZone in Doc/includes/tzinfo-examples.py is out of date

2008-04-02 Thread Daniel Diniz
Daniel Diniz <[EMAIL PROTECTED]> added the comment: This patch updates the behavior as per "The Energy Policy Act of 2005": Start: Second Sunday in March End: First Sunday in November Time: 2 am local time -- keywords: +patch nosy: +ajaksu2 Added file: http://b

[issue2513] 64bit cross compilation on windows

2008-04-02 Thread Trent Nelson
Trent Nelson <[EMAIL PROTECTED]> added the comment: Christian, regarding shipping x64 .lib files as well as 32-bit ones -- sensible idea, but where would we place the x64 version libs? In Python [xx]\libs\amd64? (This would mirror the approach used with PCbuild and PCbuild\amd64 -- although t

[issue1602742] itemconfigure returns incorrect text property of text items

2008-04-02 Thread Matthias Kievernagel
Matthias Kievernagel <[EMAIL PROTECTED]> added the comment: I no longer know what I meant with "document string is broken". It is not very clear, but not broken. It does not specify clearly the return value in the case of 'without arguments'. The problem is still present in trunk. Problem is as

[issue2510] Bazaar ignore file

2008-04-02 Thread Ralf Schmitt
Ralf Schmitt <[EMAIL PROTECTED]> added the comment: the same is true for me. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubsc

[issue2536] itertools.permutations docstring is misleading

2008-04-02 Thread Daniel Diniz
New submission from Daniel Diniz <[EMAIL PROTECTED]>: Currently, Modules/itertoolsmodule.c lines 2471-2475 are: PyDoc_STRVAR(permutations_doc, "permutations(iterables[, r]) --> permutations object\n\ \n\ Return successive r-length permutations of elements in the iterable.\n\n\ permutations(range

[issue2535] duplicate Misc.lower

2008-04-02 Thread Matthias Kievernagel
New submission from Matthias Kievernagel <[EMAIL PROTECTED]>: ron longo posted this remark in the Tkinter list: >Don't know if this is the place to report this. Not really a bug, >however, >method lower() is defined twice in class Misc in the module Tkinter.py. >Both definitions are identical

[issue2303] isinstance is 4x as slow as in 2.5 because the common case raises

2008-04-02 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Issue #2534 has a patch which speeds up isinstance and issubclass by implementing type.__instancecheck__ and type.__subclasscheck__. __ Tracker <[EMAIL PROTECTED]>

[issue2513] 64bit cross compilation on windows

2008-04-02 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Could somebody with a 64bit CPU please extend the PCbuild/README.txt? I don't have the means to test 64bit builds or cross compilation of a 32bit build on a 64bit system. I only have 32bit CPUs at home. +1 for nmake if you can get it to wor

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Thomas Heller
New submission from Thomas Heller <[EMAIL PROTECTED]>: This patch implements type.__instancecheck__ and type.__subclasscheck__, which speeds up isinstance and issubclass calls quite a bit. See also issue #2303. Here are the performance figures for the current trunk version: Current SNV trunk:

[issue2422] Automatically disable pymalloc when running under valgrind

2008-04-02 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: James Henstridge schrieb: > James Henstridge <[EMAIL PROTECTED]> added the comment: > > There are probably a few other performance optimisations that would be > good to turn off when running under valgrind. > > A big one is the tuple cache

[issue2532] file that breaks 2to3 (despite being correct python)

2008-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Testing with a much simpler file ("a = 0\n" * 1000), there is a limit to the number of statements in one file, around (sys.recursionlimit - 24). -- nosy: +amaury.forgeotdarc __ Tracker <[EMAIL PR

[issue2533] Invalid TypeError with class method decorator and class method parameter

2008-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: First, your code does not compile: when compiling the DecorateMe class body, the DecorateMe class does not yet exist, and "callback=DecorateMe.callback" is an error! And this explains your surprise: certainly there is a previous version