[issue4416] state_reset not called on 'state' before sre_search invoked
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 to state_reset *or* state_init. I don't know whether your tool can detect this. -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4416 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4084] Decimal.max(NaN, x) gives incorrect results when x is finite and long
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4602] 2to3 drops executable bit with --write
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] http://bugs.python.org/issue4602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4631] urlopen returns extra, spurious bytes
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' To the equivalent in python 3.0: urllib.request.urlopen('http://bugs.debian.org/cgi-bin/bugreport.cgi?mbox=yes;bug=123456').readline() b'f65\r\n' -- components: Library (Lib) messages: 77603 nosy: dato severity: normal status: open title: urlopen returns extra, spurious bytes versions: Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4631 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4632] Wrong fix for range(42)[::-1]
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 print(list(range(42)[::-1])) TypeError: sequence index must be integer, not 'slice' -- components: 2to3 (2.x to 3.0 conversion tool) messages: 77604 nosy: theller severity: normal status: open title: Wrong fix for range(42)[::-1] ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4632 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4631] urlopen returns extra, spurious bytes
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: +amaury.forgeotdarc ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4631 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4580] slicing of memoryviews when itemsize != 1 is wrong
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 buffer 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 memoryview. I also think it is worth considering changing the memoryview to also take start/stop/step arguments in addition to the object to be viewed (initially only supporting step=1, just like slicing, but we should be able to lift that limitation as the implementation matures). The FromBuffer C-level constructor could probably go away at that point. Could you open a separate bug for this? I agree simplifications are welcome. As for the additional arguments, if we have proper slicing support I'm not sure they are really useful (at the Python level at least). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4627] Add Mac OS X Disk Images to Python.org homepage
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4602] 2to3 drops executable bit with --write
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 commit was committed to /sandox, is that expected? Yes, it will be merged into the trunk eventually. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4602] 2to3 drops executable bit with --write
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] http://bugs.python.org/issue4602 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4228] struct.pack('L', -1)
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4620] Memory leak with datetime used with time.strptime
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] http://bugs.python.org/issue4620 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4228] struct.pack('L', -1)
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] http://bugs.python.org/issue4228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2173] Python fails silently on bad locale
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 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2173 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4633] file.tell() gives wrong result
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, step back by the length of the last read line, read again, and do not find the same data. What is returned is the tail part of a line way down in the file. I woeked around by keeping track of the file pointer, and seek worked fine. tell() is at fault. --demonstration on a text file Python 2.5.1 (r251:54863, Nov 14 2007, 16:00:54) [GCC 3.4.3] on linux2 Type help, copyright, credits or license for more information. jf=open('junk','r') line=jf.next() line '\n' line=jf.next() line 'See COPYING file in the same directory as this one for license.\n' line=jf.next() line '\n' line=jf.next() line 'Thank you for trying this utility. I had great fun putting it\n' line=jf.next() line 'together, and I hope users will find it useful.\n' jf.seek(len(line),1) line=jf.next() line 'gle says Maps will not work without it. file:// URLs are \n' -- components: None messages: 77617 nosy: yavuz164 severity: normal status: open title: file.tell() gives wrong result versions: Python 2.5 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4633 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4634] 2to3 should fix import HTMLParser
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 HTMLParser type: behavior ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4634 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4633] file.tell() gives wrong result
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- resolution: - wont fix status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4633 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4633] file.tell() gives wrong result
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4635] no reference for optparse methods
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: normal status: open title: no reference for optparse methods versions: Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4635 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2173] Python fails silently on bad locale
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 sys.stdout and sys.stdin to have their encodings set to 'ascii'. 'UTF-8' would probably be a better guess, on OS X. But this is a lesser problem. To fix it, we should try to understand why nl_langinfo is returning an empty string in the first place. But maybe only Apple knows the answer to that one. :) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2173 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4634] 2to3 should fix import HTMLParser
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 required. This issue is common. -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4634 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2173] Python fails silently on bad locale
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2173 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4632] Wrong fix for range(42)[::-1]
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3167] math test fails on Solaris 10
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4634] 2to3 should fix import HTMLParser
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 tracker rep...@bugs.python.org http://bugs.python.org/issue4634 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3167] math test fails on Solaris 10
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 rep...@bugs.python.org http://bugs.python.org/issue3167 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2819] Full precision summation
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4228] struct.pack('L', -1)
Changes by Martin v. Löwis mar...@v.loewis.de: -- priority: - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4228 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4580] slicing of memoryviews when itemsize != 1 is wrong
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 memoryview. I'm not sure I follow that - no matter where they're stored, doing PyObject_GetBuffer on the memoryview should use the *memoryview's* shape/stride information rather than that of the underlying object. That's how getting this right in memoryview can help third parties: to get a subview of something else, take a memoryview of it, slice the memoryview, then get the Py_buffer information from the memoryview slice. Hence my opinion that it makes sense to have an easy API (at least at the C level) to create a memoryview given both an original object and start/stop/step information - not only will it be useful internally for the implementation of proper multi-dimensional slicing support in memoryview itself, but it will also be convenient for third parties trying to use or support the PEP 3118 protocol. I agree wholeheartedly with your complaints about Py_buffer and the PyObject_GetBuffer protocol being somewhat awkward to use. However, I don't agree that it is a significant problem. One focus for the underlying protocol design was on being fairly minimalist while still providing sufficient expressiveness to cover all of the use cases identified by the number crunching crowd - as Greg pointed out on python-dev, it's best to think of Py_buffer's role in the protocol as merely a location to store a fairly large set of output variables describing the internal storage of the object supplying the data buffer. The convenience layer that you're after (the one that will make the PEP 3118 API simpler to use by supporting normal PyObject semantics and easy creation of subviews) should actually *be* memoryview, but the implementation isn't there yet. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3439] create a numbits() method for int and long types
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 OverflowError, or just return NULL if it's some other exception. It's true that _PyLong_NumBits can't raise anything other than OverflowError at the moment, but you never know when that might change. :) I'm also getting a 'malformed table' warning when building the documentation. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3439 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4636] bdist_wininst installer with install script raises exception
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 probably because the bdist_wininst installer stubs (in the Lib/distutils/command subdirectory) have not been recompiled after changing the sources. -- components: Distutils messages: 77631 nosy: theller severity: normal status: open title: bdist_wininst installer with install script raises exception versions: Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4636 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3439] create a numbits() method for int and long types
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) that way. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3439 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2155] optparse.OptionGroup with_statement context handling
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 into any version of the code. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2155 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3167] math test fails on Solaris 10
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3682] test_math: math.log(-ninf) fails to raise exception on OpenBSD
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3682 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3439] create a numbits() method for int and long types
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3638] tkinter.mainloop() is meaningless and crash: remove it
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3880] _tkinter._flatten() doesn't check PySequence_Size() error code
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3952] _lsprof: clear() should call flush_unmatched()
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3954] _hotshot: invalid error control in logreader()
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 amaury.forgeotdarc, so can the patch be applied? The issue is still valid with python trunk: $ ./python Python 2.7a0 (trunk:67710M, Dec 11 2008, 23:57:18) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 import _hotshot, gc _hotshot.logreader(.) _hotshot.LogReaderType object at 0xb7d936e0 gc.collect() Exception EOFError: 'end of file with incomplete profile record' in 'garbage collection' ignored Fatal Python error: unexpected exception during garbage collection Abandon (core dumped) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3954 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error
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? Added file: http://bugs.python.org/file12328/tokenize_detect_encoding-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4637] Binary floating point and decimal floating point arithmetic
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 point and decimal floating point arithmetic type: feature request versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4637 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2706] datetime: define division timedelta/timedelta
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 last patch (implement timedelta/timedelta and divmod(timedelta, timedelta)? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2706 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4580] slicing of memoryviews when itemsize != 1 is wrong
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 memoryview. I'm not sure I follow that Not everyone wanting to do something with a Py_buffer constructs a memoryview, so it sounds sensible to give Py_buffer users as much power as memoryview users. Otherwise, let's kill Py_buffer as an independent struct, keep memoryview as the only building block of the buffer API... something which I totally agree with (but apparently others don't). it's best to think of Py_buffer's role in the protocol as merely a location to store a fairly large set of output variables describing the internal storage of the object supplying the data buffer. And I think I've made my point that it's a broken design principle, leading to two types instead of one. May I remind you that: Simple is better than complex. Complex is better than complicated. ? ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4637] Binary floating point and decimal floating point arithmetic
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4637 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4010] configure options don't trickle down to distutils
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 http://bugs.python.org/issue4010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2736] datetime needs and epoch method
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 mktime() because time.mktime() creates a float value - fix time.mktime() to support the timestamp -1 (first second before the epoch) to make it consistent with datetime.totimestamp() which also support this value - fix documentation: it's microseconds (10^-6) and not milliseconds (10^-3) Added file: http://bugs.python.org/file12329/datetime_totimestamp-3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4010] configure options don't trickle down to distutils
Changes by Brett Cannon br...@python.org: -- nosy: -brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4010 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2736] datetime needs and epoch method
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 support: int, long, float, (int, int), (int, long), (long, int) and (long, long). And I don't know if a long value can be converted to time_t. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2736 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true
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 true while 1.0 is 1.0 may sometimes be true versions: Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4638 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4638 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true
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. Go close other tickets. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4638 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true
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 requires nor forbids this, so any program relying on it is in error. Likewise any program relying on 1.0 is 1.0 being false is also in error. -- nosy: +tim_one ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4638 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true
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 are objects sometime the same instance while sometimes aren't for floats. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4638 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()
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 py3k already huge list. -- resolution: accepted - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4016 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1856] shutdown (exit) can hang or segfault with daemon threads running
Changes by Forest Wilkinson for...@users.sourceforge.net: -- nosy: +forest ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1720705] thread + import = crashes?
Changes by Forest Wilkinson for...@users.sourceforge.net: -- nosy: +forest ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1720705 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4638] 1 is 1 is allways true while 1.0 is 1.0 may sometimes be true
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. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4638 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com