[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Erick Tryzelaar

New submission from Erick Tryzelaar:

I was playing around with python 3's io functions, and I found that when trying 
to write to 
an encoded utf-16 file that TextIOWrapper.write re-writes the utf-16 bom for 
every string:

>>> f=open('foo', 'w', encoding='utf-16')
>>> print('1234', file=f)
>>> print('5678', file=f)
>>> open('foo', 'rb').read()
b'\xff\xfe1\x002\x003\x004\x00\xff\xfe\n\x00\xff\xfe5\x006\x007\x008\x00\xff\xfe\n\x00'
>>> open('foo', 'r', encoding='utf-16').read()
'1234\ufeff\n\ufeff5678\ufeff\n'
>>> 

With the attached patch, it appears to generate the correct file:

>>> f=open('foo', 'w', encoding='utf-16')
>>> print('1234', file=f)
>>> print('5678', file=f)
>>> open('foo', 'rb').read()
b'\xff\xfe1\x002\x003\x004\x00\n\x005\x006\x007\x008\x00\n\x00'
>>> open('foo', 'r', encoding='utf-16').read()
'1234\n5678\n'
>>>

--
components: Library (Lib)
files: io.py.patch
messages: 59438
nosy: erickt
severity: normal
status: open
title: TextIOWrapper.write writes utf BOM for every string
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file9091/io.py.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Georg Brandl

Changes by Georg Brandl:


--
assignee:  -> alexandre.vassalotti
nosy: +alexandre.vassalotti

__
Tracker <[EMAIL PROTECTED]>

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



[issue1646] Make socket support TIPC.

2008-01-07 Thread Alberto Bertogli

Alberto Bertogli added the comment:

On Sun, Jan 06, 2008 at 02:45:35PM -, Alberto Bertogli wrote:
> I'll probably send you the updated patch sometime this week; thanks for
> the ping =)

Here are the three patches, rebased to the SVN commit 59815.

The first one is the same I've already submitted, the second adds the
documentation and the third two testcases.

The testcases are simple, but I think cover a reasonable amount of TIPC
specific code. If you want more, let me know.

The documentation is simple, as you told me, just a paragraph explaining
about the address format and another explaining the constants. Again, if
you want me to change anything, just let me know.

Finally, if you want me to rebase this on top of any other branch, you
guessed it, just let me know ;)

Thanks a lot,
Alberto

Added file: http://bugs.python.org/file9092/0001-Make-socket-support-TIPC.patch
Added file: 
http://bugs.python.org/file9093/0002-Add-documentation-and-Misc-NEWS-entry-for-TIPC-suppo.patch
Added file: 
http://bugs.python.org/file9094/0003-Add-unit-tests-for-TIPC-socket-support.patch

__
Tracker <[EMAIL PROTECTED]>

__>From b643e5cad1f4fe32ed03847bd2e55bbae76b5e8b Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <[EMAIL PROTECTED]>
Date: Wed, 5 Dec 2007 18:39:18 -0300
Subject: [PATCH] Make socket support TIPC.

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.

This patch adds optional Linux-only support for TIPC in the socket module.
---
 Modules/socketmodule.c |  154 +++-
 Modules/socketmodule.h |4 +
 configure.in   |2 +-
 3 files changed, 158 insertions(+), 2 deletions(-)

diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index c30f1b3..e3f81db 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -7,7 +7,8 @@ This module provides an interface to Berkeley socket IPC.
 Limitations:
 
 - Only AF_INET, AF_INET6 and AF_UNIX address families are supported in a
-  portable manner, though AF_PACKET and AF_NETLINK are supported under Linux.
+  portable manner, though AF_PACKET, AF_NETLINK and AF_TIPC are supported
+  under Linux.
 - No read/write operations (use sendall/recv or makefile instead).
 - Additional restrictions apply on some non-Unix platforms (compensated
   for by socket.py).
@@ -52,6 +53,25 @@ Module interface:
   the Ethernet protocol number to be received. For example:
   ("eth0",0x1234).  Optional 3rd,4th,5th elements in the tuple
   specify packet-type and ha-type/addr.
+- an AF_TIPC socket address is expressed as
+ (addr_type, v1, v2, v3 [, scope]); where addr_type can be one of:
+   TIPC_ADDR_NAMESEQ, TIPC_ADDR_NAME, and TIPC_ADDR_ID;
+  and scope can be one of:
+   TIPC_ZONE_SCOPE, TIPC_CLUSTER_SCOPE, and TIPC_NODE_SCOPE.
+  The meaning of v1, v2 and v3 depends on the value of addr_type:
+   if addr_type is TIPC_ADDR_NAME:
+   v1 is the server type
+   v2 is the port identifier
+   v3 is ignored
+   if addr_type is TIPC_ADDR_NAMESEQ:
+   v1 is the server type
+   v2 is the lower port number
+   v3 is the upper port number
+   if addr_type is TIPC_ADDR_ID:
+   v1 is the node
+   v2 is the ref
+   v3 is ignored
+
 
 Local naming conventions:
 
@@ -1094,6 +1114,39 @@ makesockaddr(int sockfd, struct sockaddr *addr, int 
addrlen, int proto)
}
 #endif
 
+#ifdef HAVE_LINUX_TIPC_H
+   case AF_TIPC:
+   {
+   struct sockaddr_tipc *a = (struct sockaddr_tipc *) addr;
+   if (a->addrtype == TIPC_ADDR_NAMESEQ) {
+   return Py_BuildValue("I",
+   a->addrtype,
+   a->addr.nameseq.type,
+   a->addr.nameseq.lower,
+   a->addr.nameseq.upper,
+   a->scope);
+   } else if (a->addrtype == TIPC_ADDR_NAME) {
+   return Py_BuildValue("I",
+   a->addrtype,
+   a->addr.name.name.type,
+   a->addr.name.name.instance,
+   a->addr.name.name.instance,
+   a->scope);
+   } else if (a->addrtype == TIPC_ADDR_ID) {
+   return Py_BuildValue("I",
+   a->addrtype,
+   a->addr.id.node,
+   a->addr.id.ref,
+   0,
+   a->

[issue1011893] Problems importing packages in ZIP file

2008-01-07 Thread Dennis Chuah

Dennis Chuah added the comment:

I had forgotten about this bug.  I haven't been able to test this on 
2.5 as I have not worked with Python for a while.  I think if you are 
satisfied that the problem doesn't exist, then close it.  If I find it 
again, I can certainly log the problem again.  BTW, did you manage to 
test whether the problem existed in the version that I reported it in?

--
versions: +Python 2.3

_
Tracker <[EMAIL PROTECTED]>

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Romulo A. Ceccon

New submission from Romulo A. Ceccon:

The message for WindowsError is taken from the Windows API's
FormatMessage() function, following the OS language. Currently Python
does no conversion for those messages, so non-ASCII characters end up
improperly encoded in the console. For example:

  >>> import os
  >>> os.rmdir('E:\\temp')
  Traceback (most recent call last):
File "", line 1, in 
  WindowsError: [Error 41] A pasta nÒo estß vazia: 'E:\\temp'

Should be: "A pasta não está vazia" [Folder is not empty].

Python could check what is the code page of the current output interface
and change the message accordingly.

--
components: Windows
messages: 59441
nosy: Romulo A. Ceccon
severity: minor
status: open
title: WindowsError messages are not properly encoded
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



[issue1562] Decimal can't be subclassed useful

2008-01-07 Thread Facundo Batista

Facundo Batista added the comment:

Mark is right, the current behaviour is correct. See Tim post for a
longer explanation.

As general help, for the money class take a look of this:
http://sourceforge.net/projects/pymoney

There you'll see that the approach was to store the value, not subclass
Decimal, as the other currency info makes math ugly. For example:
  
  Money("15.30", currency="USD") + Money("2.33", currency="ARS")

There's a lot of discussion for a Money data type, also, in python-list
and python-dev (I even proposed a pre-PEP), but then Decimal was
implemented; check those lists at the fourth quarter of 2003 for these
posts.

Regards,

--
resolution:  -> wont fix
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



[issue1737] Windows installer issue (ObjectBrowser.py)

2008-01-07 Thread Dariusz Suchojad

Dariusz Suchojad added the comment:

Done. Attached in python.zip. I've also noticed something strange here.
http://python.org/download/releases/2.5.1/ says the MD5 sum should
be a1d1a9c07bc4c78bd8fa05dd3efec87f but the MD5 client I'm using
(http://www.pc-tools.net/win32/md5sums/) tells me the
http://python.org/ftp/python/2.5.1/python-2.5.1.msi file's checksum
is 

D:\tmp\python_install>md5 python-2.5.1.msi

MD5sums 1.2 freeware for Win9x/ME/NT/2000/XP+
Copyright (C) 2001-2005 Jem Berkes - http://www.pc-tools.net/
Type md5 -h for help

[Path] / filename  MD5 sum
---
[D:\tmp\python_install\]
python-2.5.1.msi  
bd4780277a4bdfcd693593379e1b383c

What does it mean? Is it my client fault?

Added file: http://bugs.python.org/file9095/python.zip

__
Tracker <[EMAIL PROTECTED]>

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



[issue932563] logging: need a way to discard Logger objects

2008-01-07 Thread Vinay Sajip

Vinay Sajip added the comment:

Antoine, I take your point, but there are a number of ways of doing what
you want, apart from the "extra" context argument:

1. Use your own logger classes which do what you want. It's probably
best to make this a wrapper class so you can define different ones for
different needs.
2. Use a non-string as your message. The "message" object passed to
logging can be any object - str() is called on this to get the actual
message.
3. You can use custom Formatter and/or Filter objects to manipulate the
logged message and/or LogRecord instances.

You could pass context information in a number of different ways, but
using a threadlocal might be convenient where the platform supports it.

Any of these approaches should work, and there should be no need to have
a pattern where lots of logging.Logger instances need to be created just
to output context information.


Tracker <[EMAIL PROTECTED]>


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



[issue932563] logging: need a way to discard Logger objects

2008-01-07 Thread Vinay Sajip

Changes by Vinay Sajip:


--
priority: high -> normal


Tracker <[EMAIL PROTECTED]>


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



[issue1755] Misspelling in future.c in 2.5.1 source (handl should be handle)

2008-01-07 Thread Brad Tilley

New submission from Brad Tilley:

/* A subsequent pass will detect future imports that don't
   appear at the beginning of the file.  There's one case,
   however, that is easier to handl here: A series of imports
   joined by semi-colons, where the first import is a future
   statement but some subsequent import has the future form
   but is preceded by a regular import.
*/

--
components: None
messages: 59445
nosy: brad
severity: minor
status: open
title: Misspelling in future.c in 2.5.1 source (handl should be handle)
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



[issue932563] logging: need a way to discard Logger objects

2008-01-07 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

Ideally, it would be best if loggers didn't live forever behind the
scenes if they have no non-default configuration, but documenting their
long-lived nature and the recommended alternate ways to deal with
getting additional context information into the results.


Tracker <[EMAIL PROTECTED]>


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



[issue1755] Misspelling in future.c in 2.5.1 source (handl should be handle)

2008-01-07 Thread Christian Heimes

Changes by Christian Heimes:


--
components: +Interpreter Core -None
priority:  -> low
resolution:  -> accepted
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



[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Any chance of uploading a single patch that contains all these changes?

The profile tests often fail when io.py changes because they happen to
depend on "golden output" which includes line numbers of code in io.py
that happens to be traced during the test.  I don't know why -R: makes
it pass but it could be that it doesn't compare the golden output.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1646] Make socket support TIPC.

2008-01-07 Thread Christian Heimes

Changes by Christian Heimes:


Removed file: 
http://bugs.python.org/file8981/0002-Make-socket-support-TIPC.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Crys, can you confirm this?

It would seem we'll need to fix this twice -- once for 2.x, once for 3.0.

--
nosy: +gvanrossum, tiran

__
Tracker <[EMAIL PROTECTED]>

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



[issue1752] logging.basicConfig misleading behaviour

2008-01-07 Thread Guido van Rossum

Guido van Rossum added the comment:

I recall being bitten by this too when first trying to use the logging
module.

I think the behavior is intentional, but I suppose it could be
documented better.

--
assignee:  -> vsajip
nosy: +gvanrossum, vsajip
priority:  -> low

__
Tracker <[EMAIL PROTECTED]>

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



[issue1011893] Problems importing packages in ZIP file

2008-01-07 Thread Alan McIntyre

Alan McIntyre added the comment:

I just tried it on 2.5 and 2.6, since I didn't have the earlier versions
available.  If I find some time I'll see if I can try it on 2.3 & 2.4;
maybe that will shed some light on whether it's been fixed or if is
something specific to Windows that could still be broken.

_
Tracker <[EMAIL PROTECTED]>

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

Oh nice ... 

Amaury knows probably more about the wide char Windows API than me. The
function Python/error.c:PyErr_SetExcFromWindows*() needs to be modified.

--
assignee:  -> amaury.forgeotdarc
nosy: +amaury.forgeotdarc
priority:  -> normal
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



[issue1752] logging.basicConfig misleading behaviour

2008-01-07 Thread Vinay Sajip

Vinay Sajip added the comment:

Added clarifying sentence to documentation (trunk only):

"The function does nothing if any handlers have been defined for the
root logger."

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

I confirm the problem (with French accents) on python 2.5.
Python 3.0 already fixed the problem by using the FormatMessageW()
unicode version of the API.

We could do the same for python 2.5, but the error message must be
converted to str early (i.e when building the Exception). What is the
correct encoding to use?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1646] Make socket support TIPC.

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

The unit tests don't work for me (Ubuntu 7.10, Linux 2.6.22, i386)

>>> srv = socket.socket(socket.AF_TIPC, socket.SOCK_RDM)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/heimes/dev/python/trunk/Lib/socket.py", line 177, in __init__
_sock = _realsocket(family, type, proto)
socket.error: [Errno 97] Address family not supported by protocol

Do I have to set up my network device for TIPC?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-07 Thread Facundo Batista

Facundo Batista added the comment:

Mmm... I thought this would be a clean backport... but no.

If we just copy the files to 2.5, we get two failures running the tests.

- test_hash_method (DecimalUsabilityTest): This is because of the
changes we made to the hash builtin in the trunk, and we should avoid
this test if version < 2.6.

- test_normalize: Exception "Clamped" raised on line nrmx218. I don't
have a clue why this one fails.

Mark, could you please take a look at it?

Thank you!

__
Tracker <[EMAIL PROTECTED]>

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



[issue1646] Make socket support TIPC.

2008-01-07 Thread Alberto Bertogli

Alberto Bertogli added the comment:

On Mon, Jan 07, 2008 at 03:37:54PM -, Christian Heimes wrote:
> The unit tests don't work for me (Ubuntu 7.10, Linux 2.6.22, i386)
> 
> >>> srv = socket.socket(socket.AF_TIPC, socket.SOCK_RDM)
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/home/heimes/dev/python/trunk/Lib/socket.py", line 177, in __init__
> _sock = _realsocket(family, type, proto)
> socket.error: [Errno 97] Address family not supported by protocol
> 
> Do I have to set up my network device for TIPC?

No, by default you have a single-node cluster fully capable of TIPC
networking. But you do need the TIPC module loaded; have you tried
modprobe tipc?

If that works, the test cases should pass.

I understand that this might be a problem because there is no time to
check at runtime if you have TIPC enabled in your kernel (besides the
obvious way of trying to create the socket and see if it fails); but you
have the same problem with any network protocol (although obviously is
much more common to have TIPC disabled than the rest of the supported
ones).

Do you want me to check for this in the conditional for inclusion?

Thanks,
Alberto

__
Tracker <[EMAIL PROTECTED]>

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



[issue1737] Windows installer issue (ObjectBrowser.py)

2008-01-07 Thread Dariusz Suchojad

Dariusz Suchojad added the comment:

Hmm, on a home PC the checksum's correct, it's
a1d1a9c07bc4c78bd8fa05dd3efec87f. Assuming something is wrong with
my download at work, is it possible for an MSI package to start the 
installation even when package is corrupted?

Anyway, tomorrow I'll try to install the MSI I downloaded at home.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1646] Make socket support TIPC.

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

Committed in r59819

--
resolution: accepted -> 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



[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

So, here's one big patch. I have updated the behavior of close(), so that 

> The profile tests often fail when io.py changes because they happen to
> depend on "golden output" which includes line numbers of code in io.py
> that happens to be traced during the test. 

Yes, I knew that. But, how can I fix the test so that it passes even if
_bytesio is not available?

Oh, one more thing. In the misc fixes for io.py, I added a checkClosed
in IOBase.readline(). As a side-effect, this make __next__ raises a
ValueError, instead of StopIteration. Is that correct?  

>>> f = open("load.py")
[45681 refs]
>>> next(f)
'import sys\n'
[45700 refs]
>>> f.close()
[45703 refs]
>>> next(f)
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/alex/src/python.org/py3k/Lib/io.py", line 1440, in __next__
line = self.readline()
  File "/home/alex/src/python.org/py3k/Lib/io.py", line 1449, in readline
raise ValueError("read from closed file")
ValueError: read from closed file
[45703 refs]

Added file: http://bugs.python.org/file9096/bytesio+misc-fixes.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

[grrr, I eat my words]

> So, here's one big patch. I have updated the behavior of close(), so that 

... it matches the behavior of 2.x.

> As a side-effect, this make __next__ raises a
ValueError, instead of StopIteration.

... when the file is closed.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Romulo A. Ceccon

Romulo A. Ceccon added the comment:

"... but the error message must be converted to str early (i.e when
building the Exception)."

Wouldn't that create more problems? What if somebody wants to intercept
the exception and do something with it, like, say, redirect it to a log
file? The programmer must, then, be aware of the different encoding. I
thought about keeping the exception message in Unicode and converting it
just before printing. Is that possible for Python 2.x?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1755] Misspelling in future.c in 2.5.1 source (handl should be handle)

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

Fixed in r59820.

--
nosy: +georg.brandl
resolution: accepted -> 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



[issue1748] contextlib.contextmanager does not use functools.wraps

2008-01-07 Thread Georg Brandl

Changes by Georg Brandl:


--
priority:  -> low
type:  -> behavior

__
Tracker <[EMAIL PROTECTED]>

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



[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Georg Brandl

Changes by Georg Brandl:


--
priority: normal -> high

__
Tracker <[EMAIL PROTECTED]>

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



[issue1762972] 'exec' does not accept what 'open' returns

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

both sounds like a good idea.

--
nosy: +tiran

_
Tracker <[EMAIL PROTECTED]>

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



[issue1755179] Deadlocks with fork() and multithreading

2008-01-07 Thread Facundo Batista

Facundo Batista added the comment:

Backported, commited in r59823.

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



[issue602345] option for not writing .py[co] files

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

Committed r59824.

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



[issue1762972] 'exec' does not accept what 'open' returns

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

I've readded reload() as imp.reload() in r59825. I've also copied two
unit tests from trunk to py3k.

--
resolution:  -> accepted

_
Tracker <[EMAIL PROTECTED]>

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



[issue1668] -E command line parameter intent

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

Committed getenv.2.diff and extended envvar docs in r59827.

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



[issue1622] zipfile hangs on certain zip files

2008-01-07 Thread Alan McIntyre

Alan McIntyre added the comment:

Well I can't promise it will be swift, since my winter vacation ended
today, but I'll keep on top of it as best I can. :)

__
Tracker <[EMAIL PROTECTED]>

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



[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

Keyword-only-args are not yet documented.

__
Tracker <[EMAIL PROTECTED]>

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



[issue919614] Python configured with --disable-unicode fails tests, more

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

I renamed --enable-unicode to --with-wide-unicode in r59829; this should
handle the Py3k case.

I added suitable Py_USING_UNICODE directives in r59830 so that the trunk
compiles again without unicode.

--
assignee:  -> gvanrossum
nosy: +georg.brandl, gvanrossum
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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

I think this is not possible if we want to preserve compatibility; at
least, str(e.strerror) must not fail.

I can see different solutions:
1) Don't fix, and upgrade to python 3.0
2) Store an additional e.unicodeerror member, use it in a new
EnvironmentError.__unicode__ method, and call this from PyErr_Display.
3) Force FormatMessage to return US-English messages.

My preferred being 1): python2.5 is mostly encoding-naive, python3 is
unicode aware, and I am not sure we want python2.6 contain both code.
Other opinions?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

Committed fix in r59832. Thanks!

P.S. Guido, what this comment, in write(), is about?
# XXX What if we were just reading?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti:


--
resolution:  -> fixed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti:


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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Guido van Rossum

Guido van Rossum added the comment:

3.0 will be a long way away for many users.  Perhaps forcing English
isn't so bad, as Python's own error messages aren't translated anyway?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1527974] tarfile chokes on ipython archive on Windows

2008-01-07 Thread Lars Gustäbel

Lars Gustäbel added the comment:

I close this issue because it is out of date. The new
TarFile.extractall() method in Python 2.5 provides a way to solve the
original problem IMO.

--
resolution:  -> out of date
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



[issue1756] -m broken in trunk

2008-01-07 Thread Guido van Rossum

New submission from Guido van Rossum:

As of today, the -m option doesn't appear to work any more in the trunk.
 I get this error:

$ ./python -m string
Could not import runpy module
$

However it seems to be confused:

$ ./python -c 'import runpy'
$

IOW the module imports just fine.

Crys, I wonder if this has to do with your import-nolock changes?

--
assignee: tiran
messages: 59478
nosy: gvanrossum, tiran
priority: urgent
severity: normal
status: open
title: -m broken in trunk
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



[issue1540385] tarfile __slots__ addition

2008-01-07 Thread Lars Gustäbel

Lars Gustäbel added the comment:

I close this issue as there has been no progress over the last 1.5 year.

--
resolution:  -> rejected
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



[issue1756] -m broken in trunk

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

Seems to work here...

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



[issue467924] Improve the ZipFile Interface

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

I committed your patch (after reviewing the docs) as r59834. I think
there is no more to do here.

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



[issue1756] -m broken in trunk

2008-01-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Bah.  Environment error.  Sorry!

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



[issue932563] logging: need a way to discard Logger objects

2008-01-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Hi Vinay,

Thanks for your reply.

I think it's important to rephrase the problem in a simple way. The
basic pattern is that there is a class C (say, a TCP connection class)
where a specific part of each log line should from an instance-specific
"contextual string" (say, an IP address). Given the current logging API,
this means each instance of C will want either a separate Logger object,
or a separate Formatter object, or a separate LogRecord subclass, etc.

Now the problem is:
1. creating a separate Logger object per instance of C leads to memory leaks
2. creating a separate Formatter, Filter etc. does not work because the
shared logger (whatever it is) has no means to decide which Formatter or
Filter instance it should use depending on the caller (perhaps I'm wrong
about this one? explanations welcome :-))
3. creating thread-local objects (e.g. Formatters), not only is a quite
ugly solution IMO, but it doesn't suit every situation. For example, if
you use an event loop (asyncore, Twisted), all objects will live in the
same thread yet require distinct Formatters.

So the only mildly satisfying solution right now is:
4. create a specific Logger class wrapper which will require the caller
to pass its "contextual string" to them so that the wrapper has the
appropriate context information. This does almost the right thing
(except for one supplementary parameter for each logging call), but is
still a bit of code to type and get right.

Now to make it easier for the developer I see two solutions:
  A. enhance the logging module with an API to create non-persistent
loggers. That's what I was originally proposing to work on.
  B. provide a generic implementation of the afore-mentioned wrapper
(see solution 4), ready to use for the most common purposes. Basically,
the generic wrapper would be instantiated with a pattern (say :
"1.2.3.4: %(msg)s") which would be used to modify the msg for each
logger call

I'd be willing to implement either of those two solutions, depending on
which we decide is better :-) What do you think?


Tracker <[EMAIL PROTECTED]>


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



[issue1722] Undocumented urllib functions

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

There are quite a lot more functions in __all__, more than 10 split*
functions... should they all be documented?

Also, isn't urlparse meant to do such tasks?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1734] documentation on metaclasses is incomplete and misleading

2008-01-07 Thread Georg Brandl

Georg Brandl added the comment:

This should now be appropriately explained in the trunk, r59837. I also
added an example of using __new__ in a metaclass.

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



[issue1762972] 'exec' does not accept what 'open' returns

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

I've added the __file__ patch in r59841. Is there another location that
needs to be fixed?

_
Tracker <[EMAIL PROTECTED]>

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



[issue1762972] 'exec' does not accept what 'open' returns

2008-01-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Maybe just a doc update?

_
Tracker <[EMAIL PROTECTED]>

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



[issue1657] [patch] epoll and kqueue wrappers for the select module

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

Guido, have you reviewed the patch and are you fine with it?

--
components: +Extension Modules
nosy: +gvanrossum

__
Tracker <[EMAIL PROTECTED]>

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



[issue1657] [patch] epoll and kqueue wrappers for the select module

2008-01-07 Thread Guido van Rossum

Guido van Rossum added the comment:

Not yet, I ran out of time. Can you hold on for another week?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-07 Thread Mark Dickinson

Mark Dickinson added the comment:

You need to remove the old files in decimaltestdata before copying the
new ones across:  nrmx218 is an old, and buggy, testcase;  at some point
Mike Cowlishaw renamed normalize.decTest to reduce.decTest.  He also
renamed the operation from normalize to reduce, but since this name
change hasn't made it into the most recent version of the specification
it's stayed as normalize in the Python source for now.  So it looks like
you ended up with an old version of normalize.decTest in addition to all
the new decTest files.

Note that redx218 in reduce.decTest is identical to nrmx218, except that
it specifies that Clamped *should* be raised.

For the hash method, I think it's safe to leave the old Python 2.5
__hash__ exactly as it is, but backport everything else.  This means
that hash will still be slow for large Decimals in Python 2.5 (i.e., we
won't be able to backport the fix for issue 1770416 in Python 2.5), but
at least it'll be correct.
If we backport the new __hash__ without also backporting the
corresponding core change to the long __hash__ then we'll be left with a
buggy __hash__.  The new tests for __hash__ are still valid, and I think
they shouldn't be skipped in the backported version.

And I definitely don't want to suggest backporting the long.__hash__
change---that just seems to be asking for trouble.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1182] Paticular decimal mod operation wrongly output NaN.

2008-01-07 Thread Mark Dickinson

Mark Dickinson added the comment:

P.S. I've just noticed that both versions of __hash__ are buggy:  the
hash value of a Decimal depends on the current context.  I'll open a new
bug report.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I would claim that this is not a bug. Sure, the message doesn't come out
correctly, but only because you run it in a cmd.exe window, not in (say)
IDLE.

IIUC, the problem is that Python computes the message in CP_ACP (i.e.
the ANSI code page), whereas the terminal interprets it in CP_OEMCP
(i.e. the OEM code page).

If we declare that all strings are considered as CP_ACP in the
exception, then the only way to fix it would be to convert it from
CP_ACP to CP_OEMCP (or, more generally, sys.stderr.encoding) on
printing. Such conversion should be implemented in an unfailing way,
either using replacement characters or falling back to no conversion.

Forcing English messages would certainly reduce the problems, but it
still might be that the file name in the error message does not come out
correctly.

--
nosy: +loewis

__
Tracker <[EMAIL PROTECTED]>

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



[issue1737] Windows installer issue (ObjectBrowser.py)

2008-01-07 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I can confirm that the correct checksum of the file is what the web page
says. So it seems that your web browser corrected it during the
download. That, typically, is caused by the web browser perform a
conversion of line endings in a binary file, so it would indeed be best
if you try with a different copy, or a different web browser.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1757] Decimal hash depends on current context

2008-01-07 Thread Mark Dickinson

New submission from Mark Dickinson:

The value of the Decimal hash() depends on the current context:

>>> from decimal import *
>>> x = Decimal("123456789.1")
>>> hash(x)
1989332493
>>> getcontext().prec = 6
>>> hash(x)
-2034270682

This has nasty consequences;  e.g.:

>>> s = set([x])
>>> x in s
True
>>> getcontext().prec = 28
>>> x in s
False

hashing a Decimal can also set flags in the context;  again, I think
this is undesirable.

The cause of this bug is clear:  __hash__ calls normalize, which rounds
its argument to the current context.  I'll post a fix when I get around
to it.

--
components: Library (Lib)
messages: 59492
nosy: marketdickinson
severity: normal
status: open
title: Decimal hash depends on current context
versions: Python 2.5, 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



[issue1737] Windows installer issue (ObjectBrowser.py)

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

"your web browser corrected it"? Do you mean "corrupted"?

--
nosy: +tiran

__
Tracker <[EMAIL PROTECTED]>

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

> Forcing English messages would certainly reduce the problems
And it does not even work: my French Windows XP does not contain the
English error messages :-(

> If we declare that all strings are considered as CP_ACP in the
> exception, then the only way to fix it would be to convert it from
> CP_ACP to CP_OEMCP (or, more generally, sys.stderr.encoding) on
> printing. Such conversion should be implemented in an unfailing way,
> either using replacement characters or falling back to no conversion.

If this is chosen, I propose to use CharToOem as the "unfailing"
conversion function. I will try to come with a patch following this idea.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1757] Decimal hash depends on current context

2008-01-07 Thread Facundo Batista

Changes by Facundo Batista:


--
assignee:  -> facundobatista
nosy: +facundobatista

__
Tracker <[EMAIL PROTECTED]>

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



[issue1623] Implement PEP-3141 for Decimal

2008-01-07 Thread Mark Dickinson

Mark Dickinson added the comment:

One minor point: Decimals are also created by the _dec_from_triple
function:  presumably that call to __new__ should also be changed to use
super?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1137] pyexpat patch for changing buffer_size

2008-01-07 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Here's another update of the simplified version, that also updated the
documentation patch for reST and updates the test for the current code.

Added file: http://bugs.python.org/file9098/pyexpat-patch2.txt

__
Tracker <[EMAIL PROTECTED]>

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Martin v. Löwis

Martin v. Löwis added the comment:

> If this is chosen, I propose to use CharToOem as the "unfailing"
> conversion function. I will try to come with a patch following this idea.

Sounds fine to me.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1137] pyexpat patch for changing buffer_size

2008-01-07 Thread A.M. Kuchling

A.M. Kuchling added the comment:

Here's a simpler, but still untested version of the patch that cuts out 
the various cases for reallocating when there's already buffered data
and just does a flush every time.

Added file: http://bugs.python.org/file9097/simpler_patch.txt

__
Tracker <[EMAIL PROTECTED]>

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



[issue932563] logging: need a way to discard Logger objects

2008-01-07 Thread Vinay Sajip

Vinay Sajip added the comment:

Ok, but let's continue the discussion on comp.lang.python, as this is
probably not the best place for an extended discussion. I'll post there
soon with a proposal.


Tracker <[EMAIL PROTECTED]>


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



[issue932563] logging: need a way to discard Logger objects

2008-01-07 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

Please be sure to post a link to the thread here, as not everyone here
reads comp.lang.python.


Tracker <[EMAIL PROTECTED]>


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



[issue1766304] improve xrange.__contains__

2008-01-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

The 2.6 patch should probably use long instead of int.

--
nosy: +pitrou

_
Tracker <[EMAIL PROTECTED]>

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



[issue1758] Wrong link in documentation

2008-01-07 Thread Martin Marcher

New submission from Martin Marcher:

In this site: http://www.python.org/doc/current/inst/about.html under
"Comments and Questions" the link to the python bugtracker is still
pointing to the sourceforge bugtracker.

--
components: Documentation
messages: 59502
nosy: martin.marcher
severity: normal
status: open
title: Wrong link in documentation
type: resource usage
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



[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti

Changes by Alexandre Vassalotti:


Removed file: http://bugs.python.org/file9096/bytesio+misc-fixes.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

I got a patch that also fixes the profiler tests. That was easy after
all. :-)

Added file: http://bugs.python.org/file9099/bytesio+misc-fixes-2.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1758] Wrong link in documentation

2008-01-07 Thread Robert Lehmann

Robert Lehmann added the comment:

This problem has been removed in the current version of the
documentation (http://docs.python.org/dev/install/index.html) -- old
docs aren't updated. It has an own section now
(http://docs.python.org/dev/bugs.html).

Issue can be closed.

--
nosy: +lehmannro

__
Tracker <[EMAIL PROTECTED]>

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



[issue1758] Wrong link in documentation

2008-01-07 Thread Martin v. Löwis

Martin v. Löwis added the comment:

Thanks for the report. I just fixed it in r59848; this will be released
with Python 2.5.2. "old" docs *will* be updated for 2.5.x.

--
nosy: +loewis
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



[issue932563] logging: need a way to discard Logger objects

2008-01-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't follow comp.lang.python either, so I'd be grateful if you give a
link to the gmane thread ;)

I hope we can find an useful solution to this limitation, logging is a
very important task and the stdlib should satisfy all common wishes IMO.


Tracker <[EMAIL PROTECTED]>


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



[issue1743] IDLE fails to launch

2008-01-07 Thread Joakim

Joakim added the comment:

I have the exact same problem also running 32-bit vista. 
Idle worked the first time I started it but after that it doesn't start.
I did run the command and got this error.

C:\Users\Joakim>"C:\Python25\python.exe" "C:\Python25\Lib\idle.py"
C:\Python25\python.exe: can't open file 'C:\Python25\Lib\idle.py': 
[Errno 2] No such file or directory

I also not able to start the interpreter from cmd using the python 
command. I've looked around a bit and read something about adding to 
PATH. Haven't tried that because the guide wasn't written for Vista.

--
nosy: +Piffen

__
Tracker <[EMAIL PROTECTED]>

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



[issue1515] deepcopy doesn't copy instance methods

2008-01-07 Thread Michael Van Biesbrouck

Michael Van Biesbrouck added the comment:

Guido pointed out a common use case where people use bound methods in a
way that would be poorly served by my change.  An alternate
implementation with a deeper copy will cause less surprise:

def _deepcopy_method(x, memo):
return type(x)(x.im_func, deepcopy(x.im_self, memo), x.im_class)
d[types.MethodType] = _deepcopy_method

The function and class are still shallow-copied but the bound object is
deep-copied.  I use type(x)() instead of types.MethodType() because
types will be unbound when the function runs.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1743] IDLE fails to launch

2008-01-07 Thread Joakim

Joakim added the comment:

Noticed I missed a bit of the path but it didn't matter.
Changed the path to C:\Python25\Lib\idlelib\idle.py and got another 
error.

C:\Users\Joakim>"C:\Python25\python.exe" "C:\Python25
\Lib\idlelib\idle.py"
Traceback (most recent call last):
  File "C:\Python25\Lib\idlelib\idle.py", line 21, in 
idlelib.PyShell.main()
  File "C:\Python25\lib\idlelib\PyShell.py", line 1404, in main
shell = flist.open_shell()
  File "C:\Python25\lib\idlelib\PyShell.py", line 275, in open_shell
self.pyshell = PyShell(self)
  File "C:\Python25\lib\idlelib\PyShell.py", line 813, in __init__
OutputWindow.__init__(self, flist, None, None)
  File "C:\Python25\lib\idlelib\OutputWindow.py", line 16, in __init__
EditorWindow.__init__(self, *args)
  File "C:\Python25\lib\idlelib\EditorWindow.py", line 248, in __init__
self.update_recent_files_list()
  File "C:\Python25\lib\idlelib\EditorWindow.py", line 715, in 
update_recent_fil
es_list
rf_file = open(self.recent_files_path, 'w')
IOError: [Errno 13] Permission 
denied: 'C:\\Users\\Joakim\\.idlerc\\recent-files
.lst'

There should be a edit button somewhere but I couldn't find it, so I 
had to post a new entry.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1757] Decimal hash depends on current context

2008-01-07 Thread Christian Heimes

Changes by Christian Heimes:


--
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1743] IDLE fails to launch

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

Can you access the file C:\\Users\\Joakim\\.idlerc\\recent-files.lst
with the explorer? Do the directory and the file exist?

__
Tracker <[EMAIL PROTECTED]>

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



[issue1743] IDLE fails to launch

2008-01-07 Thread Joakim

Joakim added the comment:

I can access the file. I renamed the file and tried the command again.
Then I started IDLE and got a window. A new recent-files.lst was 
created. So I guess I solved the problem temporarily.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1754] WindowsError messages are not properly encoded

2008-01-07 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Here is a patch. Now I feel it is a hack, but it is the only place I
found where I can access both the exception object and the encoding...

Added file: http://bugs.python.org/file9100/windowserror.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1743] IDLE fails to launch

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

It smells like a Vista issue.

But IDLE shouldn't crash w/o a notice if the recent list can't be opened.

--
assignee:  -> kbk
nosy: +kbk
priority:  -> low

__
Tracker <[EMAIL PROTECTED]>

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



[issue1757] Decimal hash depends on current context

2008-01-07 Thread Mark Dickinson

Mark Dickinson added the comment:

Here's a patch for the trunk.

Added file: http://bugs.python.org/file9101/issue1757.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2008-01-07 Thread Robin Stocker

Robin Stocker added the comment:

Thanks for the feedback!

It's on line 111 in test_collections.py::

n = 1
import string, random
names = [''.join([random.choice(string.letters) for j in
range(10)]) for i in range(n)]
Big = namedtuple('Big', names)
b = Big(*range(n))

I think the condition is triggered because Big's __new__ (which seems to
be dynamically generated by namedtuple using exec) has an argument list
with 1 arguments.

Ok, I'm now looking through SVN logs and have already added some more
changes to my patchset.

Thanks, I had changed MAGIC but didn't know that marshal.c uses it.

So I won't handle documentation in this issue then.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1623] Implement PEP-3141 for Decimal

2008-01-07 Thread Mark Dickinson

Mark Dickinson added the comment:

Some more comments:

(1) I don't think I understand the mechanism by which __lt__ and __le__ are 
supposed to 
be called.  For example, by adding a few print statements it seems that the 
comparison

Decimal(2) > 3

doesn't call __lt__ at any stage.  Is this what's expected, or is this 
unintended?

(2) Also on the subject of __le__ and __lt__:  if Decimal is going to have rich 
comparisons (and I guess it is, one way or another :) ) then we might as well 
get them 
right for NaNs: IEEE-754(r) says that any comparison involving NaN should 
return False, 
with the exception of != which should always return True.  With 3-way 
comparison it 
wasn't possible to get this right.  This would fix Issue 1514428.  (Further 
discussion of 
this should probably go there---I don't think it should hold up applying this 
patch...)

(3) I'm getting a serious performance hit from this patch:  a complete run of 
test_decimal.py costs me 22.439 seconds (best of 3) with the patch, and 11.604 
seconds 
without.  I'm not sure where this is coming from---perhaps it's unavoidable.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1514428] NaN comparison in Decimal broken

2008-01-07 Thread Mark Dickinson

Mark Dickinson added the comment:

It seems likely that Decimal is going to grow rich comparisons anyway, 
either as a result of PEP 3141 or as a result of removal of __cmp__.

Given this, would there be any objections to making comparisons do the 
right thing (in the sense of IEEE-754) for NaNs?

--
nosy: +marketdickinson

_
Tracker <[EMAIL PROTECTED]>

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



[issue1698] urlparse and usernames containing @

2008-01-07 Thread Senthil

Senthil added the comment:

Thank you, Yes having it in the 2.5.2 would be a good idea. The bug
report is also on 2.5 only.
I have attached the patch for the release25-maint branch.

Thanks,
Senthil

Added file: http://bugs.python.org/file9102/issue6898-r25-maint.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1698] urlparse and usernames containing @

2008-01-07 Thread Senthil

Senthil added the comment:

The patch against the trunk could also have been applied to 2.5. There
is NO change in the trunk and 2.4-maint patch. 
Thanks,
Senthil

__
Tracker <[EMAIL PROTECTED]>

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



[issue1759] Backport of PEP 3129 "class decorators"

2008-01-07 Thread Christian Heimes

New submission from Christian Heimes:

The patch backports the class decorator syntax to 2.6. All tests except
two are passing. I'm not sure why the inspect test fails and I don't
know how to fix the ast test.

--
components: Interpreter Core
files: trunk_pep3129_classdec.patch
messages: 59520
nosy: tiran
priority: normal
severity: normal
status: open
title: Backport of PEP 3129 "class decorators"
type: rfe
versions: Python 2.6
Added file: http://bugs.python.org/file9103/trunk_pep3129_classdec.patch

__
Tracker <[EMAIL PROTECTED]>

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



[issue1759] Backport of PEP 3129 "class decorators"

2008-01-07 Thread Christian Heimes

Changes by Christian Heimes:


--
keywords: +patch
nosy: +rhettinger

__
Tracker <[EMAIL PROTECTED]>

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



[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2008-01-07 Thread Christian Heimes

Christian Heimes added the comment:

I vaguely remember that I had to modify the tests to use 254 args in
Python 3.0.

--
nosy: +tiran
priority:  -> normal

__
Tracker <[EMAIL PROTECTED]>

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



[issue1623] Implement PEP-3141 for Decimal

2008-01-07 Thread Jeffrey Yasskin

Jeffrey Yasskin added the comment:

_dec_from_triple: Probably, yes. It doesn't seem to have any practical
effect, but it's good to be consistent.

__lt__, __le__: It doesn't matter whether they're called because they
have the same effect as __cmp__. They're only there to implement
numbers.Real. Perhaps, though, this is a sign that numbers.Real should
require __cmp__ instead in 2.6? Or all of the rich comparisons instead
of just the two minimal ones?

NaNs: I think the guideline is to keep the current behavior for 2.6, and
it's not needed for the 3141 implementation, but if that issue comes to
a conclusion before I get the 3.0 implementation submitted, I'm happy to
follow it.

Performance: cProfile points at abc.__instancecheck__ taking 20% of the
total time (1132436 calls). This could be a problem... I'll check how
that's changed (on my machine) from head and if I can fix it.

Thanks for your detailed reviews, Mark!

__
Tracker <[EMAIL PROTECTED]>

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



[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2008-01-07 Thread Guido van Rossum

Guido van Rossum added the comment:

There's something I misunderstand then.  I thought 2.x also didn't
accept >255 args, but that test would seem to prove I'm wrong.

__
Tracker <[EMAIL PROTECTED]>

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