[issue3538] Docstring typos

2008-08-11 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Chester, please stop changing your user name and wasting our time.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3538
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3535] zipfile has problem reading zip files over 2GB

2008-08-11 Thread alonwas

alonwas [EMAIL PROTECTED] added the comment:

Hi,
I'm using 2.5.2 (r252:60911),
Thanks,
Alon

On Sun, 2008-08-10 at 17:51 +, Martin v. Löwis wrote:
 Martin v. Löwis [EMAIL PROTECTED] added the comment:
 
 What Python version exactly are you using? This might have been fixed in
 2.5.2, with r60117.
 
 --
 nosy: +loewis
 
 ___
 Python tracker [EMAIL PROTECTED]
 http://bugs.python.org/issue3535
 ___

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3535
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3537] dict creation failure causes crash

2008-08-11 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Applied and added test in r65637.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3537
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3160] Building a Win32 binary installer crashes

2008-08-11 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Do you really need to know the encoding of the pre_install_script? Isn't
it sufficient to open it in binary mode instead?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3160
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3134] shutil references undefined WindowsError symbol

2008-08-11 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Patch works under Windows.

--
assignee:  - pitrou
priority:  - high
versions: +Python 2.6, Python 3.0 -Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3134
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3540] NotEmptyErrorError

2008-08-11 Thread MATSUI Tetsushi

New submission from MATSUI Tetsushi [EMAIL PROTECTED]:

In the library reference of mailbox, 
NotEmptyError appears as NotEmptyErrorError.

For exampe:
http://docs.python.org/dev/3.0/library/mailbox.html#mailbox.NotEmptyErrorError

--
assignee: georg.brandl
components: Documentation
messages: 71007
nosy: georg.brandl, mft
severity: normal
status: open
title: NotEmptyErrorError
versions: Python 2.5, Python 2.6, Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3540] NotEmptyErrorError

2008-08-11 Thread Georg Brandl

Georg Brandl [EMAIL PROTECTED] added the comment:

Thanks, fixed in r65639.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3540
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3160] Building a Win32 binary installer crashes

2008-08-11 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Ok, it's a little more complicated than that, because the
pre-install-script must have its newlines converted, otherwise the
installer refuses to run it. Here is a working patch. Viktor, do you
want to give it a try?

--
assignee:  - pitrou
Added file: http://bugs.python.org/file11097/wininst.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3160
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3451] Asymptotically faster divmod and str(long)

2008-08-11 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

 Indeed, that seems to be much faster. In the mean time, do you mind if I
 steal the code? :-)

Not at all!

I guess constant factors could well appear and/or disappear when
recoding in C; it might well be worth trying to implement both
methods to see which is faster.

There are some semi-obvious tricks available that might speed up the
recursive version.  For one thing, all shifts should be in multiples
of 15 bits (because longs are stored in base 2**15).  For another, it
ought to be possible to avoid the single-bit normalization shifts
every time the number of bits ('n') is odd---one can do a single
shift at the beginning of the calculation instead.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3451
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3131] 2to3 can't find fixes_dir

2008-08-11 Thread Haoyu Bai

Haoyu Bai [EMAIL PROTECTED] added the comment:

I tried the patch and it works well. Thanks Georgij! So, why the patch
havn't merged into SVN?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3131
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3139] bytearrays are not thread safe

2008-08-11 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

The last beta is arriving soon. We need to go ahead on this, or retarget
it for 2.7/3.1.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3139
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3541] bsddb memory leak on ubuntu

2008-08-11 Thread Kuang-che Wu

New submission from Kuang-che Wu [EMAIL PROTECTED]:

On ubuntu, python 2.5.2.
The memory usage of following program is increasing infinitly. There may
be something leaking.

However, it only consumes constant memory on windows (python 2.5.2).

import bsddb
d = bsddb.hashopen('a.db', 'c')
d.close()
while True:
d = bsddb.hashopen('a.db')
d.close()

--
components: Extension Modules
messages: 71013
nosy: kcwu
severity: normal
status: open
title: bsddb memory leak on ubuntu
type: resource usage
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3541
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1034053] unittest.py patch: add skipped test functionality

2008-08-11 Thread J. Pablo Fernández

J. Pablo Fernández [EMAIL PROTECTED] added the comment:

Hello,

The attached patch adds the skip functionality and tests to a very
recent (yesterday) Python 3. It took me a few hours to apply the patch,
change to Python 3 style, merge the tests into the current set of tests
not doing a mess.

I think the whole thing is missing documentation, which I would gladly
write if the code is good to go. Just let me know.

Thanks.

--
nosy: +pupeno
Added file: http://bugs.python.org/file11098/skip.diff

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1034053
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1034053] unittest.py patch: add skipped test functionality

2008-08-11 Thread J. Pablo Fernández

J. Pablo Fernández [EMAIL PROTECTED] added the comment:

Oh, I forgot to upgrade versions to include Python 3.0 and to mention
that I have to fix some other tests to work with the new TestCase. It's
nothing serious, just doctests that where too dependent on the output of
the TextTestRunner. As previously discussed, doing that is not a good
idea anyhow, but it is needed for these doctests and I wouldn't expect
anybody else out there in the while to encounter this problem.

--
versions: +Python 3.0

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1034053
___
___
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-08-11 Thread J. Pablo Fernández

J. Pablo Fernández [EMAIL PROTECTED] added the comment:

Shouldn't this be closed now? or is there anything pending to be solved?

--
nosy: +pupeno

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2821
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2008-08-11 Thread Antoine Pitrou

Changes by Antoine Pitrou [EMAIL PROTECTED]:


--
nosy: +pitrou

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1179
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3270] test_multiprocessing: test_listener_client flakiness

2008-08-11 Thread Jesse Noller

Jesse Noller [EMAIL PROTECTED] added the comment:

I've removed the fqdn call per the patch as of r65641

Lowering this to an enhancement to consider the removal of the 0.0.0.0 
functionality

--
priority: high - normal
type:  - feature request

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3542] Building an MSI installer crashes

2008-08-11 Thread Antoine Pitrou

New submission from Antoine Pitrou [EMAIL PROTECTED]:

msilib hasn't been updated for py3k, consequently bdist_msi fails. The
provided patch fixes it, but encoding issues are not worked out (in my
tests, selecting an utf-8 codepage produces unrecognized msi files).

--
components: Library (Lib)
files: msilib.patch
keywords: patch
messages: 71018
nosy: loewis, pitrou
priority: critical
severity: normal
status: open
title: Building an MSI installer crashes
type: crash
versions: Python 3.0
Added file: http://bugs.python.org/file11099/msilib.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3542
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3134] shutil references undefined WindowsError symbol

2008-08-11 Thread Raghuram Devarakonda

Raghuram Devarakonda [EMAIL PROTECTED] added the comment:

 Patch works under Windows.

Thanks. Can you please commit the change?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3134
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

2008-08-11 Thread Nick Coghlan

Nick Coghlan [EMAIL PROTECTED] added the comment:

Py3k warnings for this have been checked in on the trunk as r65642.

There's an unfortunate problem with having to define a fixed stack level
for the warnings - for classes with a metaclass implemented in Python,
the warning message will point to the __new__ method of the metaclass
instead of to the first line of the offending class definition. I don't
see a way around this problem, but it definitely caused me grief in
tracking down some of the misbehaving classes in the standard library
that use ABCMeta as their metaclass in 2.6 (I actually cheated and
recompiled with the stack level on the warnings set to 2 instead of 1).

The update also eliminates the spurious and not-so-spurious Py3k
warnings that this update triggered in the test suite under the -3 flag.
Most were just test suite classes that happen to become unhashable in
Py3k, but a few were classes in the standard lib itself that defined
__eq__ or __cmp__ methods that were incompatible with the default
__hash__ implementation (collections.Mapping, collections.Set,
unittest.TestSuite, xml.dom.minidom.NamedNodeMap, numbers.Number,
UserList.UserList). Instances of all of the affected classes are now
explicitly unhashable in 2.x as well as 3.x (note that any code which
relied on any of them being hashable was already broken due to the fact
that these classes didn't provide the correct hash and equality invariants).

The numbers.Number change deserves special mention - the actual warning
occurs further down in the number stack (when numbers.Complex defines a
new __eq__ method), but it seemed appropriate to block the inheritance
of object.__hash__ in Number since an id() based hash isn't appropriate
for any numeric type. This particular aspect of the change should
probably be forward ported to Py3k.

In implementing the warnings, I'm also pretty happy with the current
Py3k approach that overriding __cmp__ or __eq__ means that __hash__
isn't inherited *at all*, rather than restricting the block solely to
object.__hash__. The current behaviour is simple to explain, and more
importantly, I think it is more correct - any time you change the
definition of equality for the class, you really do need to think
carefully about what it means for mutability and hashability.

P.S. I should never have said this part of the change was going to be
easy, because that was just begging old Murphy to come slap me upside
the head...

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2235
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

2008-08-11 Thread Nick Coghlan

Nick Coghlan [EMAIL PROTECTED] added the comment:

I still intend to do the necessary documentation updates for this, but
they're going to be delayed a bit since getting the warnings right took
much longer than I expected.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2235
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3134] shutil references undefined WindowsError symbol

2008-08-11 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Fixed in r65644.

--
resolution:  - fixed
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3134
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1545] shutil fails when copying to NTFS in Linux

2008-08-11 Thread Raghuram Devarakonda

Raghuram Devarakonda [EMAIL PROTECTED] added the comment:

WindowsError issue is now fixed in r65644.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1545
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3535] zipfile has problem reading zip files over 2GB

2008-08-11 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Do you have a public URL for such a zip file?

--
nosy: +pitrou

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3535
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3530] ast.NodeTransformer bug

2008-08-11 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


--
nosy: +aronacher, georg.brandl

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3530
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3419] multiprocessing module is racy

2008-08-11 Thread Jesse Noller

Jesse Noller [EMAIL PROTECTED] added the comment:

Hey Mark - I took a look at the mp_nohang patch you added - and you're 
right, the connection refused error numbers are different from platform to 
platform. So rather than use a static list, I switched the code to use the 
errno module.

Can you apply this and confirm it works for you?

Added file: http://bugs.python.org/file11100/mp_nohang_jnoller.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3419
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3139] bytearrays are not thread safe

2008-08-11 Thread Martin v. Löwis

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

 The last beta is arriving soon. We need to go ahead on this, or retarget
 it for 2.7/3.1.

I'll look into it tomorrow.

Regards,
Martin

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3139
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3542] Building an MSI installer crashes

2008-08-11 Thread Martin v. Löwis

Changes by Martin v. Löwis [EMAIL PROTECTED]:


--
assignee:  - loewis

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3542
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2394] [Py3k] Finish the memoryview object implementation

2008-08-11 Thread Antoine Pitrou

Changes by Antoine Pitrou [EMAIL PROTECTED]:


--
nosy: +pitrou

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2394
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3543] ctypes works on Intel OS X, fails on PPC OS X

2008-08-11 Thread Bill Janssen

New submission from Bill Janssen [EMAIL PROTECTED]:

Hi, I'm having more problems with ctypes.util.find_library.  On my
Intel box, this works fine:

% python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type help, copyright, credits or license for more information.
 from ctypes import CDLL, RTLD_GLOBAL
 from ctypes.util import find_library
 print CDLL(find_library(iconv), RTLD_GLOBAL)
CDLL '/usr/lib/libiconv.dylib', handle 311df0 at 8a1b0
 

But on my PowerPC box, I get this:

% python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:16) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type help, copyright, credits or license for more information.
 from ctypes import CDLL, RTLD_GLOBAL
 from ctypes.util import find_library
 print CDLL(find_library(iconv), RTLD_GLOBAL)
CDLL 'None', handle fffe at 75af0
 

Both have /usr/lib/libiconv.dylib, both are running 10.5.4.

--
components: Library (Lib)
messages: 71028
nosy: janssen
priority: normal
severity: normal
status: open
title: ctypes works on Intel OS X, fails on PPC OS X
type: behavior
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3543
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3383] ctypes.util fails to find libc in some environments

2008-08-11 Thread Jean-Paul Calderone

Jean-Paul Calderone [EMAIL PROTECTED] added the comment:

Any chance of getting this fixed?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3383
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3419] multiprocessing module is racy

2008-08-11 Thread Mark Dickinson

Mark Dickinson [EMAIL PROTECTED] added the comment:

 So rather than use a static list, I switched the code to use the 
 errno module.

Yup.  That's definitely a better solution.

Your patch fixed the problem for me.

Thanks!

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3419
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3419] multiprocessing module is racy

2008-08-11 Thread Jesse Noller

Jesse Noller [EMAIL PROTECTED] added the comment:

Thanks Mark, I've checked in the connection refused fix in r65645 on trunk

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3419
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3419] multiprocessing module is racy

2008-08-11 Thread Jesse Noller

Changes by Jesse Noller [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file11038/mp_nohang.patch

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3419
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3383] ctypes.util fails to find libc in some environments

2008-08-11 Thread Thomas Heller

Thomas Heller [EMAIL PROTECTED] added the comment:

Well, I have no idea what the standard setup on posix boxes is - should
objdump and ldconfig be on $PATH or not?

Regarding the groups in the regexp:  It is my understanding that the
parens do not matter because .group(0) is returned, which contains the
entire matching string anyway - do I overlook something?

Please note that the find_library() code was not written by myself ;-(

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3383
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3270] test_multiprocessing: test_listener_client flakiness

2008-08-11 Thread Trent Nelson

Trent Nelson [EMAIL PROTECTED] added the comment:

I can confirm the patch works in Windows.  Regarding the 0.0.0.0 issue, 
perhaps we can compromise on something like this:

% svn diff connection.py
Index: connection.py
===
--- connection.py   (revision 65645)
+++ connection.py   (working copy)
@@ -217,6 +217,8 @@
 self._socket.bind(address)
 self._socket.listen(backlog)
 self._address = self._socket.getsockname()
+if self._address[0] == '0.0.0.0':
+self._address[0] = '127.0.0.1'
 self._family = family
 self._last_accepted = None


That way, we still support binding on all addresses, and self._address 
will always represent a connectable end-point.  Thoughts?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3270] test_multiprocessing: test_listener_client flakiness

2008-08-11 Thread Antoine Pitrou

Antoine Pitrou [EMAIL PROTECTED] added the comment:

Le lundi 11 août 2008 à 19:58 +, Trent Nelson a écrit :
 +if self._address[0] == '0.0.0.0':
 +self._address[0] = '127.0.0.1'

Please no. If the user asks for 0.0.0.0, either obey or raise an
exception, but do not silently change the value.

My own humble opinion is that 0.0.0.0 should be allowed and, at worse,
the documentation may carry a warning about it.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3270
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3544] expection typo

2008-08-11 Thread endolith

New submission from endolith [EMAIL PROTECTED]:

http://docs.python.org/lib/typecontextmanager.html

if any expection that occurred should be suppressed

--
assignee: georg.brandl
components: Documentation
messages: 71035
nosy: endolith, georg.brandl
severity: normal
status: open
title: expection typo

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3544
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3514] pickle segfault with infinite loop in __getattr__

2008-08-11 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

Good find Alexandre!  Can you work up a patch?  Would be even better if
it had a unittest.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3514
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2389] Array pickling exposes internal memory representation of elements

2008-08-11 Thread Guido van Rossum

Guido van Rossum [EMAIL PROTECTED] added the comment:

Wouldn't that be lots and lots slower?  I believe speed is one of the
reasons why the binary representation is currently dumped.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3362] locale.getpreferredencoding() gives bus error on Mac OS X 10.4.11 PPC

2008-08-11 Thread cfr

cfr [EMAIL PROTECTED] added the comment:

I admit to not understanding the code involved, but I *thought* that the
problem involved cases where there *is* a preferred encoding in the
environment but it is not one of those covered by:
case kCFStringEncodingMacRoman: return mac-roman;
case kCFStringEncodingMacGreek: return mac-greek;
case kCFStringEncodingMacCyrillic: return mac-cyrillic;
case kCFStringEncodingMacTurkish: return mac-turkish;
case kCFStringEncodingMacIcelandic: return mac-icelandic;
The work around basically ensures the preferred encoding given by the
environment is one of those listed so that the rest of that part of the
code doesn't run. I don't think that my crash, at least, resulted from
no preferred encoding being defined in the environment but maybe
something is going wrong in the locale module because it is not one from
the standard list.

Maybe?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3362
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1432] Strange behavior of urlparse.urljoin

2008-08-11 Thread Senthil

Senthil [EMAIL PROTECTED] added the comment:

Hi Facundo,
I think, we can go ahead and commit the changes. Got a response in
Web-SIG that,previous RFC2396 listed behavior is invalid (in a practical
sense) and the current patch fixes it.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1432
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2275] urllib2 header capitalization

2008-08-11 Thread Senthil

Senthil [EMAIL PROTECTED] added the comment:

Facundo, Shall we go ahead with committing these changes?

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2275
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3543] ctypes works on Intel OS X, fails on PPC OS X

2008-08-11 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

Caused by setting DYLD_FALLBACK_LIBRARY_PATH badly on the PPC machine.

--
resolution:  - invalid
status: open - closed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3543
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3300] urllib.quote and unquote - Unicode issues

2008-08-11 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

On Sat, Aug 9, 2008 at 11:34 AM, Matt Giuca [EMAIL PROTECTED] wrote:


 Matt Giuca [EMAIL PROTECTED] added the comment:

 Bill, I had a look at your patch. I see you've decided to make
 quote_as_string the default? In that case, I don't know why you had to
 rewrite everything to implement the same basic behaviour as my patch.


Just to get things clear in my head.  I don't care what code is used, so
long as it doesn't break the Web.

 (My latest few patches support bytes both ways). Anyway, I have a lot of
 issues with your implementation.

 * Why did you replace all of the existing machinery? Particularly the
 way quote creates Quoter objects and stores them in a cache. I haven't
 done any speed tests, but I assume that was all there for performance
 reasons.

I see no real advantage there, except that it has a built-in memory leak.
Just use a function.

 * The idea of quote_as_bytes is malformed. quote_as_bytes takes a str or
 bytes, and outputs a URI as a bytes, while quote_as_string outputs a URI
 as a str. This is the first time in the whole discussion we've
 represented a URI as bytes, not a str. URIs are not byte sequences, they
 are character sequences (see discussion below).

Just there for consistency.  Of course,  URIs are actually strings of
*ASCII* characters, which sort of specifies an encoding right there, so
using ASCII octets isn't all that far-fetched...

 * The names unquote_as_* and quote_as_* are confusing. Use unquote_to_*
 and quote_from_* to avoid ambiguity.

Good point.

 * Are unquote_as_string and unquote both part of your public interface?

Yes.  Good programmers will switch to unquote_as_string or unquote_as_bytes
(or, with your amendment, unquote_to_string and unquote_to_bytes, while
unquote is just there for backwards compatibility for naifs.

* As Antoine pointed out above, it's too limiting for quote to force
 UTF-8. Add a 'charset' parameter.

That's what quote_as_string is for.

 * Add an 'errors' parameter too, to give the caller control over how
 strict to be.

No.  Errors should be seen.  This is data, not whimsey.


 * unquote and unquote_plus are missing 'charset' param, which should be
 passed along to unquote_as_string.

No, they're only there for backwards compatibility, and the 2.x versions
don't have a charset param. *

I do like the addition of a plus argument, as opposed to the

 separate unquote_plus and quote_plus functions. I'd swap the arguments
 to unquote around so charset is first and then plus, so you can write
 unquote(mystring, 'utf-8') without using a keyword argument.

Unquote doesn't take a charset (in my design).


 * In unquote: The raw_unicode_escape encoding makes no sense. It does
 exactly the same thing as Latin-1, except it also looks for b\\u
 in the string and converts that into a Unicode character. So your code
 behaves like this:

  urllib.parse.unquote('%5Cu00fc')
 'ü'
 (Should output \u00fc)
  urllib.parse.unquote('%5Cu')
 UnicodeDecodeError: 'rawunicodeescape' codec can't decode bytes in
 position 11-12: truncated \u
 (Should output \u)

 I suspect the email package (where you got the inspiration to use
 'rawunicodeescape') has this same crazy problem, but that isn't my
 concern today!

 Aside from this weirdness, you're essentially defaulting unquote to
 Latin-1. As I've said countless times, unquote needs to be the inverse
 of quote, or you get this behaviour:

  urllib.parse.unquote(urllib.parse.quote('ü'))
 'ü'

 Once again, I refer you to my favourite web server example.

 import http.server
 s = http.server.HTTPServer(('',8000),
http.server.SimpleHTTPRequestHandler)
 s.serve_forever()

 Run this in a directory with a non-Latin-1 filename (eg. 漢字), and
 you will get a 404 when you click on the file.

Using unquote() and expecting a string is basically broken already.  So what
I'm trying to do here is to avoid losing data in the translation.

 * One issue I worked very hard to solve is how to deal with unescaped
 non-ASCII characters in unquote. Technically this is an invalid URI, so
 I'm not sure how important it is, but it's nice to be able to assume the
 unquote function won't mess with them. For example,
 unquote_as_string(\u6f22%C3%BC, charset=latin-1) should give
 \u6f22\u00fc (or at least it would be nice). Yours raises
 UnicodeEncodeError: 'ascii' codec can't encode character. (I assume
 this is a wanted property, given that the existing test suite tests that
 unquote can handle ALL unescaped ASCII characters (that's what
 escape_string in test_unquoting is for) - I merely extend this concept
 to be able to handle all unescaped Unicode characters). Note that it's
 impossible to allow such lenience if you implement unquote_as_string as
 calling unquote_as_bytes and then decoding.

Good thing we don't need to; URIs consist of ASCII characters.


 * Question: How does unquote_bytes deal with unescaped characters?

Not sure I understand this question...


 

[issue3300] urllib.quote and unquote - Unicode issues

2008-08-11 Thread Bill Janssen

Changes by Bill Janssen [EMAIL PROTECTED]:


Removed file: http://bugs.python.org/file11101/unnamed

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3300
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3300] urllib.quote and unquote - Unicode issues

2008-08-11 Thread Bill Janssen

Bill Janssen [EMAIL PROTECTED] added the comment:

Some interesting notes here (from Erik van der Poel at Google; Guido,
you might want to stroll over to his location and talk with him):

http://lists.w3.org/Archives/Public/www-international/2007JanMar/0004.html

and more particularly

http://lists.w3.org/Archives/Public/www-international/2008AprJun/0092.html,
which says, in part,

``Within the context of HTML and HTTP, queries
[that is, the query part of a URL] don't have to say which
charset they are using, because there is already an agreement in
place: the major browsers and servers use the charset of the HTML.''

So, there's still a sizable number of Latin-1 pages out there, and
queries against these pages will use that encoding in the URL's they send.

And then there's this:

http://lists.w3.org/Archives/Public/www-international/2008AprJun/0014.html

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3300
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2389] Array pickling exposes internal memory representation of elements

2008-08-11 Thread Alexandre Vassalotti

Alexandre Vassalotti [EMAIL PROTECTED] added the comment:

The slowdown depends of the array type. The patch makes array unpickling
a few orders of magnitude slower (i.e. between 4 and 15 times slower
depending of the array type). In general, pickling is about as fast as
with the binary representation (or faster!). 

Although since most 64-bit compilers uses the LP64 model, I think we
could make a compromise and only pickle as a list arrays of long
integers. This would fix the problem without any visible speed penalties.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2389
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com