[issue8327] unintuitive behaviour of logging message propagation

2010-04-07 Thread Pascal Chambon

Pascal Chambon  added the comment:

Thanks for the doc patch, if you don't mind I'd just add the paragraph below 
too, to clarify the fact that logger levels are only "entry points" levels, 
ignored he rest of the time. There might be slight redundancies with the rest 
of the (long) documentation, but it's all benefit imo. B-)

"In addition to any handlers directly associated with a logger, *all handlers 
associated with all ancestors of the logger* are called to dispatch the message 
(unless the *propagate* flag for a logger is set to a false value, at which 
point the passing to ancestor handlers stops).

Note that in this process, the level of ancestor loggers is never considered : 
only their *propagate* attribute and the levels of their loggers canimpact the 
treatment on the message being dispatched. The level of a logger is thus only 
acting as an *entry point barrier*, only able to stop the whole dispatch of a 
message that enters the system through it."

--

___
Python tracker 

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



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-04-07 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

STINNER Victor wrote:
> 
> STINNER Victor  added the comment:
> 
>> I also found out that, according to RFC 3629, surrogates 
>> are considered invalid and they can't be encoded/decoded, 
>> but the UTF-8 codec actually does it.
> 
> Python2 does, but Python3 raises an error.
> 
> Python 2.7a4+ (trunk:79675, Apr  3 2010, 16:11:36)
 u"\uDC80".encode("utf8")
> '\xed\xb2\x80'
> 
> Python 3.2a0 (py3k:79441, Mar 26 2010, 13:04:55)
 "\uDC80".encode("utf8")
> UnicodeEncodeError: 'utf-8' codec can't encode character '\udc80' in position 
> 0: surrogates not allowed
> 
> Deny encoding surrogates (in utf8) causes a lot of crashs in Python3, because 
> most functions calling suppose that _PyUnicode_AsString() does never fail: 
> see #6687 (and #8195 and a lot of other crashs). It's not a good idea to 
> change it in Python 2.7, because it would require a huge work and we are 
> close to the first beta of 2.7.

I wonder how that change got into the 3.x branch - I would certainly
not have approved it for the reasons given further up on this ticket.

I think we should revert that change for Python 3.2.

--

___
Python tracker 

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



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-04-07 Thread STINNER Victor

STINNER Victor  added the comment:

> >> I also found out that, according to RFC 3629, surrogates
> >> are considered invalid and they can't be encoded/decoded,
> >> but the UTF-8 codec actually does it.
> >
> > Python2 does, but Python3 raises an error.
> > (...)
> 
> I wonder how that change got into the 3.x branch - I would certainly
> not have approved it for the reasons given further up on this ticket.
> 
> I think we should revert that change for Python 3.2.

See r72208 and issue #3672.

pitrou wrote "We could fix it for 3.1, and perhaps leave 2.7 unchanged if some 
people rely on this (for whatever reason)."

--
title: str.decode('utf8',   'replace') -- conformance with Unicode 5.2.0 -> 
str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

___
Python tracker 

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



[issue8332] regrtest single TestClass/test_method

2010-04-07 Thread anatoly techtonik

New submission from anatoly techtonik :

It would be convenient for debug to execute single test_method or TestClass. 
Running all tests in file can take a long time.

--
components: Tests
messages: 102524
nosy: techtonik
severity: normal
status: open
title: regrtest single TestClass/test_method
type: feature request
versions: Python 2.7

___
Python tracker 

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



[issue8332] regrtest single TestClass/test_method

2010-04-07 Thread anatoly techtonik

anatoly techtonik  added the comment:

regrtest [options] test_file.TestClass
regrtest [options] test_file.test_method

--

___
Python tracker 

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-04-07 Thread Michael Haubenwallner

Michael Haubenwallner  added the comment:

This very same problem happens (with Python-2.6.2) on AIX5.3 now too, after 
upgrading to:
$ oslevel -s
5300-08-09-1013

Unlike before (comparing with old build logs), this AIX5.3 now provides flock() 
in  and libbsd.a[shr.o] like AIX6.1.

Interesting enough, /usr/lib/libbsd.a contains 32bit shared objects only, so 
-lbsd does not help in 64bit mode (don't know if python actually supports 64bit 
on AIX). I don't have an AIX6.1 to check this.

Because of this, upgrading "checking for flock" from compile- to link-check 
(eventually trying -lbsd a second time) might help?

--
nosy: +haubi

___
Python tracker 

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



[issue8331] a documentation grammar fix in logging module

2010-04-07 Thread Vinay Sajip

Vinay Sajip  added the comment:

Fix checked into trunk (r79888).

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

___
Python tracker 

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



[issue8314] test_ctypes fails in test_ulonglong on sparc buildbots

2010-04-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

It's surprising that test_ulonglong fails, while test_longlong passes:  can the 
Linux Sparc ABI really be treating these two types differently?

Maybe more information could be gained by supplying a more interesting test 
value than 42---some 8-byte value with all bytes different, for example.

In any case, this seems likely to be a libffi bug somewhere;  maybe we could 
bring it up on the libffi mailing list.  If we can translate the failing Python 
code into failing C code first that would probably increase the chances of 
getting a good answer.  Without access to Sparc hardware, I don't see much 
other way of making progress here.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue4026] fcntl extension fails to build on AIX 6.1

2010-04-07 Thread Michael Haubenwallner

Michael Haubenwallner  added the comment:

Ohw, looking on another machine, being AIX5.3 TL6:
$ oslevel -s
5300-06-00-

Here flock() is provided in libbsd.a(shr.o) (32bit only) too, but it isn't 
declared in any header-file. So that recent AIX5.3 patchset just adds the 
flock() declaration, not the function itself (is already there).

--

___
Python tracker 

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



[issue7585] difflib should separate filename from timestamp with tab

2010-04-07 Thread anatoly techtonik

anatoly techtonik  added the comment:

Added unittest for tab with and without set filedate.
Removed #7583 dependency with NORMALIZE_WHITESPACE.

--
Added file: http://bugs.python.org/file16797/issue7585.difflib-tab-unittest.diff

___
Python tracker 

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



[issue8314] test_ctypes fails in test_ulonglong on sparc buildbots

2010-04-07 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I have just studied the issue in detail; v8.S is indeed missing support for 
unsigned long long. Here is a patch.

--
keywords: +patch
nosy: +loewis
Added file: http://bugs.python.org/file16798/sparc.diff

___
Python tracker 

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



[issue8314] test_ctypes fails in test_ulonglong on sparc buildbots

2010-04-07 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Committed as r79892.

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

___
Python tracker 

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



[issue7834] socket.connect() no longer works with AF_BLUETOOTH L2CAP sockets

2010-04-07 Thread Yaniv Aknin

Yaniv Aknin  added the comment:

I've zero experience with programming bluetooth (to be honest, I only tackled 
this bug because I'm learning how to contribute to Python and it seemed 
ultra-easy), so I'm not an authoritative source on whether such a 'loopback' 
test is possible.

On #bluez in freenode I was told that generally no, there is no 'localhost' for 
BT sockets, and that a while ago there was a bluetooth emulation tool called 
'hciemu' which is no longer maintained.

I'm attaching the patch (it's just a oneliner), it passes regression though 
obviously isn't really tested by it... I suggest Mathew will try the patch out 
and see if it helps; we can decide how to proceed from there.

--
keywords: +patch
Added file: http://bugs.python.org/file16799/zero_l2cap_addr_struct.diff

___
Python tracker 

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



[issue6090] zipfile DeprecationWarning Python in 2.6, failure in 2.7

2010-04-07 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

This is not a bug in the code, but in the application. You are passing a date 
before 1980; this is not supported in zipfiles. Try passing 1980 instead of 1.

I think the error message could be better, though; it should probably be a 
ValueError.

Reducing the priority to normal.

--
nosy: +loewis
priority: critical -> normal

___
Python tracker 

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



[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2010-04-07 Thread Cyril

Cyril  added the comment:

Here is a patch that implements SSLSocket.get_mode/set_mode, with the 
SSL_MODE_ENABLE_PARTIAL_WRITE and SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER constants 
defined in the ssl module.

The patch contains a test case and documentation. It's made against trunk 44327 
and also applies nicely with --fuzz=3 on a 2.6.5.

There are no compatibility issues as no specific mode is set by default. It's 
up to the application to call SSLSocket.set_mode before use. I've tested my own 
use case with a set_mode(SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER), it works nicely.

--
Added file: http://bugs.python.org/file16800/ssl_mode.patch

___
Python tracker 

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



[issue6610] Subprocess descriptor debacle

2010-04-07 Thread Yaniv Aknin

Yaniv Aknin  added the comment:

It seems to me that subprocess is protected against this flaw. Python 2.x has a 
pure-Python implementation of the child logic (which is susceptible to an 
unrelated issue). Python 3.x has a C implementation which falls back to 
pure-Python if the former is not available.

Both implementations test explicitly that they're not closing standard file 
descriptors after the dup2() call in the child. It is my understanding that 
test is sufficient, I couldn't reproduce the bug in Python, and thus I think 
this issue should be closed.

All that said, there was no coverage in subprocess' test for this particular 
case (spawning a coprocess when the standard fds closed). I'm attaching a patch 
which adds a testcase to cover it.

--
keywords: +patch
nosy: +Yaniv.Aknin
Added file: 
http://bugs.python.org/file16801/test_subprocess_with_standard_fds_closed.diff

___
Python tracker 

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



[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-04-07 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +pitrou

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

I just found a one line example of the problem:

>>> EnumValue(HKEY_PERFORMANCE_DATA, 0)
Traceback (most recent call last):
  File "", line 1, in 
WindowsError: [Error 234] More data is available

Other functions are also affected:

>>> QueryValueEx(HKEY_PERFORMANCE_DATA, None)
Traceback (most recent call last):
  File "", line 1, in 
WindowsError: [Error 234] More data is available

In a nutshell, the Python implementation of these functions works like this:
  1) Query the API for the length of the value
  2) Allocate a buffer of that size
  3) Query the API for the value

However, the API functions called in step #1 are not guaranteed to be accurate. 
 It works *most* of the time, but if step #3 returns ERROR_MORE_DATA then we 
need to dynamically grow the buffer and try again until the data fits.

I'll have a patch (with test cases) ready later today.

--
versions: +Python 3.1, Python 3.2, Python 3.3

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread anatoly techtonik

anatoly techtonik  added the comment:

Great analysis!

--

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Stefan Krah

New submission from Stefan Krah :

On Windows/amd64, I get loads of pickling errors in test_multiprocessing.

Type 1 error:

Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 347, in 
main
self = load(from_parent)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 1378, in load
return Unpickler(file).load()
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 858, in load
dispatch[key](self)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 880, in load_eof
raise EOFError
EOFError


Type 2 error:

==
ERROR: test_fork (__main__.WithManagerTestQueue)
--
Traceback (most recent call last):
  File "..\..\Lib\test\test_multiprocessing.py", line 485, in test_fork
p.start()
  File "C:\Users\stefan\svn\trunk\lib\multiprocessing\process.py", line 104, in 
start
self._popen = Popen(self)
  File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 244, in 
__init__
dump(process_obj, to_child, HIGHEST_PROTOCOL)
  File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 167, in 
dump
ForkingPickler(file, protocol).dump(obj)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 224, in dump
self.save(obj)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce
save(state)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems
save(v)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 40, in 
dispatcher
self.save_reduce(obj=obj, *rv)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 401, in save_reduce
save(args)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 548, in save_tuple
save(element)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce
save(state)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems
save(v)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce
save(state)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict
self._batch_setitems(obj.iteritems())
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems
save(v)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save
self.save_reduce(obj=obj, *rv)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 396, in save_reduce
save(cls)
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
f(self, obj) # Call unbound method with explicit self
  File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 748, in save_global
(obj, module, name))
PicklingError: Can't pickle : it's not found as 
cStringIO.StringO

--
components: Library (Lib)
messages: 102539
nosy: skrah
priority: high
severity: normal
stage: needs patch
status: open
title: test_multiprocessing: pickling failures
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue8328] longobject.c: silence warnings (Visual Studio)

2010-04-07 Thread Stefan Krah

Stefan Krah  added the comment:

Committed in trunk (r79885), py3k (r79886) and release31-maint (r79891).

Thanks for the review!

--
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Brian Curtin

Changes by Brian Curtin :


--
assignee:  -> brian.curtin
priority:  -> normal
stage:  -> needs patch
versions:  -Python 2.4, Python 2.5, Python 3.3

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Brian Curtin

Changes by Brian Curtin :


--
assignee: brian.curtin -> 

___
Python tracker 

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



[issue3672] Ill-formed surrogates not treated as errors during encoding/decoding

2010-04-07 Thread Ezio Melotti

Changes by Ezio Melotti :


___
Python tracker 

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



[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2010-04-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

The patch adds a new feature, which makes it unsuitable for 2.6. I guess it 
could be applied to the 2.7 trunk, although a beta is being released and I'm 
not sure new features are really welcome afterwards. This one is really small 
and non-controversial, though, so I'd advocate accepting it.

The patch itself looks good.

--
nosy: +benjamin.peterson
stage: test needed -> commit review

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Tim Golden

Tim Golden  added the comment:

Seeing the same thing on 32-bit WinXP on x86

On 07/04/2010 14:34, Stefan Krah wrote:
>
> New submission from Stefan Krah:
>
> On Windows/amd64, I get loads of pickling errors in test_multiprocessing.
>
> Type 1 error:
>
> Traceback (most recent call last):
>File "", line 1, in
>File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 347, 
> in main
>  self = load(from_parent)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 1378, in load
>  return Unpickler(file).load()
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 858, in load
>  dispatch[key](self)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 880, in load_eof
>  raise EOFError
> EOFError
>
>
> Type 2 error:
>
> ==
> ERROR: test_fork (__main__.WithManagerTestQueue)
> --
> Traceback (most recent call last):
>File "..\..\Lib\test\test_multiprocessing.py", line 485, in test_fork
>  p.start()
>File "C:\Users\stefan\svn\trunk\lib\multiprocessing\process.py", line 104, 
> in start
>  self._popen = Popen(self)
>File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 244, 
> in __init__
>  dump(process_obj, to_child, HIGHEST_PROTOCOL)
>File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 167, 
> in dump
>  ForkingPickler(file, protocol).dump(obj)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 224, in dump
>  self.save(obj)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save
>  self.save_reduce(obj=obj, *rv)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce
>  save(state)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
>  f(self, obj) # Call unbound method with explicit self
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict
>  self._batch_setitems(obj.iteritems())
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in 
> _batch_setitems
>  save(v)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
>  f(self, obj) # Call unbound method with explicit self
>File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 40, 
> in dispatcher
>  self.save_reduce(obj=obj, *rv)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 401, in save_reduce
>  save(args)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
>  f(self, obj) # Call unbound method with explicit self
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 548, in save_tuple
>  save(element)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save
>  self.save_reduce(obj=obj, *rv)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce
>  save(state)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
>  f(self, obj) # Call unbound method with explicit self
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict
>  self._batch_setitems(obj.iteritems())
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in 
> _batch_setitems
>  save(v)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save
>  self.save_reduce(obj=obj, *rv)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce
>  save(state)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
>  f(self, obj) # Call unbound method with explicit self
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict
>  self._batch_setitems(obj.iteritems())
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in 
> _batch_setitems
>  save(v)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save
>  self.save_reduce(obj=obj, *rv)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 396, in save_reduce
>  save(cls)
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save
>  f(self, obj) # Call unbound method with explicit self
>File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 748, in save_global
>  (obj, module, name))
> PicklingError: Can't pickle: it's not found as 
> cStringIO.StringO
>
> --
> components: Library (Lib)
> messages: 102539
> nosy: skrah
> priority: high
> severity: normal
> stage: needs patch
> status: open
> title: test_multiprocessing: pickling failures
> type: behavior
> versions: Python 2.7
>
> ___
> Python tracker
> 
> ___
> ___
> Python-bugs-list mailing list
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-bugs-list/mail%40timgolden.me.uk

--
nosy: +tim.golden


[issue8334] winreg.QueryValue should return bytes, not unicode

2010-04-07 Thread Daniel Stutzbach

New submission from Daniel Stutzbach :

The Windows RegQueryValue function returns a registry value without returning 
the corresponding type information (e.g., REG_SZ for string, REG_BINARY for 
binary data, REG_DWORD for a 32-bit number, etc.).

The corresponding wrapper winreg.QueryValue currently calls 
PyUnicode_FromUnicode on the return data, which is fine if the type happens to 
be REG_SZ, but gibberish for anything else.  Since the format of data is 
unknown, it should return a bytes object rather than a unicode object.

If the user wants a REG_SZ converted to the unicode type automatically, than 
can use winreg.QueryValueEx instead.  QueryValueEx wraps RegQueryValueEx which 
*does* return the type information of the underlying value.  QueryValueEx uses 
the type information to convert to an appropriate Python type if possible (or 
returns a bytes object for unsupported types).

--
components: Library (Lib), Windows
messages: 102543
nosy: stutzbach
severity: normal
status: open
title: winreg.QueryValue should return bytes, not unicode
type: behavior
versions: Python 3.1, Python 3.2

___
Python tracker 

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



[issue8334] winreg.QueryValue should return bytes, not unicode

2010-04-07 Thread Brian Curtin

Changes by Brian Curtin :


--
components: +Extension Modules -Library (Lib)
nosy: +brian.curtin
priority:  -> normal

___
Python tracker 

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



[issue8275] callback function on win64 results in bad behavior. mem corruption?

2010-04-07 Thread Jasmit

Jasmit  added the comment:

I was able to fix the issue by modifying and re-compiling ctypes project in 
Visual Studio 2008.  The following properties were modified:

Release:
configuration Properties->C/C++->Optimization->Optimization: Disabled(/Od)
configuration Properties->C/C++->Optimization->Enable Intrinsic Functions:  No

--

___
Python tracker 

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



[issue8334] winreg.QueryValue should return bytes, not unicode

2010-04-07 Thread Eric Smith

Changes by Eric Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue8334] winreg.QueryValue should return bytes, not unicode

2010-04-07 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

Jumped the gun here.  RegQueryValue returns ERROR_DATA_INVALID if the value 
isn't a string, so converting to Unicode is OK.

--
status: open -> closed

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


Added file: http://bugs.python.org/file16802/winreg_test.pach

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


--
keywords: +patch
Added file: http://bugs.python.org/file16803/winreg.patch

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


Removed file: http://bugs.python.org/file16728/more_data_is_available.py

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


Removed file: http://bugs.python.org/file16729/more_data_is_available2.py

___
Python tracker 

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



[issue8330] Failures seen in test_gdb on buildbots

2010-04-07 Thread Dave Malcolm

Dave Malcolm  added the comment:

There's also a deprecation warning in that log:
/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py:229: 
DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
  if e.message != 'unichr() arg not in range(0x1) (narrow Python build)':

I'm attaching a fix for this; tested with -Wd and it works.

This doesn't yet address the other two failures.

--
keywords: +patch
stage:  -> patch review
Added file: 
http://bugs.python.org/file16804/fix-test_gdb-deprection-warning.patch

___
Python tracker 

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



[issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters

2010-04-07 Thread Daniel Stutzbach

Daniel Stutzbach  added the comment:

I've uploaded two patches (against trunk): one to add test cases that 
demonstrate this bug and another to fix the bug.

--

___
Python tracker 

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



[issue7472] email.encoders.encode_7or8bit(): typo "iso-2202". "iso-2022" is correct.

2010-04-07 Thread R. David Murray

R. David Murray  added the comment:

After tracing the code further I now understand what the original patch is 
doing, and yes the spelling correction is the correct fix.  (The issue is that 
there are two different encodings involved: the input encoding in which the 
body is encoded when encode_7or8 bit is called, and the 'output' encoding that 
will be used to render the message when it is serialized to bytes.  In the case 
of iso-2022, it is used as the output encoding for at least one input encoding 
that is an eight bit encoding.  iso-2022 is pretty much the *only* encoding 
that appears as an output encoding different from the input encoding.)

Applying the patch will have to wait until the branch unfreezes.  I also think 
that I will not apply it to 2.6, since it is not fixing a bug that anyone has 
reported as breaking their code, but does represent a behavior change.

Since we have proven in the course of analyzing this that the code is untested, 
perhaps someone would like to write some unit tests for it?

--
priority: normal -> low
resolution:  -> accepted
versions:  -Python 2.6

___
Python tracker 

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



[issue8297] AttributeError message text should include module name

2010-04-07 Thread R. David Murray

R. David Murray  added the comment:

This is a feature request, so it only applies to unreleased versions.  It'll be 
up to Benjamin whether it can go into 2.7, if the change is approved, since 2.7 
is now technically in feature freeze.

The patch also needs unit tests.

I do like the idea of making the error messages more specific.  I have not 
reviewed the patch itself.

--
components: +Interpreter Core -Library (Lib)
nosy: +r.david.murray
stage: needs patch -> test needed
versions: +Python 3.2 -Python 2.6

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-07 Thread R. David Murray

R. David Murray  added the comment:

The unit test passes on trunk for me without the fix applied.

--

___
Python tracker 

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



[issue7585] difflib should separate filename from timestamp with tab

2010-04-07 Thread R. David Murray

R. David Murray  added the comment:

Great, thanks.  I'll check this in when the branch is unfrozen.

--
dependencies:  -doctest should normalize tabs when comparing output

___
Python tracker 

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



[issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment

2010-04-07 Thread jan matejek

New submission from jan matejek :

when running testsuite in a clean environment without pre-installed system 
python, test_distutils fail in test_build_ext, test_get_outputs:
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: 
cannot find -lpython2.6
LinkError: command 'gcc' failed with exit status 1

full traceback is below.

this is most likely caused by change in r72637:
http://svn.python.org/view/python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py?r1=72637&r2=72636&pathrev=72637
this changes compiler's working directory, so that it can no longer find 
libpython2.6.so with "-L."
(related to issue 6022 - the comments there point it out)

not sure about proper fix - personally, i don't care much about leaving one 
more file in builddir, whereas i do care about tests passing in clean env, so 
for SUSE i'm reverting r72637


full traceback:

test_distutils
/usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: 
cannot find -lpython2.6
collect2: ld returned 1 exit status
test test_distutils failed -- Traceback (most recent call last):
  File 
"/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/tests/test_build_ext.py", 
line 261, in test_get_outputs
cmd.run()
  File 
"/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 
340, in run
self.build_extensions()
  File 
"/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 
449, in build_extensions
self.build_extension(ext)
  File 
"/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 
531, in build_extension
target_lang=language)
  File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/ccompiler.py", line 
769, in link_shared_object
extra_preargs, extra_postargs, build_temp, target_lang)
  File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/unixccompiler.py", 
line 259, in link
raise LinkError, msg
LinkError: command 'gcc' failed with exit status 1

--
assignee: tarek
components: Distutils
messages: 102552
nosy: matejcik, tarek
severity: normal
status: open
title: distutils test_build_ext's test_get_outputs fails in bootstrap 
environment
type: compile error
versions: Python 2.6

___
Python tracker 

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



[issue6022] test_distutils leaves a 'foo' file behind in the cwd

2010-04-07 Thread jan matejek

jan matejek  added the comment:

see issue 8335

--
nosy: +matejcik

___
Python tracker 

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



[issue7559] TestLoader.loadTestsFromName swallows import errors

2010-04-07 Thread Chris Jerdonek

Chris Jerdonek  added the comment:

Thanks, David.  Sorry about that.  The test probably requires one additional 
level of nesting so that "parts_copy" is not False:

+if not parts_copy or not module_not_found:
 raise

--

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +jnoller

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Jesse Noller

Jesse Noller  added the comment:

When did this problem start?

--

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Stefan Krah

Stefan Krah  added the comment:

It was introduced in r79623, and the attached patch makes the problem
go away. I would be happy to apply it, but I perhaps you and Michael
could analyze if there are unwanted dependencies between multiprocessing
and unittest.

--
nosy: +michael.foord

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Stefan Krah

Changes by Stefan Krah :


--
keywords: +patch
Added file: http://bugs.python.org/file16805/issue8333.patch

___
Python tracker 

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



[issue8336] PyObject_CallObject - Not "reference-count-neutral"

2010-04-07 Thread Krauzi

New submission from Krauzi :

In the docs there is written:
"PyObject_CallObject() is “reference-count-neutral” with respect to its 
arguments."
This is not correct. Its only reference-count neutral if the call was 
SUCCESSFUL otherwise the argument is INCREFED! 
Can anyone confirm this?

Cheers Krauzi.

--
assignee: georg.brandl
components: Documentation
messages: 102557
nosy: Krauzi, georg.brandl
severity: normal
status: open
title: PyObject_CallObject - Not "reference-count-neutral"
versions: Python 2.6

___
Python tracker 

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



[issue8337] test_gdb fails on Sparc Ubuntu

2010-04-07 Thread Martin v . Löwis

New submission from Martin v. Löwis :

test_gdb fails on Sparc-Ubuntu, e.g.

http://www.python.org/dev/buildbot/trunk/builders/sparc%20Ubuntu%20trunk/builds/45/steps/test/logs/stdio

test test_gdb failed -- Traceback (most recent call last):
  File 
"/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_gdb.py", 
line 372, in test_corrupt_tp_name
'set op->ob_type->tp_name=0xDEADBEEF')
  File 
"/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_gdb.py", 
line 341, in assertSane
(gdb_repr, gdb_output))
AssertionError: Unexpected gdb representation: '42'
Breakpoint 1 at 0x876a8: file Objects/object.c, line 330.
[Thread debugging using libthread_db enabled]

Breakpoint 1, PyObject_Print (op=42, fp=0x70300d38, flags=1)
at Objects/object.c:330
330 return internal_print(op, fp, flags, 0);
#0  PyObject_Print (op=42, fp=0x70300d38, flags=1) at Objects/object.c:330
#1  0x000492f8 in file_PyObject_Print (op=42, f=0x70336098, flags=1)
at Objects/fileobject.c:110
#2  0x00050774 in PyFile_WriteObject (v=42, f=, 
flags=1) at Objects/fileobject.c:2470
#3  0x00120d98 in PyEval_EvalFrameEx (f=
Frame 0x2ab788, for file , line 1, in  (), throwflag=0)
at Python/ceval.c:1769
#4  0x00129658 in PyEval_EvalCodeEx (co=0x70353c28, globals=
{'__builtins__': , '__name__': '__main__', 
'__doc__': None, '__package__': None}, locals=
{'__builtins__': , '__name__': '__main__', 
'__doc__': None, '__package__': None}, args=0x0, argcount=0, kws=0x0, 
kwcount=0, 
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253
#5  0x0011b99c in PyEval_EvalCode (co=0x70353c28, globals=
{'__builtins__': , '__name__': '__main__', 
'__doc__': None, '__package__': None}, locals=
{'__builtins__': , '__name__': '__main__', 
'__doc__': None, '__package__': None}) at Python/ceval.c:666
#6  0x0016c3c8 in run_mod (mod=0x2b1c38, filename=0x23d850 "", globals=
{'__builtins__': , '__name__': '__main__', 
'__doc__': None, '__package__': None}, locals=
{'__builtins__': , '__name__': '__main__', 
'__doc__': None, '__package__': None}, flags=0xfff8d664, arena=0x2b69d0)
at Python/pythonrun.c:1340
#7  0x0016c240 in PyRun_StringFlags (str=0x28c008 "print 42\n", start=257, 
globals=
{'__builtins__': , '__name__': '__main__', 
'__doc__': None, '__package__': None}, locals=
{'__builtins__': , '__name__': '__main__', 
'__doc__': None, '__package__': None}, flags=0xfff8d664) at 
Python/pythonrun.c:1303
#8  0x0016a494 in PyRun_SimpleStringFlags (command=0x28c008 "print 42\n", 
flags=0xfff8d664) at Python/pythonrun.c:962
#9  0x0002190c in Py_Main (argc=4, argv=0xfff8d7e4) at Modules/main.c:536
#10 0x0001fe88 in main (argc=4, argv=0xfff8d7e4) at ./Modules/python.c:23


Because of these ongoing failures, I'm completely disabling the gdb tests for 
now.

--
assignee: dmalcolm
keywords: buildbot
messages: 102558
nosy: dmalcolm, loewis
severity: normal
status: open
title: test_gdb fails on Sparc Ubuntu
versions: Python 2.7

___
Python tracker 

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



[issue8337] test_gdb fails on Sparc Ubuntu

2010-04-07 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Test disabled in r79896.

--

___
Python tracker 

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



[issue8337] test_gdb fails on Sparc Ubuntu

2010-04-07 Thread Ezio Melotti

Ezio Melotti  added the comment:

See also #8330, same failure, different buildbot.
Unless they need to be tracked separately I'll close this as duplicate

--
nosy: +ezio.melotti

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Michael Foord

Michael Foord  added the comment:

I expect the unittest tests will fail with that patch applied however... No 
problem with switching to just using StringIO in unittest though - preferably 
with a comment as to why.

--

___
Python tracker 

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



[issue8337] test_gdb fails on Sparc Ubuntu

2010-04-07 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> Failures seen in test_gdb on buildbots

___
Python tracker 

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



[issue8337] test_gdb fails on Sparc Ubuntu

2010-04-07 Thread Dave Malcolm

Dave Malcolm  added the comment:

( #8330 has a patch for a DeprecationWarning )

--

___
Python tracker 

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



[issue3871] cross and native build of python for mingw32 with distutils

2010-04-07 Thread Roumen Petrov

Changes by Roumen Petrov :


Added file: http://bugs.python.org/file16806/python-trunk-20100407-MINGW.patch

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



[issue8240] ssl.SSLSocket.write may fail on non-blocking sockets

2010-04-07 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Wouldn't it be nicer if mode was a property?

--

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Perhaps we could run the multiprocessing tests unbuffered?

--
nosy: +loewis

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

BTW, this is also causing all Windows buildbots to fail.

--
keywords: +buildbot

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Martin v . Löwis

Changes by Martin v. Löwis :


--
priority: high -> release blocker

___
Python tracker 

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



[issue4484] struct: per item endianess specification

2010-04-07 Thread Charles-Francois Natali

Charles-Francois Natali  added the comment:

I don't see any reasonale reason for mixing endianess inside a struct, and 
don't know of any real-life protocol using per-item endianess.
Unless someone comes up with a good reason for doing so, and since no one else 
seems to be interested by this issue, I'd suggest to close it.

--
nosy: +neologix

___
Python tracker 

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



[issue8338] Outdated information

2010-04-07 Thread David W. Lambert

New submission from David W. Lambert :

http://docs.python.org/py3k/library/multiprocessing.html

Doc/library/multiprocessing.rst refers to "SimpleHTTPServer.HttpServer".  The 
patch changes this to "SimpleHTTPRequestHandler" although you may prefer 
"http.server.SimpleHTTPRequestHandler" or, of course, something entirely 
different.

Thanks, Dave.

--
assignee: georg.brandl
components: Documentation
files: multiprocessing_docs.patch
keywords: patch
messages: 102567
nosy: LambertDW, georg.brandl
severity: normal
status: open
title: Outdated information
versions: Python 3.1, Python 3.2, Python 3.3
Added file: http://bugs.python.org/file16807/multiprocessing_docs.patch

___
Python tracker 

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



[issue4484] struct: per item endianess specification

2010-04-07 Thread Mark Dickinson

Mark Dickinson  added the comment:

I agree that this seems like something that would rarely be needed.  If it's 
really necessary, it's possible to break up the format and do the 
packing/unpacking in fixed-endian pieces.

--
nosy: +mark.dickinson
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://'

2010-04-07 Thread Michael Glassford

New submission from Michael Glassford :

An unfortunate side-effect of this change: 

http://svn.python.org/view/python/branches/release26-maint/Lib/urlparse.py?r1=66717&r2=78235

which was made to fix this issue: 

http://bugs.python.org/issue7904

is that urlparse.urlunparse(urlparse.urlparse('x://')) now returns 'x:' instead 
of 'x://', and urlparse.urlunparse(urlparse.urlparse('x:///y')) now returns 
'x:/y' instead of 'x:///y'.

This behavior exists in at least Python 2.6 and 3.1, but not in 2.5.

--
messages: 102569
nosy: Michael Glassford
severity: normal
status: open
title: urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://'
type: behavior
versions: Python 2.6, Python 3.1

___
Python tracker 

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



[issue4484] struct: per item endianess specification

2010-04-07 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

FWIW, I concur with Mark and Charles-Francois.

--
nosy: +rhettinger

___
Python tracker 

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



[issue8330] Failures seen in test_gdb on buildbots

2010-04-07 Thread Dave Malcolm

Dave Malcolm  added the comment:

Both of the failing tests use "set" inside gdb to try to corrupt the memory of 
the inferior process.

I believe the issue here is that reading through 0xDEADBEEF within gdb on this 
machine isn't generating a RuntimeError; perhaps that _is_ a valid pointer in 
the address space of that process (or perhaps we're seeing another gdb-vs-gdb 
version difference aka issue #8279)

Within PrettyPrintTests.test_corrupt_tp_name, such a situation leads to the use 
of tp_flags, and the presence of Py_TPFLAGS_INT_SUBCLASS leads to python-gdb.py 
using PyIntObject, and it correctly print "42", even after op->ob_type->tp_name 
now has a garbage value, whereas the test was expecting the fallback handler.

Within PrettyPrintTests.test_corrupt_ob_type, it appears that we're using 
FakeRepr, and that ((PyTypeObject*)0xDEADBEEF->tp_name) within the process 
pointed at a NUL byte, when my code was expecting gdb to fail to read through 
((PyTypeObject*)0xDEADBEEF->tp_name) with a RuntimeError.

I'm attaching a patch which tries to generalize the expected output from these 
tests, so that they pass if the corruption in the inferior process doesn't 
manage to confuse gdb, and if 0xDEADBEEF happens to point at something 
unexpected.

I tested this with PrettyPrintTests active (it continues to all pass on my 
machine), but commented it out when generating the patch.

This also includes the fix for the DeprecationWarning mentioned in msg102546

--
Added file: 
http://bugs.python.org/file16808/fix-overfussy-gdb_text_corruption-tests-and-deprecation-warning.patch

___
Python tracker 

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



[issue8337] test_gdb fails on Sparc Ubuntu

2010-04-07 Thread Dave Malcolm

Dave Malcolm  added the comment:

( #8330 has a patch which may fix this )

--

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Michael Foord

Michael Foord  added the comment:

TestResult creates its StringIO buffers even if they aren't use. I can create 
them on first use and use StringIO.StringIO rather than cStringIO. Will fix now.

--

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Michael Foord

Michael Foord  added the comment:

Although merely switching to StringIO may not be enough. TestResult objects 
keep a reference to sys.stdout when they are instantiated and you can't pickle 
that either.

It is preferable for the reference to be taken at instantiation time rather 
than stored as a module level reference to be compatible with test runners 
(like regrtest) that *themselves* replace sys.stdout...

--

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-07 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

While trying to reproduce the transient test_tarfile errors, I found two more 
tests that appear to be failing when symlinks cannot be created, now skipped by 
patch 27.

--
Added file: http://bugs.python.org/file16809/windows symlink draft 27.patch

___
Python tracker 

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



[issue8340] bytearray undocumented on trunk

2010-04-07 Thread Brian Curtin

New submission from Brian Curtin :

It looks like the bytearray documentation wasn't backported when the bytearray 
code was. See Doc/library/functions.rst

--
assignee: georg.brandl
components: Documentation
messages: 102576
nosy: brian.curtin, georg.brandl
severity: normal
stage: needs patch
status: open
title: bytearray undocumented on trunk
type: behavior
versions: Python 2.7

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Michael Foord

Michael Foord  added the comment:

Changing unittest.TestResult to use StringIO instead of cStringIO isn't 
sufficient. regrtest.py also needs to use StringIO...

--

___
Python tracker 

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



[issue2824] zipfile to handle duplicate files in archive

2010-04-07 Thread Yaniv Aknin

Yaniv Aknin  added the comment:

This affect 3.x as well.

Regardless of the exact version this will come out in, I think the only proper 
solution is one with which we eventually, maybe in two versions' time, end up 
with a behaviour that raises an exception upon double insertion. Also, we 
should leave some switch to allow double insertions (as someone may /want/ to 
create a peculiar file). If we agree that's a worthy end goal, let's see what 
deprecation path we take to get there.

I feel PEP4/PEP5 cover more significant changes to the language/stdlib than 
this, but in their spirit I propose the following concrete solution: For the 
nearest possible version let's issue a DeprecationWarning when adding dual 
files and provide a global switch that will change the DeprecationWarning into 
raising a relevant exception instead. For the version after that, let's remove 
the DeprecationWarning warning altogether and choose one of these behaviours:
 (a) a global switch that will raise by default
 (b) a switch in ZipFile's __init__() that will raise by default
 (c) a switch in ZipFile's write() that will raise by default

I vote for (c), but I think the delta between the options is small.

If this is agreeable with the audience, I'll be happy to produce a patch 
against 2.7 and 3.2 that will provide the chosen behaviour, as well as change 
tests and documentation accordingly. I realize that time is of the essence if 
we want this included in 2.7, and I'll be happy to do the work in a timely 
manner, so if you're interested kindly let me know what you feel while the 
iron's hot. Either way, I'll be happy to see it in any future version.

Regarding the behaviour brtzsnr observed, I think it's a separate bug. I'll try 
to reproduce this behaviour, and open a separate ticket if I manage to do so.

blah. Small bug, many words!

--
nosy: +Yaniv.Aknin
versions: +Python 3.2

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Michael Foord

Michael Foord  added the comment:

I believe this issue to now be fixed on trunk. We can close this when the 
buildbots are passing again.

--

___
Python tracker 

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



[issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://'

2010-04-07 Thread R. David Murray

R. David Murray  added the comment:

To fix this, urlparse would have to differentiate between a null netloc and no 
netloc characters specified at all.  This could be done by using None for one 
an '' for the other.  I'm not sure that behavior change could be backported to 
2.6, though.

Did this issue actually cause a program failure for you in 2.6?  If so the 
original patch might wind up getting classed as a regression for the 2.6 line.

--
keywords: +easy
nosy: +orsenthil, r.david.murray
priority:  -> normal
stage:  -> test needed
versions: +Python 2.7, Python 3.2

___
Python tracker 

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



[issue8333] test_multiprocessing: pickling failures

2010-04-07 Thread Michael Foord

Michael Foord  added the comment:

Green build on Windows XP, trunk.

http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%20trunk/builds/282

--
resolution:  -> accepted
stage: needs patch -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue7301] Add environment variable $PYTHONWARNINGS

2010-04-07 Thread Philip Jenvey

Philip Jenvey  added the comment:

Here's a patch for py3k using the same char2wchar as the argv decoder for 
posix, and better windows handling. Plus an additional nonascii value test. 
Patch is against r79980 for clarity

--
Added file: http://bugs.python.org/file16810/issue7301-py3k.diff

___
Python tracker 

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



[issue8341] sphinx bug?

2010-04-07 Thread David W. Lambert

New submission from David W. Lambert :

http://docs.python.org/py3k/library/multiprocessing.html

Indentation is incorrect as displayed and copied from google chrome browser:


 from multiprocessing import Process

def f(name):
print('hello', name)

 if __name__ == '__main__':
 p = Process(target=f, args=('bob',))
 p.start()
 p.join()

--
assignee: georg.brandl
components: Documentation
messages: 102583
nosy: LambertDW, georg.brandl
severity: normal
status: open
title: sphinx bug?
versions: Python 3.2

___
Python tracker 

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



[issue8342] Python fails to run if launched from NTFS symlink and DLL not in PATH

2010-04-07 Thread Jason R. Coombs

New submission from Jason R. Coombs :

While trying to work out a failing 
test_platform.PlatformTest.test_architecture_via_symlink, I found a more 
fundamental problem.

In the build environment, python.exe depends on pythonXX.dll being in the same 
directory as sys.executable to load the interpreter. If Python is launched from 
an NTFS symlink, sys.executable may be located in a directory other than the 
DLL, and the interpreter fails to run (returning exit code 0xC135).

This may be expected behavior, but it causes test_architecture_via_symlink to 
fail once Python becomes aware of symlinks in Windows (sans cygwin).

It took me a while to track this down, so I wanted to be sure to document the 
behavior.

--
components: Tests, Windows
messages: 102584
nosy: jaraco
severity: normal
status: open
title: Python fails to run if launched from NTFS symlink and DLL not in PATH
versions: Python 3.1, Python 3.2

___
Python tracker 

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



[issue8342] Python fails to run if launched from NTFS symlink and DLL not in PATH

2010-04-07 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

This attached patch against the py3k branch adds a test that reproduces the 
described behavior.

--
keywords: +patch
Added file: http://bugs.python.org/file16811/reproduction as test.patch

___
Python tracker 

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



[issue8342] Python fails to run if launched from NTFS symlink and DLL not in PATH

2010-04-07 Thread Brian Curtin

Brian Curtin  added the comment:

I have this fixed locally in a version of your os.symlink patch. The solution 
is to add the directory sys.executable is from to os.environ["Path"], then that 
test should pass the custom environment when the subprocess is created. I meant 
to update you on the patch I was almost ready to check-in -- I'll send it in 
private.

Overall, I don't believe there is an issue here so I'll close this.

--
nosy: +brian.curtin
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-07 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I've been fighting a failing test in test_platform (when 
test.support.can_symlink() is True). Turns out the problem is caused by the 
fact that the Python DLL cannot be resolved when the executable isn't in the 
same directory (which is the case when launched from a symlink). I've created 
issue8342 to track this behavior.

--

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-07 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file16196/windows symlink draft 25.patch

___
Python tracker 

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



[issue1578269] Add os.symlink() and os.path.islink() support for Windows

2010-04-07 Thread Jason R. Coombs

Changes by Jason R. Coombs :


Removed file: http://bugs.python.org/file16761/windows symlink draft 26.patch

___
Python tracker 

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



[issue8342] Python fails to run if launched from NTFS symlink and DLL not in PATH

2010-04-07 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

Thanks!

--

___
Python tracker 

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



[issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://'

2010-04-07 Thread Michael Glassford

Michael Glassford  added the comment:

It caused a minor issue with the Schemes extension for Mercurial: the output 
changed, which caused a unit test to fail. I'm pretty sure I have a Mercurial 
patch to fix that issue, however.

--

___
Python tracker 

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



[issue8029] bug in 2to3 dealing with "print FOO, " followed by "sys.stdout.write('')"

2010-04-07 Thread Matt Bond

Matt Bond  added the comment:

I've attached a patch that fixes this particular idiom as well as a problem 
with the handling of bare 'print' statements. It also includes updated tests 
for these issues.

--
keywords: +patch
nosy: +zxaos
Added file: http://bugs.python.org/file16812/fix8029.patch

___
Python tracker 

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



[issue7978] SocketServer doesn't handle syscall interruption

2010-04-07 Thread Yaniv Aknin

Yaniv Aknin  added the comment:

First, let me cast my vote in favour of leaving select() itself alone, it's 
excessive to fix this issue with changing select().

Second, while exarkun's comments are accurate, I understand where pitrou is 
coming from. EINTR is not a pathological case, but it's not commonplace, 
either. I believe that on modern Unices (I tried Linux and OpenSolaris), the 
default handler for SIGCHLD will restart interrupted calls. By default, SIGUSR1 
and most sane others, will kill the process anyway. So I can understand the 
purity of the argument that if a process sets a signal handler, it might just 
as well set SA_RESTART and be done with it.

That said, Imagine I write a forking server with SocketServer which sets a 
signal handler for SIGCHLD, and I don't set SA_RESTART because I don't think I 
need to. I believe this is a valid real-world scenario where (a) I don't expect 
an EINTER-related exception to be raised from SocketServer, (b) SocketServer 
can actually do something about it, and (c) I doubt the old EINTR behaviour is 
relied upon by anyone (now I'm /certain/ someone relying on this will 
pop-up...). I think its a safer bet on behalf of SocketServer (and subprocess, 
etc) to use something like untilConcludes.

If we agree so far, I believe that an implementation of untilConcludes *should* 
be added to stdlib ("signal.restartable_call", anyone?). If people agree, I'd 
be happy to produce the patch (trunk+py3k, doc+test). Other than SocketServer 
and subprocess, anything else that should use "untilConcludes"?

Finally, to answer pitrou's second question, I'm pretty sure untilConcludes as 
presented will not hurt other signal handlers. The interrupt handler will be 
executed before returning to untilConcludes' loop and manually restarting the 
call, so KeyboardInterrupt (or anything else signalistic) will behave as 
expected.

I'm attaching a toy 3.x program to play with select() and EINTR, I used it in 
writing this comment. Gee, it even has an OptionParser CLI to save you some 
commenting-out.

--
nosy: +Yaniv.Aknin
Added file: http://bugs.python.org/file16813/eintr_safety.py

___
Python tracker 

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



[issue7978] SocketServer doesn't handle syscall interruption

2010-04-07 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

wrapping select in an eintr handler that loops like SocketServer_eintr.diff is 
fine.

--
assignee:  -> gregory.p.smith
nosy: +gregory.p.smith

___
Python tracker 

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



[issue8341] sphinx bug?

2010-04-07 Thread Georg Brandl

Georg Brandl  added the comment:

It was a bug in the source file.  Fixed in r79901.

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

___
Python tracker 

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



[issue7978] SocketServer doesn't handle syscall interruption

2010-04-07 Thread Vetoshkin Nikita

Vetoshkin Nikita  added the comment:

According to "man 7 signal" select must be explicitely restarted, regardless of 
the SA_RESTART flag.

--

___
Python tracker 

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




[issue8292] Incorrect condition test in platform.py

2010-04-07 Thread Ray.Allen

Ray.Allen  added the comment:

It seems that the "Lib/lib2to3/fixes/fix_filter.py" should have fixed all the 
"filter" problem in py3k, by adding a "list()" call to "filter()". It's werid 
this one still exists in standar library. 

Also I found other two problems with "filter" in standar library. 
They make condition tests on filter object, although the result is correct, but 
I think it's not proper.

So I make a patch to fix these three problems.

--
components: +Library (Lib)
keywords: +patch
nosy: +ysj.ray
Added file: http://bugs.python.org/file16814/issue_8292.diff

___
Python tracker 

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