[issue2840] Expat parser locks XML source file if ContentHandler raises an exception

2008-05-12 Thread Craig Holmquist

New submission from Craig Holmquist <[EMAIL PROTECTED]>:

This was observed in Python 2.5.2 on Windows XP.  Run this code in IDLE:

import xml.sax
from xml.sax.handler import ContentHandler
class C(ContentHandler):
def startElement(self, name, attrs):
assert False

xml.sax.parse(xml_path, C())

Where "xml_path" points to a well-formed XML file.  This will raise an
AssertionError.  Then, attempt to modify or delete the XML file that was
specified; it's still locked by the Python process.

Deleting the ContentHandler does not unlock it.  There doesn't seem any
way to unlock it aside from terminating the Python process.

If the ContentHandler doesn't raise an exception or error, the file is
unlocked properly.

--
components: XML
messages: 66754
nosy: craigneuro
severity: normal
status: open
title: Expat parser locks XML source file if ContentHandler raises an exception
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2819] Full precision summation

2008-05-12 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

There may be another reason to use a single summation function.  The 
summation functions does need (a copy of) the is_error() function from 
the math module.

The cmath module has a similar function called math_error() which 
slightly different from is_error().

It would be better, more consistent if both modules used the same 
function, say is_error() moved** to file Object/floatobject.c

Then, the math and cmath module can use ist_error() instead of each 
their own.  Also, the summation function can use it and function 
float_pow() in floatobject.c could.

/Jean Brouwers

**) and renamed to e.g. float_error().

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2839] Moving lib-tk to tkinter package

2008-05-12 Thread Guilherme Polo

Guilherme Polo <[EMAIL PROTECTED]> added the comment:

I've talked with Brett and we agreed on a plan slightly different from
the one described in PEP 3108, which seems to be better for tkinter.

The first step would be creating a tkinter package and then moving each
file in lib-tk to this new directory, correcting imports and the case
and renaming Tkinter.py to __init__.py so the directory is marked as a
package.

After this step I can proceed with more patches, including stub modules,
tests in test_py3kwarn and continue with the rest of the plan.

I'm attaching two files I've used to do this first step. One is a .py
file, which will do the proper renamings and then there is a patch which
should be applied to fix imports inside the tkinter package.

Added file: http://bugs.python.org/file10309/tkinter_package.py

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2839] Moving lib-tk to tkinter package

2008-05-12 Thread Guilherme Polo

Changes by Guilherme Polo <[EMAIL PROTECTED]>:


--
keywords: +patch
Added file: http://bugs.python.org/file10310/tkinter_imports.diff

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)

2008-05-12 Thread Terry J. Reedy

New submission from Terry J. Reedy <[EMAIL PROTECTED]>:

Specific instance: I edit a file with IDLE, hit F5, and Windows pops up
a box with a white X in a red circle followed by "Runtime Error!" and an
explanation that the application requested to be closed in an 'unusual'
way.  

Clicking OK on that bring up a similar box. For the current incident,
this has title "t1.py - C:\Program Files\Python30\misc\t1.py:
pythonw.exe - Application Error" and contents "The exception unknown
software exception (0x4015) occurred in the application at location
0x00d88cef.  Click on OK to terminate the program"

This has happened about three times in the last week since installing
a5. I am not sure if it happened before but it is only occasional (1 in
20 runs?) and I did not use a4 much.  It is possible that this only
happens after sleep or hibernation -- I will watch more carefully.  I
only run pythonw as a side-effect of running IDLE, so I do not know if
that is necessary or not.

As previously, when I reopened IDLE and the the file and ran it
unchanged, I got the appropriate output in the Shell window, as if
nothing were ever amiss.

--
messages: 66757
nosy: tjreedy
severity: normal
status: open
title: Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)

2008-05-12 Thread Terry J. Reedy

Changes by Terry J. Reedy <[EMAIL PROTECTED]>:


--
type:  -> crash

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2842] Dictionary methods: inconsistency

2008-05-12 Thread Chester

New submission from Chester <[EMAIL PROTECTED]>:

Names of dictionary methods are not consistent with Python's coding
style. Please fix the following method names:

1) fixdeepcopyto be  deep_copy
2) fixfromkeysto be  from_keys
3) fixpopitem to be  pop_item
4) fixsetdefault  to be  set_default

Please consider of renaming the method copy to shallow_copy. If you find
any other inconsistently named method, please fix it. Thank you.

--
messages: 66758
nosy: aaronsw, admin, akuchling, anonymous, barry, chester, doerwalter, effbot, 
fdrake, gvanrossum, jhylton, lemburg, loewis, memaul, mhammond, moshez, mpmak, 
mwh, nobody, ping, sjoerd, skip.montanaro, tim_one, tmick, twouters, viznut
severity: normal
status: open
title: Dictionary methods: inconsistency
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2842] Dictionary methods: inconsistency

2008-05-12 Thread Fredrik Lundh

Fredrik Lundh <[EMAIL PROTECTED]> added the comment:

Eh?  Why did you add *everyone* involved the project to the nosy list?

(I'll leave explaining why breaking almost all Python programs in the
name of "consistency" is an absurd idea to someone else).

--
nosy:  -aaronsw, admin, akuchling, anonymous, barry, chester, doerwalter, 
fdrake, gvanrossum, jhylton, lemburg, loewis, memaul, mhammond, moshez, mpmak, 
mwh, nobody, ping, sjoerd, skip.montanaro, tim_one, tmick, twouters, viznut

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2842] Dictionary methods: inconsistency

2008-05-12 Thread Fredrik Lundh

Changes by Fredrik Lundh <[EMAIL PROTECTED]>:


--
nosy:  -effbot

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2628] ftplib Persistent data connection

2008-05-12 Thread Jonathan

Changes by Jonathan <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file10311/ftplib.py.blockmode.patch.2

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2628] ftplib Persistent data connection

2008-05-12 Thread Jonathan

Changes by Jonathan <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file10312/ftplib.rst.blockmode.patch

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2842] Dictionary methods: inconsistency

2008-05-12 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Rejecting as "invalid". If you somehow still think something should
change, please discuss that on the py3k list.

--
nosy: +chester, loewis
resolution:  -> invalid
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2842] Dictionary methods: inconsistency

2008-05-12 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Chester, this is your last warning.  One more submission like this and
we will ban you from submitting new bug reports.  You have to learn how
to use the bug tracker properly if you don't want to be ignored completely.

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2628] ftplib Persistent data connection

2008-05-12 Thread Jonathan

Jonathan <[EMAIL PROTECTED]> added the comment:

I've attached two new files. The first swaps the array.array usage for
struct.unpack. The second simply modifies the rst documentation.

I'm not sure how we'd do any tests for FTP without making use of an
actual server. In a quick check of servers, MadGoat (for OpenVMS) was
the only BLOCK-supporting server I found; neither vsftpd nor proftpd
support BLOCK. (I didn't check wuftpd.) Sadly, I've no publicly
accessible servers available to me for others to test against.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2820] Remove mac modules

2008-05-12 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Done! See r63187 and 63190. It sure was fun merging the Bazaar branch
into Subversion, though. :(

--
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2819] Full precision summation

2008-05-12 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

Rather keep it in mathmodule.c, not floatobject.c.
We should keep extension code out of the core types.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2837] OpenID wannabe

2008-05-12 Thread anatoly techtonik

anatoly techtonik <[EMAIL PROTECTED]> added the comment:

What kind of registered users are available? I thought this site uses
single sign on system.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2820] Remove mac modules

2008-05-12 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

First, thanks for doing this, Benjamin!

Second, can the plat-darwin directory go as well?

Third, can you get rid of the --disable--toolbox-glue flag for 
configure.in (and any other relevant removals) and Makefile.pre.in 
cleanup?  If you don't have time just let me know.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1767370] Make xmlrpc use HTTP/1.1 and keepalive

2008-05-12 Thread Martín Conte Mac Donell

Martín Conte Mac Donell <[EMAIL PROTECTED]> added the comment:

I made this patch works against trunk, also i'v fixed some typos.

--
nosy: +Reflejo
versions: +Python 2.5
Added file: http://bugs.python.org/file10313/xmlrpc-keepalive.diff

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2843] New methods for existing Tkinter widgets

2008-05-12 Thread Guilherme Polo

New submission from Guilherme Polo <[EMAIL PROTECTED]>:

Attached patch adds the following new methods:

Misc: grid_anchor
Menu: xposition
Text: count, peer_create, peer_names, replace
Wm: wm_iconphoto, wm_manage, wm_forget

These are supported by Tk 8.5 and newer.

--
components: Tkinter
files: tk8.5_newmeths.py
messages: 66768
nosy: gpolo
severity: normal
status: open
title: New methods for existing Tkinter widgets
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file10314/tk8.5_newmeths.py

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2837] OpenID wannabe

2008-05-12 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

I don't understand your question. What is "this site" that you are
referring to, and why do you think it uses a single sign-on system?

--
status: pending -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)

2008-05-12 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

Hibernation, sleep, or screen saver is not required though process may
have been swapped to disk.  Exception and location are reproducible. 
This time I get IDLE Subprocess Startup Error on retry.  Will reboot.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1767370] Make xmlrpc use HTTP/1.1 and keepalive

2008-05-12 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

I'm not going to pretend I understand the changes.  I do notice
that test_docxmlrpc hangs hard on my Mac (doesn't even respond to
Ctl-C).  DocXMLRPCServer subclasses from SimpleXMLRPCServer, so I
suspect it needs some attention.  I tried the obvious replacement
of self.wfile.* with the analogs from SimpleXMLRPCServer but that
didn't help.  Also, the API for the xmlrpclib.Transport class's
send_request method changed and parse_response disappeared completely
even though the docstring for the Transport class explicitly mentions
subclassing it.

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2778] set_swap_bodies is unsafe

2008-05-12 Thread Adam Olsen

Adam Olsen <[EMAIL PROTECTED]> added the comment:

Here's another approach to avoiding set_swap_bodies.  The existing
semantics are retained.  Rather than creating a temporary frozenset and
swapping the contents, I check for a set and call the internal hash
function directly (bypassing PyObject_Hash).

I even retain the current semantics of PySet_Discard and PySet_Contains,
which do NOT do the implicit conversion (and have unit tests to verify
that!)

I do have some concern that calling PySet_Check on every call may be too
slow.  It may be better to only call it on failure (which is
more-or-less what the old code did.)

set_swap_bodies has only one remaining caller, and their use case could
probably be significantly simplified.

Added file: http://bugs.python.org/file10315/python-setswap-2.diff

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2841] Windows: "Runtime Error!" crash from pythonw.exe (3.0a5)

2008-05-12 Thread Terry J. Reedy

Terry J. Reedy <[EMAIL PROTECTED]> added the comment:

AFter reboot, IDLE started, loaded the program I tried to run
previously, and ran it several times.  I closed the edit window and when
I closed the shell window, got same message.  The first box is titled
Microsoft Visual C++ Runtime Library.  After listing ...pythonw.exe, it says

"This program has asked the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information."

This time there is no second red-circle-X box but a Send Error Report to
Microsoft box.  That leads to Error Signature
AppName: pythonw.exe AppVer: 0.0.0.0 ModName: tcl84.dll
ModVer: 8.4.2.16 Offset: 00058cef

More testing: If I open the shell and do stuff interactively and close,
it closes ok as far as I have tested.  If I open the shell and an edit
window and close both, either order, even without running anything, then
it crashes on the second close.  I tried more than one file with the
same result.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2831] Adding start to enumerate()

2008-05-12 Thread Raymond Hettinger

Raymond Hettinger <[EMAIL PROTECTED]> added the comment:

FWIW, at one point, Guido rejected all variants of the idea.  His first 
objection was that enumerate() is all about pairing values with 
sequence indices, so starting from anything other than zero is in 
conflict with the core concept.  His second objection is that all 
variants can easily be misread as starting at the nth item in the 
sequence (much like islice() does now):   enumerate(3, 'abcdefg') --> 
(3,'d') (4,'e') (5, 'f') (6, 'g').  The latter mis-reading becomes more 
likely for those who think of enumerate as providing indices.  In fact, 
one of the suggested names for enumerate was "indices".

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2833] __exit__ silences the active exception

2008-05-12 Thread Dmitry Dvoinikov

New submission from Dmitry Dvoinikov <[EMAIL PROTECTED]>:

If a context manager is used within exception handling block, the active
exception is silenced after the context block completes and __exit__ exits.

try:
raise Exception("foo")
except:
with SomeContextManager():
pass
raise # in Py2.5 throws 'foo', in Py3.0 fails with RuntimeError

--
components: Interpreter Core
messages: 66713
nosy: ddvoinikov
severity: normal
status: open
title: __exit__ silences the active exception
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2809] string docstring doesn't mention that ' '.split() != ' '.split(' ')

2008-05-12 Thread David Fraser

David Fraser <[EMAIL PROTECTED]> added the comment:

Yes that's fantastic, thanks :-)

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-05-12 Thread Sven Siegmund

New submission from Sven Siegmund <[EMAIL PROTECTED]>:

re cannot ignore case of special latin characters:

Python 3.0a5 (py3k:62932M, May  9 2008, 16:23:11) [MSC v.1500 32 bit 
(Intel)] on win32
>>> 'Á'.lower() == 'á' and 'á'.upper() == 'Á'
True
>>> import re
>>> rx = re.compile('Á', re.IGNORECASE)
>>> rx.match('á') # should match but won't
>>> rx.match('Á') # will match
<_sre.SRE_Match object at 0x014B08A8>
>>> rx = re.compile('á', re.IGNORECASE)
>>> rx.match('Á') # should match but won't
>>> rx.match('á') # will match
<_sre.SRE_Match object at 0x014B08A8>

--
components: Regular Expressions
messages: 66715
nosy: sven.siegmund
severity: normal
status: open
title: re.IGNORECASE not Unicode-ready
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2835] Py30a5: webbrowser.open() inf recursion

2008-05-12 Thread Mark Summerfield

New submission from Mark Summerfield <[EMAIL PROTECTED]>:

There appears to be an infinite recursion in Py30a5 (doing the same
thing in Py2.5.1 works fine):

Python 3.0a5 (r30a5:62856, May  9 2008, 11:23:06) 
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "copyright", "credits" or "license()" for more information.
IDLE 3.0a5
>>> import webbrowser
>>> url = "http://www.python.org";
>>> webbrowser.open(url)
Traceback (most recent call last):
  File "", line 1, in 
webbrowser.open(url)
  File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line 61,
in open
if browser.open(url, new, autoraise):
  File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line
350, in open
devnull = open(os.devnull, "r+")
  File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line 61,
in open
if browser.open(url, new, autoraise):
  File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line
350, in open
...
devnull = open(os.devnull, "r+")
  File "/home/mark/opt/python30a5/lib/python3.0/webbrowser.py", line 61,
in open
if browser.open(url, new, autoraise):

--
components: Library (Lib)
messages: 66716
nosy: mark
severity: normal
status: open
title: Py30a5: webbrowser.open() inf recursion
type: behavior
versions: Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2836] str.format() documentation needs to be backported to 2.6

2008-05-12 Thread Eric Smith

New submission from Eric Smith <[EMAIL PROTECTED]>:

3.0 has documentation for str.format(), but that documentation is
missing in 2.6.  The 2.6 what's new document:
http://docs.python.org/dev/whatsnew/2.6.html also has an XXX reference
to this: 
"Consult the 2.6 documentation for a complete list (XXX add link, once
it’s in the 2.6 docs), but here’s a sample:"

--
assignee: georg.brandl
components: Documentation
keywords: 26backport
messages: 66717
nosy: eric.smith, georg.brandl
priority: high
severity: normal
status: open
title: str.format() documentation needs to be backported to 2.6
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2836] str.format() documentation needs to be backported to 2.6

2008-05-12 Thread Eric Smith

Eric Smith <[EMAIL PROTECTED]> added the comment:

When backporting to 2.6, this needs to be documented for both str and
unicode.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1858] Make .pypirc handle multiple servers

2008-05-12 Thread Tarek Ziadé

Tarek Ziadé <[EMAIL PROTECTED]> added the comment:

Thanks for the integration work !

I was wondering: since it superseeds two bugs (issue1741, issue2166)
that where marked to be backported in 2.5.x, should I write 2.5 specific 
patches for those particular fixes ? (windows paths related issues)

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2798] Crash on non-Windows if Python runs from a non-ASCII directory

2008-05-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Committed as r63161, with tests.
Thanks!

Now let's work on the Windows case...

--
nosy: +amaury.forgeotdarc
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2835] Py30a5: webbrowser.open() inf recursion

2008-05-12 Thread Guilherme Polo

Guilherme Polo <[EMAIL PROTECTED]> added the comment:

It doesn't happen here, I'm using Linux too (Ubuntu 8.04) and py3k rev 63074

--
nosy: +gpolo
versions: +Python 2.6 -Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2835] Py30a5: webbrowser.open() inf recursion

2008-05-12 Thread Mark Summerfield

Mark Summerfield <[EMAIL PROTECTED]> added the comment:

I get the same bug on Fedora 8 (Python build 63161) and Kubuntu 8
(official Py30a5 release)---but not on Windows XP Home where the URL is
opened correctly.

Python 3.0a5+ (py3k:60668:63161, May 12 2008, 14:46:40)
[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> webbrowser.open("http://www.python.org";)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/mark/pycore/30/Lib/webbrowser.py", line 61, in open
if browser.open(url, new, autoraise):


Python 3.0a5 (r30a5:62856, May  9 2008, 11:27:40) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "copyright", "credits" or "license()" for more information.
IDLE 3.0a5  
>>> import webbrowser
>>> webbrowser.open("http://www.python.org";)
Traceback (most recent call last):
  File "", line 1, in 
webbrowser.open("http://www.python.org";)
...

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2835] Py30a5: webbrowser.open() inf recursion

2008-05-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

The traceback suggest a problem when using KDE: a call to file() was
renamed to open(), this clashes with webbrowser.open().
Can you try the following patch:

Index: Lib/webbrowser.py
===
--- Lib/webbrowser.py   (revision 63159)
+++ Lib/webbrowser.py   (working copy)
@@ -347,7 +347,8 @@
 else:
 action = "openURL"

-devnull = open(os.devnull, "r+")
+import io
+devnull = io.open(os.devnull, "r+")
 # if possible, put browser in separate process group, so
 # keyboard interrupts don't affect browser as well as Python
 setsid = getattr(os, 'setsid', None)

--
nosy: +amaury.forgeotdarc

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2833] __exit__ silences the active exception

2008-05-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

This problem was introduced by r62847.

--
nosy: +amaury.forgeotdarc

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2835] Py30a5: webbrowser.open() inf recursion

2008-05-12 Thread Mark Summerfield

Mark Summerfield <[EMAIL PROTECTED]> added the comment:

On 2008-05-12, Amaury Forgeot d'Arc wrote:
> Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:
>
> The traceback suggest a problem when using KDE: a call to file() was
> renamed to open(), this clashes with webbrowser.open().
> Can you try the following patch:
>
> Index: Lib/webbrowser.py
> ===
> --- Lib/webbrowser.py   (revision 63159)
> +++ Lib/webbrowser.py   (working copy)
> @@ -347,7 +347,8 @@
>  else:
>  action = "openURL"
>
> -devnull = open(os.devnull, "r+")
> +import io
> +devnull = io.open(os.devnull, "r+")
>  # if possible, put browser in separate process group, so
>  # keyboard interrupts don't affect browser as well as Python
>  setsid = getattr(os, 'setsid', None)

That fixed it!

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2835] Py30a5: webbrowser.open() inf recursion

2008-05-12 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

Corrected as r63163.

--
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2834] re.IGNORECASE not Unicode-ready

2008-05-12 Thread Guido van Rossum

Guido van Rossum <[EMAIL PROTECTED]> added the comment:

Try adding re.LOCALE to the flags.  I'm not sure why that is needed but
it seems to fix this issue.

I still think this is a legitimate bug though.

--
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2824] zipfile to handle duplicate files in archive

2008-05-12 Thread anatoly techtonik

anatoly techtonik <[EMAIL PROTECTED]> added the comment:

How about adding optional "replace=True" attribute to the write method?
So that people who are not aware enough to adjust the code and handle
new warning could still get valid archives.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2837] OpenID wannabe

2008-05-12 Thread anatoly techtonik

New submission from anatoly techtonik <[EMAIL PROTECTED]>:

I haven't found any traces of requests to add OpenID URLs for
authentication into account details for registered users, so I take the
privilege to be the first one to say that it will be handy.

--
components: None
messages: 66729
nosy: techtonik
severity: normal
status: open
title: OpenID wannabe

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2837] OpenID wannabe

2008-05-12 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

If you are talking about tracker users, please report that to the meta
tracker (see Report Tracker Problem to the left):

http://psf.upfronthosting.co.za/roundup/meta

If you are talking about other kinds of registered users, please be more
explicit.

In any case, contributions are welcome; if this is referring to this bug
tracker, you should best contact the roundup mailing lists (and again be
prepared to provide patches).

--
nosy: +loewis
resolution:  -> invalid
status: open -> pending

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1649238] potential clash with C++ in ceval.h

2008-05-12 Thread thechao

thechao <[EMAIL PROTECTED]> added the comment:

This bug has been resolved. The new C++ keyword has been changed from
"where" to "requires". I will go look for requires. I can either add
other potential collisions here, or start a new bug. Other potential
problems are "typedecl" and "constexpr".

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1649238] potential clash with C++ in ceval.h

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Okay, I'm closing this one. If you find further clashes, feel free to
open a new bug. Thanks for the update!

--
resolution:  -> works for me
status: open -> closed

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2821] unittest.py sys.exit error

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This is an IDLE problem then.

--
assignee:  -> kbk
components: +IDLE -Library (Lib)
nosy: +kbk

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2819] Full precision summation

2008-05-12 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

Mark,
Thank you very much for your comments.  Here is my initial response to the
first 3.

(1) Attached is an attempt to address the 1st issue (just the
mathmodule). The macros PyFPE_START_PROTECT/_END_PROTECT have been moved
outside the main loop and the errno is set following the IEEE 754 rules as
you suggested.

One related issue is testing these, how can a NaN and +/-Infinity float
object be created in Python?

(2) On your 2nd comment, supporting non-IEEE floating point, perhaps the
Kahan method should be used in that case.  If so, the next question is how
to detect that?  There are two symbols in pyconfig.h HAVE_IEEEFP_H and
HAVE_LIBIEEE.  Are those the proper ones to determine IEEE floating point
support?

(3) On the 3rd comment, Raymond and I did discus using a single function to
be called by the math and cmath modules.  The question is where should that
function reside?  The math and cmath modules are not the right place since
both are loadable modules.  It will have to be somewhere inside the Python
main/core.

Also, depending on the implementation of that function, it may require
iterating the complex sequence twice.  And that will force the C complex
numbers to be created twice by the PyComplex_AsCComplex() call.  Would that
be a concern?

/Jean Brouwers

On Sun, May 11, 2008 at 1:49 PM, Mark Dickinson <[EMAIL PROTECTED]>
wrote:

>
> Mark Dickinson <[EMAIL PROTECTED]> added the comment:
>
> One more question:
>
> What are the use cases for an exact summation algorithm?  That is, in what
> situations does one care about exactness rather than simply accuracy?  I
> know that loss of accuracy is a problem in things like numeric integration
> routines, but something like Kahan summation (faster and simpler, but not
> exact) usually takes care of that.
>
> __
> Tracker <[EMAIL PROTECTED]>
> 
> __
>

Added file: http://bugs.python.org/file10306/unnamed
Added file: http://bugs.python.org/file10307/mathmodule.c.2.6a3.take2.diff

__
Tracker <[EMAIL PROTECTED]>

__Mark,Thank you very much for your comments.  Here is 
my initial response to the first 3.(1) 
Attached is an attempt to address the 1st issue (just the mathmodule). The 
macros PyFPE_START_PROTECT/_END_PROTECT have been moved outside the main loop 
and the errno is set following the IEEE 754 rules as you 
suggested.
One related issue is testing these, how can a NaN and 
+/-Infinity float object be created in 
Python?(2) On your 2nd comment, 
supporting non-IEEE floating point, perhaps the Kahan method should be used in 
that case.  If so, the next question is how to detect that?  There 
are two symbols in pyconfig.h HAVE_IEEEFP_H and HAVE_LIBIEEE.  Are those 
the proper ones to determine IEEE floating point support?
(3) On the 3rd comment, Raymond and I did 
discus using a single function to be called by the math and cmath modules. 
 The question is where should that function reside?  The math and 
cmath modules are not the right place since both are loadable modules.  It 
will have to be somewhere inside the Python main/core.
Also, depending on the implementation of that function, it 
may require iterating the complex sequence twice.  And that will force the 
C complex numbers to be created twice by the PyComplex_AsCComplex() call. 
 Would that be a concern?
/Jean 
Brouwers On Sun, May 11, 2008 at 1:49 PM, Mark Dickinson [EMAIL PROTECTED]> wrote:

Mark Dickinson [EMAIL PROTECTED]> 
added the comment:

One more question:

What are the use cases for an exact summation algorithm?  That is, in 
what
situations does one care about exactness rather than simply accuracy? 
 I
know that loss of accuracy is a problem in things like numeric integration
routines, but something like Kahan summation (faster and simpler, but not
exact) usually takes care of that.

__
Tracker [EMAIL PROTECTED]>
http://bugs.python.org/issue2819>
__

--- Python-2.6a3/Modules/mathmoduleORIG.c   2008-04-20 18:55:50.0 
-0700
+++ Python-2.6a3/Modules/mathmodule.c   2008-05-12 08:51:15.0 -0700
@@ -307,6 +307,186 @@
 FUNC1(tanh, tanh, 0,
   "tanh(x)\n\nReturn the hyperbolic tangent of x.")
 
+/* Summation function as function msum() in this Python recipe
+   
+
+   def msum(iterable):
+   "Full precision summation using multiple floats for intermediate values"
+
+   # Rounded x+y stored in hi with the round-off stored in lo.  Together
+   # hi+lo are exactly equal to x+y.  The inner loop applies hi/lo 
summation
+   # to each partial so that t

[issue1712742] pprint handles depth argument incorrectly

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Closing as dupe of the patch issue.

--
nosy: +georg.brandl
resolution:  -> duplicate
status: open -> closed
superseder:  -> fix for 1712742: corrects pprint's handling of 'depth'

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1713041] fix for 1712742: corrects pprint's handling of 'depth'

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Okay, thank you all! Committed patch as r63164.

--
resolution:  -> accepted
status: open -> closed

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2836] str.format() documentation needs to be backported to 2.6

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Okay, backported (mostly copied) the docs, and added the whatsnew link,
in r63166.

--
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2815] Python Manuals: horizontal scrolling broken

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

I added "overflow: auto" to the stylesheet for  tags in r63167;
this should give individual scrollbars for code samples not fitting the
page width.

--
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2770] Subversion 1.5 Working Copies Break Setuptools

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

This is now tracked in http://bugs.python.org/setuptools/issue4.

--
nosy: +georg.brandl
resolution:  -> duplicate
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2766] Doubtfull code in 'doctest.DocTestSuite'

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Thanks, the assignment to "globs" is indeed not necessary. Removed in
r63173.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2767] "doctest.DocTestCase.debug" clears "test.globs" too early

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Thanks, fixed in r63174.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2758] arg 2 of PyErr_SetFromErrnoWithFilename should be const

2008-05-12 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
assignee:  -> loewis
nosy: +loewis

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2243] urllib2. strange behavior for getting chuncked transfer-ecnoded data

2008-05-12 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
status: pending -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1749567] PLATFORM macro in PC/pyconfig.h already defined by Apache

2008-05-12 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
status: pending -> closed

_
Tracker <[EMAIL PROTECTED]>

_
___
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

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Closed #2077 as a duplicate.

--
nosy: +georg.brandl

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2077] Interpreter crash on shutdown

2008-05-12 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
status: pending -> closed
superseder:  -> shutdown (exit) can hang or segfault with daemon threads running

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1732367] Document the constants in the socket module

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Is there progress on this?

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1760] PEP 341 is not reflected in the documentation

2008-05-12 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Should be fixed now with r63175.

--
resolution:  -> fixed
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2819] Full precision summation

2008-05-12 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

My apologies for the messy post.  I replied to the email instead of 
posting my response.

/Jean Brouwers

PS) Attached is *an* example of the math_sum() and cmath_sum() functions 
using the same, shared function float_sum().  Perhaps, that resides in 
Objects/floatobject.c?

Added file: http://bugs.python.org/file10308/floatsum.c

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2838] Verify callback for SSL

2008-05-12 Thread Ruben Kerkhof

New submission from Ruben Kerkhof <[EMAIL PROTECTED]>:

I've been playing with the new SSL module, and so far it works great.

However, when using it to connect to a host with a self signed
certificate, verification fails when I specify ssl.CERT_REQUIRED (as
expected).

I know that I'm connecting to a host with a self signed certificate, so
I want to be able to ignore that error. At the moment, the only option I
see is to specify ssl.CERT_NONE and verify the DER certificate by hand.

It would be great if I could specify a callback function that can ignore
certain errors, and does additional checking.

--
components: Library (Lib)
messages: 66746
nosy: ruben
severity: normal
status: open
title: Verify callback for SSL
type: feature request
versions: Python 2.6

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2839] Moving lib-tk to tkinter package

2008-05-12 Thread Guilherme Polo

New submission from Guilherme Polo <[EMAIL PROTECTED]>:

I'm moving lib-tk to a tkinter package, I've sent a patch for this which
can be found at issue 2775 but I started wrong (did a patch against py3k
directly).

--
components: Library (Lib)
messages: 66747
nosy: gpolo
severity: normal
status: open
title: Moving lib-tk to tkinter package
versions: Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2775] Implement PEP 3108

2008-05-12 Thread Guilherme Polo

Changes by Guilherme Polo <[EMAIL PROTECTED]>:


--
dependencies: +Moving lib-tk to tkinter package

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2821] unittest.py sys.exit error

2008-05-12 Thread Adam Getchell

Adam Getchell <[EMAIL PROTECTED]> added the comment:

Agreed.

C:\Projects\Python>python randomunittest.py
...
--
Ran 3 tests in 0.003s

OK

C:\Projects\Python>

> -Original Message-
> From: Georg Brandl [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 12, 2008 9:22 AM
> To: Getchell, Adam
> Subject: [issue2821] unittest.py sys.exit error
>
>
> Georg Brandl <[EMAIL PROTECTED]> added the comment:
>
> This is an IDLE problem then.
>
> --
> assignee:  -> kbk
> components: +IDLE -Library (Lib)
> nosy: +kbk
>
> __
> Tracker <[EMAIL PROTECTED]>
> 
> __

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2819] Full precision summation

2008-05-12 Thread Mark Dickinson

Mark Dickinson <[EMAIL PROTECTED]> added the comment:

> One related issue is testing these, how can a NaN and +/-Infinity 
> float object be created in Python?

In 2.6 and 3.0 (but not 2.5 and older), float('nan'), float('inf') and 
float('-inf') should all work reliably across platforms (or at least 
those platforms that support infs and nans).  If they don't it's a bug.

> (2) On your 2nd comment, supporting non-IEEE floating point, perhaps
> the Kahan method should be used in that case.  If so, the next
> question is how to detect that?

Actually, I think you could probably just leave the algorithm exactly as 
it is, but put a warning in the documentation that the exactness only 
applies in the presence of IEEE 754 semantics.  Practically everybody's 
on an IEEE 754 platform anyway.

> There are two symbols in pyconfig.h HAVE_IEEEFP_H and
> HAVE_LIBIEEE.  Are those the proper ones to determine IEEE floating
> point support?

I'm not sure that either of these is the right thing.  Neither is 
defined on my MacBook, for example.

> (3) On the 3rd comment, Raymond and I did discus using a single 
> function to be called by the math and cmath modules.

I think you're right that it's easier to just duplicate the code.
It's a nice feature that this function only has to pass once through the 
data, and it doesn't seem worth losing that to save a little bit of code 
duplication.

I still wonder whether there's a way to avoid incorrectly signaling 
overflow in the case where the result is finite. (e.g. sum([1e308, 
1e308, -1e308])).

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2819] Full precision summation

2008-05-12 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

It turns out, float('nan') creates a Nan and float('[+|-]inf') creates a 
[signed] Infinity object.  That answers my earlier question.

/Jean Brouwers

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1732367] Document the constants in the socket module

2008-05-12 Thread Giampaolo Rodola'

Giampaolo Rodola' <[EMAIL PROTECTED]> added the comment:

Yes, having a subsection describing such things would be a cool idea.
Please don't leave behind this ticket.

--
nosy: +giampaolo.rodola

_
Tracker <[EMAIL PROTECTED]>

_
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2054] add ftp-tls support to ftplib - RFC 4217

2008-05-12 Thread Giampaolo Rodola'

Giampaolo Rodola' <[EMAIL PROTECTED]> added the comment:

Bill, are there news about the fix to httplib?
I'd like to see this feature included in 2.6 if possible.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2819] Full precision summation

2008-05-12 Thread Jean Brouwers

Jean Brouwers <[EMAIL PROTECTED]> added the comment:

The current results are quite "interesting"

>>> math.sum([1e308, 1e308, -1e308])
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: math range error

>>> math.sum([1e308, -1e308, 1e308])
1e+308


Handling this case would require holding the finite, prior sum at an 
intermediate overflow in a separate array, say overflows.  Then, add the 
partials which may create additional overflows.  Finally, keep adding 
the overflows (accurately?) until none remain or until none can be added 
without overflow.

/Jean Brouwers

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com