[issue1580] Use shorter float repr when possible

2007-12-17 Thread Tim Peters
Tim Peters added the comment: It's not a question of bugs. Call the machine writing the string W and the machine reading the string R. Then there are 4 ways R can get back the double W started with when using the suggested algorithm: 1. W and R are the same machine. This is the way that's mos

[issue1648] add new function, sys.gettrace

2007-12-17 Thread Titus Brown
New submission from Titus Brown: Currently there is no way to retrieve the current trace function; this patch adds 'gettrace' to the sys module. This behavior is very useful for helping to control code coverage analysis tools. -- components: Library (Lib) files: gettrace.diff messages:

[issue1643] Add group() to itertools

2007-12-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I'm not interested in adding this to the module. Discussions to- date on the subject seem to show more interest in playing with grouper variants than in actual use cases. While the recipe given in the docs is somewhat opaque, it runs at C-speed (zer

[issue1623] Implement PEP-3141 for Decimal

2007-12-17 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: Re math.{floor,ceil}(float): oops, that's definitely a bug. I'll fix it. Re backporting: yes, and I believe trunc() should be backported too. __ Tracker <[EMAIL PROTECTED]>

[issue1647] IDLE messes around with sys.exitfunc

2007-12-17 Thread Christian Heimes
New submission from Christian Heimes: Is it necessary to alter or remove the exit function? c:\dev\python\trunk\PCbuild9>python ..\Lib\idlelib\idle.py Traceback (most recent call last): File "c:\dev\python\trunk\lib\idlelib\run.py", line 83, in main exit() File "c:\dev\python\trunk\lib\i

[issue1646] Make socket support TIPC.

2007-12-17 Thread Christian Heimes
Changes by Christian Heimes: -- keywords: +patch priority: -> normal type: -> rfe __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list maili

[issue1644] Patch submission guidelines outdated

2007-12-17 Thread Christian Heimes
Changes by Christian Heimes: -- assignee: -> georg.brandl nosy: +georg.brandl priority: -> immediate __ Tracker <[EMAIL PROTECTED]> __ ___ Pyt

[issue1645] Fix socketmodule.c:sock_recvfrom_guts() comment.

2007-12-17 Thread Christian Heimes
Changes by Christian Heimes: -- keywords: +patch priority: -> normal __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsub

[issue1646] Make socket support TIPC.

2007-12-17 Thread Alberto Bertogli
New submission from Alberto Bertogli: TIPC (http://tipc.sf.net) is an open protocol designed for use in clustered computer environments. It currently has an open source implementation for Linux (>= 2.6.16), and VxWorks. The attached patch (against trunk) adds optional Linux-only support for TIPC

[issue1645] Fix socketmodule.c:sock_recvfrom_guts() comment.

2007-12-17 Thread Alberto Bertogli
New submission from Alberto Bertogli: The comment above sock_recvfrom_guts() was copied from sock_recv_guts() and referenced recv() and recv_into() when it should be talking about recvfrom() and recvfrom_into(). The attached patch (against trunk) fixes it. -- components: Library (Lib) f

[issue1644] Patch submission guidelines outdated

2007-12-17 Thread Alberto Bertogli
New submission from Alberto Bertogli: The FAQ section 5.4, "How to submit a patch?", points to http://www.python.org/patches/, which looks really outdated (plus the sf page seems to be restricted to members only). Thanks, Alberto -- components: Documentation messages: 58719 nosy: al

[issue1601] IDLE not working correctly on Windows (Py30a2/IDLE30a1)

2007-12-17 Thread Christian Heimes
Christian Heimes added the comment: Christian Heimes wrote: > Is 0x0500 fine for Windows 2000? Should we add WINVER=0x0500 to the > Python project files, too? http://msdn2.microsoft.com/en-us/library/aa383745.aspx Minimum system required Minimum value for _WIN32_WINNT and WINVER Windows

[issue1601] IDLE not working correctly on Windows (Py30a2/IDLE30a1)

2007-12-17 Thread Christian Heimes
Christian Heimes added the comment: Amaury Forgeot d'Arc wrote: > I found that the huge font in menus is due to an error in the call to > SystemParametersInfo. > Digging more, vc2008 defines WINVER=0x0600, which corresponds to Windows > Vista, and is too high for Windows XP: this value activates

[issue1643] Add group() to itertools

2007-12-17 Thread Kirk McDonald
New submission from Kirk McDonald: One question which is asked with surprising frequency in #python is how to yield multiple objects at a time from an iterable object. That is, given [1, 2, 3, 4, 5, 6], get [(1, 2), (3, 4), (5, 6)]. The "grouper" function in the itertools recipes page provides

[issue1601] IDLE not working correctly on Windows (Py30a2/IDLE30a1)

2007-12-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I found that the huge font in menus is due to an error in the call to SystemParametersInfo. Digging more, vc2008 defines WINVER=0x0600, which corresponds to Windows Vista, and is too high for Windows XP: this value activates the definition of extra fields i

[issue1607] Patch for TCL 8.5 support

2007-12-17 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Good to hear; thanks for the info! __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: h

[issue1607] Patch for TCL 8.5 support

2007-12-17 Thread Christian Heimes
Christian Heimes added the comment: Kurt B. Kaiser wrote: > I do have an XP on multiboot. I'm not very enthusiatic about learning > MS tools; the last time I built Python on W. was with VC5 in the days > when IDLE had a small C extension, later incorporated into Python. If > the Tk 8.5/Tkink

[issue1772673] Replacing char* with const char*

2007-12-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: There was once a rather long discussion about "const" in PyArg_ParseTupleAndKeywords: http://mail.python.org/pipermail/python-dev/2006-February/060689.html If you don't read it to the end, here is the conclusion: """ It sounds like the right answer for Pyt

[issue1621] Do not assume signed integer overflow behavior

2007-12-17 Thread Gregory P. Smith
Gregory P. Smith added the comment: heh if thats the only warning gcc -Wstrict-overflow gives then I've mistitled the bug. Fixed. It'll take some manual code review. Anyone know if the commercial analysis tools we've run the code base through in the past can find these for us? -- tit

[issue1350] IDLE - CallTips enhancement - show full doc-string in new window

2007-12-17 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: Removed file: http://bugs.python.org/file8957/IDLE_CallTips.071214.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-li

[issue1580] Use shorter float repr when possible

2007-12-17 Thread Guido van Rossum
Guido van Rossum added the comment: This is what I was thinking of before, although I'd use "%.16g"%f and "%.17g"%f instead of str(f) and repr(f), and I'd use float() instead of eval(). I suspect that it doesn't satisfy Tim Peters though, because this may depend on a rounding bug in the local pl

[issue1350] IDLE - CallTips enhancement - show full doc-string in new window

2007-12-17 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser: Removed file: http://bugs.python.org/file8958/IDLE_CallTips.071214.incremental.patch __ Tracker <[EMAIL PROTECTED]> __ ___ P

[issue1772673] Replacing char* with const char*

2007-12-17 Thread Gustavo J. A. M. Carneiro
Gustavo J. A. M. Carneiro added the comment: I was about to submit the very same patch :-) I missed PyErr_NewException, but you missed the PyMapping_* methods ;) Please look into this matter. GCC 4.2 has arrived and it has a new warning. The code: char* kwlist[] = { "target", "encoding",

[issue1607] Patch for TCL 8.5 support

2007-12-17 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: I do have an XP on multiboot. I'm not very enthusiatic about learning MS tools; the last time I built Python on W. was with VC5 in the days when IDLE had a small C extension, later incorporated into Python. If the Tk 8.5/Tkinkter problem doesn't get fixed I

[issue1580] Use shorter float repr when possible

2007-12-17 Thread Noam Raphael
Noam Raphael added the comment: Ok, I think I have a solution! We don't really need always the shortest decimal representation. We just want that for most floats which have a nice decimal representation, that representation will be used. Why not do something like that: def newrepr(f): r =

[issue1642] segfault when deleting value member in ctypes types

2007-12-17 Thread Christian Heimes
Changes by Christian Heimes: -- assignee: -> theller nosy: +theller priority: -> normal versions: +Python 2.6, Python 3.0 __ Tracker <[EMAIL PROTECTED]> __ __

[issue1642] segfault when deleting value member in ctypes types

2007-12-17 Thread Carl Friedrich Bolz
New submission from Carl Friedrich Bolz: When trying to delete the .value member of ctypes simple types my python interpreter segfaults: $ python Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type "help", "copyright", "credi

[issue1635] Float patch for inf and nan on Windows (and other platforms)

2007-12-17 Thread Christian Heimes
Christian Heimes added the comment: I'm posting a combined patch for all features at #1640. -- superseder: -> Enhancements for mathmodule __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1635] Float patch for inf and nan on Windows (and other platforms)

2007-12-17 Thread Christian Heimes
Christian Heimes added the comment: Adam Olsen wrote: > You have: > #define Py_NAN Py_HUGE_VAL * 0 > I think this would be safer as: > #define Py_NAN (Py_HUGE_VAL * 0) > > For instance, in code that may do "a / Py_NAN". You are right! Fixed > Those manual string copies (*cp++ = 'n';) are ugly.

[issue1640] Enhancements for mathmodule

2007-12-17 Thread Christian Heimes
Christian Heimes added the comment: Mark Dickinson wrote: > Mark Dickinson added the comment: > > Cool! If there's a move to add functions to the math module, there are > some others that are part of C99 (but not C89), would be good to have, and > that I'd consider more fundamental than the Be

[issue546558] Windows getpass bug

2007-12-17 Thread Joseph Armbruster
Joseph Armbruster added the comment: For the record, I tested this out with: url: http://svn.python.org/projects/python/branches/py3k: rev: 59540 OS Name: Microsoft Windows XP Professional OS Version: 5.1.2600 Service Pack 2 Build 2600 The following snippet appeared to behave as intended (i inp

[issue1609] test_re.py fails

2007-12-17 Thread Guido van Rossum
Guido van Rossum added the comment: Focus on how using --with-wctype-functions changes things and how this could affect the regex implementation. (I wouldn't be surprised if the other failing tests were to to the regex bugs.) __ Tracker <[EMAIL PROTECTED]>

[issue1640] Enhancements for mathmodule

2007-12-17 Thread Adam Olsen
Adam Olsen added the comment: Minor typo. Should be IEEE: "Return the sign of an int, long or float. On platforms with full IEE 754\n\" -- nosy: +rhamphoryncus __ Tracker <[EMAIL PROTECTED]>

[issue1640] Enhancements for mathmodule

2007-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Cool! If there's a move to add functions to the math module, there are some others that are part of C99 (but not C89), would be good to have, and that I'd consider more fundamental than the Bessel, error, gamma functions; for example, the inverse hyperbolic t

[issue1635] Float patch for inf and nan on Windows (and other platforms)

2007-12-17 Thread Adam Olsen
Adam Olsen added the comment: You have: #define Py_NAN Py_HUGE_VAL * 0 I think this would be safer as: #define Py_NAN (Py_HUGE_VAL * 0) For instance, in code that may do "a / Py_NAN". Those manual string copies (*cp++ = 'n';) are ugly. Can't you use strcpy() instead? -- nosy: +rhampho

[issue1722225] Build on QNX 6

2007-12-17 Thread Matt Kraai
Matt Kraai added the comment: I'm not interested in QNX 4, as that's not what I use. I'd be willing to supporting threads on QNX 6. -- title: Build on QNX -> Build on QNX 6 _ Tracker <[EMAIL PROTECTED]> _

[issue1641] asyncore delayed calls feature

2007-12-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola': Added file: http://bugs.python.org/file8977/asyncore.py __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing lis

[issue1641] asyncore delayed calls feature

2007-12-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola': Added file: http://bugs.python.org/file8976/patch.diff __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1641] asyncore delayed calls feature

2007-12-17 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': Hi, I post this message here in the hope someone using asyncore could review this. Since the thing I miss mostly in asyncore is a system for calling a function after a certain amount of time, I spent the last 3 days trying to implement this with the hopes th

[issue1640] Enhancements for mathmodule

2007-12-17 Thread Christian Heimes
Changes by Christian Heimes: -- dependencies: +Float patch for inf and nan on Windows (and other platforms) __ Tracker <[EMAIL PROTECTED]> __ __

[issue1640] Enhancements for mathmodule

2007-12-17 Thread Christian Heimes
New submission from Christian Heimes: The patch adds several small enhancements to the math module and pyport.h. * Py_MATH_PI and Py_MATH_E in long double precision * Py_IS_NAN and Py_IS_INFINITY use isnan() and isinf() functions were available (checked by configure) * isnan and isinf for the ma

[issue1639] Low ascii 12 characters found in source.

2007-12-17 Thread Christian Heimes
Changes by Christian Heimes: -- resolution: -> wont fix status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing l

[issue1639] Low ascii 12 characters found in source.

2007-12-17 Thread Joseph Armbruster
Joseph Armbruster added the comment: I apparently missed this one. Disregard this issue. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing

[issue1639] Low ascii 12 characters found in source.

2007-12-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: In pep8 there is: """ Python accepts the control-L (i.e. ^L) form feed character as whitespace; Many tools treat these characters as page separators, so you may use them to separate pages of related sections of your file. """ Why do you want to remove them

[issue1600] str.format() produces different output on different platforms (Py30a2)

2007-12-17 Thread Christian Heimes
Christian Heimes added the comment: Hi Mark! In general the patch is fine but it has some small issues. * Your patches are all reversed. They remove (-) the new lines instead of adding (+) them. Why aren't you using svn diff > file.patch? * You are mixing tabs with spaces. All 2.6 C files and m

[issue1639] Low ascii 12 characters found in source.

2007-12-17 Thread Joseph Armbruster
Joseph Armbruster added the comment: url: http://svn.python.org/projects/python/trunk rev: 59539 files: stringobject.c Added file: http://bugs.python.org/file8974/ascii12sPyTrunk.patch __ Tracker <[EMAIL PROTECTED]> __

[issue1639] Low ascii 12 characters found in source.

2007-12-17 Thread Joseph Armbruster
New submission from Joseph Armbruster: There were various files in the source tree that contained low ascii 12 characters throughout. The list includes: url: http://svn.python.org/projects/python/branches/py3k rev: 59539 files: _ctypes.c cfield.c _tkinter.c stringobject.c -- co

[issue1623] Implement PEP-3141 for Decimal

2007-12-17 Thread Mark Dickinson
Mark Dickinson added the comment: Cool! Works for me. I agree that it's not 100% clear that round(large_decimal) should return an integer rather than raising an exception. But, rightly or wrongly, this is what int(large_decimal) does at the moment, and it would be surprising to have int an

[issue1600] str.format() produces different output on different platforms (Py30a2)

2007-12-17 Thread Mark Summerfield
Mark Summerfield added the comment: My C is rusty! Attached is new pystrtod.c & diff, this time using memset() instead of looping to padd with zeros. Added file: http://bugs.python.org/file8971/pystrtod.c Added file: http://bugs.python.org/file8972/pystrtod.diff

[issue1632] email cannot be imported

2007-12-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: But the email package does not import smtplib (the dependency is the other way). Can you please try with the command: import email and paste the whole traceback? -- nosy: +amaury.forgeotdarc __ Tracker <[EMAIL PRO

[issue1600] str.format() produces different output on different platforms (Py30a2)

2007-12-17 Thread Mark Summerfield
Mark Summerfield added the comment: Attached is new version of test_float.py with a few tests to check str.format() with exponents formats, plus a diff. They test that the exponent is always 3 digits and that the case of the e in the format is respected. Added file: http://bugs.python.org/file89