[issue2735] range: lean and mean

2008-05-01 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: - With length precomputed in range_new, we can probably get rid of get_len_of_range. - There is no need to recompute length in range_iter. A nit: iterator object's size member is called "len", but the same member of the range object

[issue2720] make compiling struct be passed around to all ast helpers

2008-05-01 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Georg, is it all right if I apply this? -- assignee: -> georg.brandl nosy: +georg.brandl __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2735] range: lean and mean

2008-05-01 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Thu, May 1, 2008 at 9:38 PM, Alexander Belopolsky <[EMAIL PROTECTED]> wrote: > > Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: > > The start/step/stop getter functions should INCREF return values. Is > there a reason no

[issue2735] range: lean and mean

2008-05-01 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: The start/step/stop getter functions should INCREF return values. Is there a reason not to adapt slice implementation: static PyMemberDef slice_members[] = { {"start", T_OBJECT, offsetof(PySliceObject, start), READONLY},

[issue2705] incompatible change to warnings.showwarning

2008-05-01 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: On Thu, May 1, 2008 at 7:29 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > > Benjamin Peterson <[EMAIL PROTECTED]> added the comment: > > Why don't you add a Py3k warning and keep it in Py3k? Just asked python-dev if they are okay with th

[issue2705] incompatible change to warnings.showwarning

2008-05-01 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Why don't you add a Py3k warning and keep it in Py3k? __ Tracker <[EMAIL PROTECTED]> __ ___ Pyth

[issue2705] incompatible change to warnings.showwarning

2008-05-01 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: Fixed in r62626. I left in the optional arguments but they are just not called anymore by the 'warnings' machinery. I might add a PendingDeprecationWarning so that people start to add the argument, though, for future use. -- resoluti

[issue2224] branches/trunk-math patch

2008-05-01 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Closing: Christian merged the trunk-math branch into the trunk in r62380. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> _

[issue1722344] Thread shutdown exception in Thread.notify()

2008-05-01 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: Oh, and the patch includes a testcase. The current test_threading.py doesn't work with older versions, but a freestanding version of this testcase passes in 2.1 to 2.4, fails in 2.5 and trunk, and passes with the patch. _

[issue1722344] Thread shutdown exception in Thread.notify()

2008-05-01 Thread Adam Olsen
Adam Olsen <[EMAIL PROTECTED]> added the comment: This bug was introduced by r53249, which was fixing bug #1566280. Fixed by moving the WaitForThreadShutdown call into Py_Finalize, so all shutdown paths use it. I also tweaked the name to follow local helper function conventions. Martin, since

[issue1569] Add VS CRT redist to the MSI installer

2008-05-01 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Correct. This is now fixed. -- resolution: -> fixed status: pending -> closed __ Tracker <[EMAIL PROTECTED]> __

[issue1569] Add VS CRT redist to the MSI installer

2008-05-01 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: As far as I understood recent commits Martin has figured out how to integrate the VS CRT redist merge modules into the MSI installer. Am I correct? -- status: open -> pending __ Tracker <[EMAIL PROTE

[issue2734] 2to3 converts long(itude) argument to int

2008-05-01 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: It *could* be implemented for all fixers, but since it's fairly expensive, I'd rather limit it to cases where the problem is more likely to occur (for example, unicode -> str doesn't meet this threshold IMHO). _

[issue2735] range: lean and mean

2008-05-01 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: __len__ always has to return a Py_ssize_t because that's the data type that represents lengths in C. It's just the way it is. __ Tracker <[EMAIL PROTECTED]> ___

[issue2735] range: lean and mean

2008-05-01 Thread Facundo Batista
Facundo Batista <[EMAIL PROTECTED]> added the comment: Just for the record: Why __len__ tries to convert it to Py_size_t (possibly generating an Overflow), and not just returns the PyLong object? -- nosy: +facundobatista __ Tracker <[EMAIL PROTECTED]>

[issue2734] 2to3 converts long(itude) argument to int

2008-05-01 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: This seems to happen whenever argument are types that need to be renamed (eg. unicode -> str) Can this be fixed globally? -- nosy: +benjamin.peterson __ Tracker <[EMAIL PROTECTED]>

[issue1640] Enhancements for mathmodule

2008-05-01 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: The patch was part of the merge of Mark's and my trunk-math branch. It was merged into the trunk and 3.0 a while ago. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]>

[issue2723] Truncate __len__() at sys.maxsize

2008-05-01 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: If you're interested I asked a Java news group: http://groups.google.com/group/comp.lang.java.programmer/browse_thread/thread/fddbc3b1f9fec125# -- nosy: +benjamin.peterson __ Tracker <[EMAIL PROTECT

[issue2736] datetime needs and "epoch" method

2008-05-01 Thread Miki Tebeka
New submission from Miki Tebeka <[EMAIL PROTECTED]>: If you try to convert datetime objects to seconds since epoch and back it will not work since the microseconds get lost: >>> dt = datetime(2008, 5, 1, 13, 35, 41, 56) >>> seconds = mktime(dt.timetuple()) >>> datetime.fromtimestamp(seconds)

[issue2733] mmap resize fails on anonymous memory (Windows)

2008-05-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: It seems that you attached the output file instead of a python script... -- nosy: +amaury.forgeotdarc __ Tracker <[EMAIL PROTECTED]> ___

[issue2512] decide what to do with gettext API

2008-05-01 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I've pushed a fresh branch and am attaching a new patch. Added file: http://bugs.python.org/file10153/gettext_api2.patch __ Tracker <[EMAIL PROTECTED]> ___

[issue2735] range: lean and mean

2008-05-01 Thread Benjamin Peterson
New submission from Benjamin Peterson <[EMAIL PROTECTED]>: Per discussions on Python-3000, I've stipped range down to a bare minimum. Here's an overview of the patch: 1. No slicing. 2. Length is computed in constructor and is a PyLong in the object's struct. __len__ simply tries to convert it to

[issue2734] 2to3 converts long(itude) argument to int

2008-05-01 Thread Collin Winter
Collin Winter <[EMAIL PROTECTED]> added the comment: Agreed. There's code in fix_next to detect this kind of case. I'll see what I can do about generalizing it to support fix_long. __ Tracker <[EMAIL PROTECTED]> _

[issue2730] file readline w+ memory dumps

2008-05-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This is a duplicate of issue1394612, which was closed as "invalid". See the discussion there: - "in standard C mixing reads with writes yields undefined behavior [...] If you want defined behavior, then, for example, add >>> f.seek(0) b

[issue2512] decide what to do with gettext API

2008-05-01 Thread Guido van Rossum
Guido van Rossum <[EMAIL PROTECTED]> added the comment: This patch doesn't apply cleanly. :-( -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> __ ___

[issue2734] 2to3 converts long(itude) argument to int

2008-05-01 Thread Charles McCreary
New submission from Charles McCreary <[EMAIL PROTECTED]>: The 2to3 converter converts variables named "long" to "int". Original: long is an argument (longitude) def add_test_qtrmin(tdb, lat, long, area_id, call_center=""): Converted: def add_test_qtrmin(tdb, lat, int, area_id, call_center=""):

[issue2731] Documentation error on prime example in tutorial

2008-05-01 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Thanks, fixed in r62615. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue2732] curses.textpad loses characters at the end of lines

2008-05-01 Thread Shish
Changes by Shish <[EMAIL PROTECTED]>: -- type: -> behavior __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue2733] mmap resize fails on anonymous memory (Windows)

2008-05-01 Thread Kathryn M Kowalski
New submission from Kathryn M Kowalski <[EMAIL PROTECTED]>: We have a shared memory module that has been running fine on Windows with Active State Python 2.4.3 Build 12. On machines with 2.5.1.1 mmap.resize fails on an existing anonymous shared memory. The attached file is a stripped down ve

[issue2732] curses.textpad loses characters at the end of lines

2008-05-01 Thread Shish
New submission from Shish <[EMAIL PROTECTED]>: Even in the self-test suite, the bug appears, run: python /usr/lib/python2.4/curses/textpad.py then type so that the line wraps, eg 123456789123456789 to fill two lines, and then ctrl-g to return -- the result has had the end characters of each l

[issue2731] Documentation error on prime example in tutorial

2008-05-01 Thread Gerald Schlüter
New submission from Gerald Schlüter <[EMAIL PROTECTED]>: Hi there, on the page "controlflow.html" in chapter "break and continue Statements..." the line: print(n, 'equals', x, '*', n/x) should be changed to: print(n, 'equals', x, '*', n//x) or else the shown output should be modified. Thank y

[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

2008-05-01 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs <[EMAIL PROTECTED]> added the comment: I am making my changes in a Bazaar branch hosted on Launchpad. It took me quite a while to get things set up more-or-less logically but there they are and I'm currently trying to re-apply my local changes up to today into the various branc

[issue2730] file readline w+ memory dumps

2008-05-01 Thread tempname
New submission from tempname <[EMAIL PROTECTED]>: the following code actually dumps the heap into the temp file... very strange. Make sure the file doesn't exist before running the script. Only the list of numbers should be written to the file, but alot of junk is added. x = str(range(10)) f = o