[issue4416] state_reset not called on 'state' before sre_search invoked

2008-12-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: There is no issue: in pattern_search, state_init is called before sre_search is invoked. And state_init contains all the operations performed by state_reset. The invariant here is that each call to sre_search must be preceded by a call

[issue4084] Decimal.max(NaN, x) gives incorrect results when x is finite and long

2008-12-11 Thread Mark Dickinson
Mark Dickinson [EMAIL PROTECTED] added the comment: Merged to 2.6 and 3.0 maintenance branches (r67700, r67701). -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4084

[issue4602] 2to3 drops executable bit with --write

2008-12-11 Thread Adeodato Simó
Adeodato Simó [EMAIL PROTECTED] added the comment: Thanks for the report! Fixed in r67674. I'm afraid I'm unfamiliar with Python development procedures: that commit was committed to /sandox, is that expected? ___ Python tracker [EMAIL PROTECTED]

[issue4631] urlopen returns extra, spurious bytes

2008-12-11 Thread Adeodato Simó
New submission from Adeodato Simó [EMAIL PROTECTED]: This is very odd, but it was reproduced by people in #python as well. Compare, in python 2.5: urllib.urlopen('http://bugs.debian.org/cgi-bin/bugreport.cgi?mbox=yes;bug=123456').readline() 'From [EMAIL PROTECTED] Tue Dec 11 11:32:47 2001\n'

[issue4632] Wrong fix for range(42)[::-1]

2008-12-11 Thread Thomas Heller
New submission from Thomas Heller [EMAIL PROTECTED]: The 2to3 fixer translates this code: range(42)[::-1] into this one: list(range(42)[::-1] which throws an error when run with Python 3: Traceback (most recent call last): File test.py, line 1, in module

[issue4631] urlopen returns extra, spurious bytes

2008-12-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: I don't reproduce the problem: urllib.request.urlopen('http://bugs.debian.org/cgi-bin/bugreport.cgi?mbox=yes;bug=123456').readline() b'From [EMAIL PROTECTED] Tue Dec 11 11:32:47 2001\n' I connect through a http proxy. -- nosy:

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-11 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Antoine, regarding the shapes and strides info for subviews: don't think of it as reallocating or altering the shape of the underlying buffer. Think of it as having separate shape and stride information for the contents of the underlying

[issue4627] Add Mac OS X Disk Images to Python.org homepage

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: I have built a Mac Installer (and tested). I'm not sure how to upload it, though. -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4627

[issue4602] 2to3 drops executable bit with --write

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: On Thu, Dec 11, 2008 at 4:52 AM, Adeodato Simó [EMAIL PROTECTED] wrote: Adeodato Simó [EMAIL PROTECTED] added the comment: Thanks for the report! Fixed in r67674. I'm afraid I'm unfamiliar with Python development procedures: that

[issue4602] 2to3 drops executable bit with --write

2008-12-11 Thread Adeodato Simó
Adeodato Simó [EMAIL PROTECTED] added the comment: Yes, it will be merged into the trunk eventually. Great, thank you and sorry for the noise. Also, is this fix elegible for the 3.0 branch? ___ Python tracker [EMAIL PROTECTED]

[issue4228] struct.pack('L', -1)

2008-12-11 Thread Armin Rigo
Armin Rigo [EMAIL PROTECTED] added the comment: FWIW, struct.pack(I, whatever) produces \x00\x00\x00\x00 too. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4228 ___

[issue4620] Memory leak with datetime used with time.strptime

2008-12-11 Thread Skip Montanaro
Skip Montanaro [EMAIL PROTECTED] added the comment: A number of people on a number of platforms and versions can't reproduce this. -- resolution: - works for me stage: - committed/rejected status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue4228] struct.pack('L', -1)

2008-12-11 Thread Armin Rigo
Armin Rigo [EMAIL PROTECTED] added the comment: Attached struct-2.5-fix.diff. The tests still pass (both 32- and 64-bits). -- keywords: +patch Added file: http://bugs.python.org/file12326/struct-2.5-fix.diff ___ Python tracker [EMAIL PROTECTED]

[issue2173] Python fails silently on bad locale

2008-12-11 Thread Stuart Woodward
Stuart Woodward [EMAIL PROTECTED] added the comment: I'm running on Mac OS X. I applied the patch issue2173.patch and it solved the make: *** [sharedmods] Error 1 problem. A cursory test of /usr/local/bin/python3.0 was successful. -- nosy: +stuartcw

[issue4633] file.tell() gives wrong result

2008-12-11 Thread Yavuz Onder
New submission from Yavuz Onder [EMAIL PROTECTED]: I find that file.tell returns not the byte offset of the next byte, but possibly the byte offset of the next block to be read. I find it always to be a multiple of 1024. Following is a demo of the bug. where I read a few lines into a text file,

[issue4634] 2to3 should fix import HTMLParser

2008-12-11 Thread Lino Mastrodomenico
New submission from Lino Mastrodomenico [EMAIL PROTECTED]: This should be easy: 2to3 must convert import HTMLParser to import html.parser. -- components: 2to3 (2.x to 3.0 conversion tool) messages: 77618 nosy: mastrodomenico severity: normal status: open title: 2to3 should fix import

[issue4633] file.tell() gives wrong result

2008-12-11 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- resolution: - wont fix status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4633 ___

[issue4633] file.tell() gives wrong result

2008-12-11 Thread Tim Gordon
Tim Gordon [EMAIL PROTECTED] added the comment: Try using the readline method instead of next. I don't think that applies the same buffering. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4633 ___

[issue4635] no reference for optparse methods

2008-12-11 Thread anatoly techtonik
New submission from anatoly techtonik techto...@gmail.com: optparse documentation misses reference for at least these three methods: print_help() print_usage() print_version() -- assignee: georg.brandl components: Documentation messages: 77622 nosy: georg.brandl, techtonik severity:

[issue2173] Python fails silently on bad locale

2008-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks, Stuart! I've committed the fix in r67703 and r67704, so it should appear in 3.0.1. This should fix the silent build failure, and the zero-output interpreter. The behaviour is still not ideal: a bad LC_CTYPE setting causes

[issue4634] 2to3 should fix import HTMLParser

2008-12-11 Thread David W. Lambert
David W. Lambert lamber...@corning.com added the comment: It is hard. Although you know what you mean, 2to3 has no way to know for instance, that you never run your program with working directory containing file HTMLParser.py. 2to3 could offer a suggestion rather than reporting no change

[issue2173] Python fails silently on bad locale

2008-12-11 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2173 ___

[issue4632] Wrong fix for range(42)[::-1]

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: Thanks for the report! Fixed in r67705. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4632

[issue3167] math test fails on Solaris 10

2008-12-11 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: Removed file: http://bugs.python.org/file10764/issue3167.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3167 ___

[issue4634] 2to3 should fix import HTMLParser

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: We do have a fixer that changes imports from std reorg. I added HTMLParser and htmlentitydefs in r67706. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python

[issue3167] math test fails on Solaris 10

2008-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Thanks, both! Fixed in the trunk in r67707. I'll wait to be sure that the buildbots are happy, then merge to 2.6, 3.0, 3.1. -- versions: +Python 3.0, Python 3.1 ___ Python tracker

[issue2819] Full precision summation

2008-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Closing this. Let's stick with what we have. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2819 ___

[issue4228] struct.pack('L', -1)

2008-12-11 Thread Martin v. Löwis
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4228 ___ ___

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-11 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I'm trying to be practical. If the additional shape/strides storage is in Py_buffer, it can benefit anyone wanting to create a subview or doint to do something else with shape and strides. If the storage is in memoryview, it only benefits

[issue3439] create a numbits() method for int and long types

2008-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Victor, Thanks for the updated patch. I think you need to do a PyErr_Clear after the 'return PyLong_FromSize_t' line. To be safe, you should probably check the exception type first, and either do a PyErr_Clear and continue if it's an

[issue4636] bdist_wininst installer with install script raises exception

2008-12-11 Thread Thomas Heller
New submission from Thomas Heller thel...@ctypes.org: Running a bdist_wininst installer that contains a install script, with python 3, raises an exception. This is displayed in the gui: ImportError: No module named __builtin__ *** run_installscript: internal error 0x *** This is

[issue3439] create a numbits() method for int and long types

2008-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Alternatively, you could just ignore _PyLong_NumBits entirely and put the whole calculation into long_numbits. You're already halfway there with the calculation of msd_bits anyway, and I suspect the code will look cleaner (and run faster)

[issue2155] optparse.OptionGroup with_statement context handling

2008-12-11 Thread Michael Hoffman
Michael Hoffman michaelfilter.57405...@bloglines.com added the comment: Is there anything I can do to get this feature request considered earlier? I can generate a real patch, but I figured that wouldn't necessary for something so simple. This has the advantage that it can probably be cut/pasted

[issue3167] math test fails on Solaris 10

2008-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Buildbots seem content. Merged to 2.6, 3.0, 3.1. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3167

[issue3682] test_math: math.log(-ninf) fails to raise exception on OpenBSD

2008-12-11 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: I've committed the issue 3167 fix in revisions r67707 to r67710. I'm fairly sure that this patch should resolve this issue. (Let me know if it doesn't.) -- resolution: - fixed status: open - closed

[issue3439] create a numbits() method for int and long types

2008-12-11 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file12302/numbits-5.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3439 ___

[issue3638] tkinter.mainloop() is meaningless and crash: remove it

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: gpolo agree to remove it. If no one is opposed for this change, can someone apply the patch? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3638

[issue3880] _tkinter._flatten() doesn't check PySequence_Size() error code

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: gpolo reviewed the patch. So can anyone apply the patch? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3880 ___

[issue3952] _lsprof: clear() should call flush_unmatched()

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm unable to reproduce my issue with Python trunk, so close it. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3952

[issue3954] _hotshot: invalid error control in logreader()

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Regardless of the smiley, I certainly wouldn't object if you requested permissions on python-dev... I still don't have an account and the issue is still open. 2.6(.1) and 3.0 are released. The patch has been reviewed by

[issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: New version of the patch: - remove utf8_bom (was already replaced by codecs.BOM_UTF8) - include the regression test from amaury.forgeotdarc Can anyone review the new patch (which is very similar to the first one) and commit it?

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This patch looks good. ok and then? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016 ___

[issue4637] Binary floating point and decimal floating point arithmetic

2008-12-11 Thread Retro
New submission from Retro vinet...@gmail.com: Please consider of making the default floating point arithmetic in Python 3.x be decimal floating point arithmetic. -- components: Interpreter Core messages: 77645 nosy: Retro, gvanrossum severity: normal status: open title: Binary floating

[issue2706] datetime: define division timedelta/timedelta

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm finally opposed to datetime.totimedelta() = float, I prefer .totimedelta() = (second, microsecond) which means (int,int). But I like timedelta/timedelta = float, eg. to compute a progression percent. Anyone interested by my

[issue4580] slicing of memoryviews when itemsize != 1 is wrong

2008-12-11 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm trying to be practical. If the additional shape/strides storage is in Py_buffer, it can benefit anyone wanting to create a subview or doint to do something else with shape and strides. If the storage is in memoryview, it only benefits

[issue4637] Binary floating point and decimal floating point arithmetic

2008-12-11 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: This was discussed recently on python-dev (or was it python-ideas). The world is not ready for this. Please refer to the archive for motivation. -- resolution: - rejected status: open - closed

[issue4010] configure options don't trickle down to distutils

2008-12-11 Thread Akira Kitada
Akira Kitada akit...@gmail.com added the comment: Is there anyone knowing the historical reason for this? In that case I will take this and submit a patch here soon. -- versions: +Python 2.5.3, Python 2.7 ___ Python tracker rep...@bugs.python.org

[issue2736] datetime needs and epoch method

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: belopolsky will be happy to see this new version of my patch: - datetime.totimestamp() = (seconds, microseconds): two integers - datetime.totimestamp() implement don't use Python time.mktime() but directly the C version of

[issue4010] configure options don't trickle down to distutils

2008-12-11 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___ Python-bugs-list

[issue2736] datetime needs and epoch method

2008-12-11 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: About mktime() - -1: see the Issue1726687 (I found the fix in this issue). Next job will be to patch datetime.(utc)fromtimestamp() to support (int, int). I tried to write such patch but it's not easy because fromtimestamp() will

[issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: Fixed in r67711. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4021

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: Applied in r67713. -- nosy: +benjamin.peterson resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016

[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true

2008-12-11 Thread Hatem
New submission from Hatem hnass...@gmail.com: In [29]: a,b = 1.0,1.0 In [30]: a is b Out[30]: True In [31]: a = 1.0 In [32]: b = 1.0 In [33]: a is b Out[33]: False # ?!? -- components: Interpreter Core messages: 77654 nosy: nassrat severity: normal status: open title: 1 is 1 is allways

[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true

2008-12-11 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: this is not a bug. ask this type of question on comp.lang.python. in short: 'is' is not an equality comparison operator. it compares object instance identity. -- nosy: +gregory.p.smith resolution: - invalid status: open - closed

[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true

2008-12-11 Thread Hatem
Hatem hnass...@gmail.com added the comment: Really, is is not equality but is object equivalence, wow I did not know that. So why is the first one true MR. This is truly a bug, why is the first one optimized while the second one isn't. And how come integers are allways optimized in that sense.

[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true

2008-12-11 Thread Tim Peters
Tim Peters tim.pet...@gmail.com added the comment: is is for testing object identity, not numeric equality. That 1 is 1 is always true is simply an implementation detail common to all recent versions of CPython, due to CPython caching very small integer objects. The language definition neither

[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true

2008-12-11 Thread Hatem
Hatem hnass...@gmail.com added the comment: Atleast you didnt really challenge my inelegence like greg did. If you look at my small interpreted session, is returned true the first time. Why is that. The ticket title may not have been perfect, I was trying to be sarcastic/funny. I am asking why

[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson musiccomposit...@gmail.com added the comment: I had to revert this because tokenize imports itertools. This is a problem when building (setup.py) because itertools doesn't exist, yet. I also think we should consider hard adding more modules that are loaded at startup time to

[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true

2008-12-11 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: the only intelligence i'm challenging is that this is not appropriate for a bug tracker. bring it up on a users mailing list. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4638

[issue1856] shutdown (exit) can hang or segfault with daemon threads running

2008-12-11 Thread Forest Wilkinson
Changes by Forest Wilkinson for...@users.sourceforge.net: -- nosy: +forest ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1856 ___ ___

[issue1720705] thread + import = crashes?

2008-12-11 Thread Forest Wilkinson
Changes by Forest Wilkinson for...@users.sourceforge.net: -- nosy: +forest ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1720705 ___ ___

[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true

2008-12-11 Thread Tim Peters
Tim Peters tim.pet...@gmail.com added the comment: Please take requests for discussion to comp.lang.python. Many people there understand this behavior and will be happy to explain it in as much detail as you want. The bug tracker is not the place for this.