[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

This last issue seems related to SSL 0.9.8m:
http://bugs.python.org/issue8108

--
nosy: +flox

___
Python tracker 

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2010-03-22 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

> The intuitive explanation seems to be:
> - there are some bytes available for reading on the *TCP socket*, 
> therefore asyncore calls the read handler
> - however, there are not enough bytes for OpenSSL to actually decrypt 
> any data, which is why we get SSL_ERROR_WANT_READ when trying to read 
> from the *SSL socket*
> The following patch seems to fix test_ftplib; any thoughts?

The patch seems ok to me. This is how it was supposed to be in the first place 
if ssl.py behaved as expected with non blocking sockets.

--

___
Python tracker 

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



[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-22 Thread Nick

Nick  added the comment:

Hello is this not the fix?  Are there any plans for patch and ctypes 1.0.3?  
ctypes is a setuptools dependency for various Python 3rd party packages, and 
this breaks any that enlist ctypes on Solaris.

http://sourceware.org/ml/libffi-discuss/2010/msg00016.html

--

___
Python tracker 

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



[issue8199] zipfile.py: consistency between "write" and "writestr"

2010-03-22 Thread Hervé Cauwelier

New submission from Hervé Cauwelier :

Hi,

In class "ZipFile", method "write" accepts "compress_type" parameter but not 
the "writestr" method.

I see no reason for this limitation and the change is trivial.

This is needed for generating ODF documents since the mimetype file must not be 
compressed, contrary to other parts.

For now, I've copied the block of code that create a "ZipInfo" object in that 
"writestr" method.

The attached patch shows the desired change.

Thanks

--
components: Library (Lib)
files: writestr-compress_type.diff
keywords: patch
messages: 101486
nosy: he...@itaapy.com
severity: normal
status: open
title: zipfile.py: consistency between "write" and "writestr"
type: feature request
versions: Python 2.6
Added file: http://bugs.python.org/file16620/writestr-compress_type.diff

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

http://codereview.appspot.com/664043 (patch against 3.x)

IIUC, the changes proposed (for 3.2) are:
 - default encoding or bool(encoding) == False
   ==> fallback to 'US-ASCII' encoding (instead of Unicode)
 - encoding=str or encoding='unicode'
   ==> serialize to Unicode

And it changes the behavior of :
 - ET.write()
 - tostring()
 - tostringlist()

For 2.x we could add the options for Unicode output:
 - encoding=unicode
 - and encoding='unicode'

--
assignee: georg.brandl -> effbot
stage: test needed -> patch review

___
Python tracker 

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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-22 Thread Stefan Behnel

Stefan Behnel  added the comment:

> Supporting unicode for lxml.etree compatibility is fine with me, but I
> think it might make sense to support the string "unicode" as well (as
> a pseudo-encoding -- it's pretty clear to me that nobody will ever
> define a real character encoding with that name :-).

The reason I chose the unicode type over a 'unicode' string name at the time 
was that I wanted to make a clear distinction to show that this is not just 
selecting a different codec but that it changes the output type.

I don't really care either way, though, given that this reads a lot less well 
in Py3. If ET supports both, lxml will follow.

Stefan

--

___
Python tracker 

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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Chris Jerdonek

New submission from Chris Jerdonek :

The logging module errors out if the multiprocessing module is not finished 
loading when logging.log() is called.

This can happen, for example, if a custom import hook is defined that causes 
third-party code to execute when the multiprocessing module gets to an import 
statement.  (autoinstall is an example of a package that defines such an import 
hook: http://pypi.python.org/pypi/autoinstall/0.1a2 )

Here is a stack trace of the issue in action:

  File 
"/Users/chris_g4/dev/apple/WebKit-git/WebKitTools/Scripts/webkitpy/executive.py",
 line 118, in cpu_count
import multiprocessing
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/__init__.py",
 line 60, in 
import os
  File 
"/Users/chris_g4/dev/apple/WebKit-git/WebKitTools/Scripts/webkitpy/thirdparty/autoinstall.py",
 line 279, in find_module
_logger.debug("find_module(%s, path=%s)" % (fullname, path))
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 1036, in debug
self._log(DEBUG, msg, args, **kwargs)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 1164, in _log
record = self.makeRecord(self.name, level, fn, lno, msg, args, exc_info, 
func, extra)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 1139, in makeRecord
rv = LogRecord(name, level, fn, lno, msg, args, exc_info, func)
  File 
"/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/logging/__init__.py",
 line 279, in __init__
self.processName = sys.modules['multiprocessing'].current_process().name
AttributeError: 'module' object has no attribute 'current_process'


Here is a possible fix (in logging/__init__.py):

 if not logMultiprocessing:
 self.processName = None
 # "current_process" might not be defined if multiprocessing is
 # not finished loading yet.  This can happen, for example, if
 # a custom import hook is defined that causes third-party code
 # to execute when the multiprocessing module calls import.
-elif 'multiprocessing' not in sys.modules:
+elif 'multiprocessing' not in sys.modules or \
+ 'current_process' not in dir(sys.modules['multiprocessing']):
 self.processName = 'MainProcess'
 else:
 self.processName = 
sys.modules['multiprocessing'].current_process().name
 if logProcesses and hasattr(os, 'getpid'):
 self.process = os.getpid()

--
components: Library (Lib)
messages: 101489
nosy: cjerdonek
severity: normal
status: open
title: logging module errors out if log called when multiprocessing module not 
finished loading
type: crash
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



[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Stefan Behnel wrote:
> 
> Stefan Behnel  added the comment:
> 
>> Supporting unicode for lxml.etree compatibility is fine with me, but I
>> think it might make sense to support the string "unicode" as well (as
>> a pseudo-encoding -- it's pretty clear to me that nobody will ever
>> define a real character encoding with that name :-).
> 
> The reason I chose the unicode type over a 'unicode' string name at the time 
> was that I wanted to make a clear distinction to show that this is not just 
> selecting a different codec but that it changes the output type.
> 
> I don't really care either way, though, given that this reads a lot less well 
> in Py3. If ET supports both, lxml will follow.

There's always the possibility of adding a new official codec
called 'unicode' which converts Unicode to Unicode as no-op.

This may also be useful to have in other situations where you
want to signal a special case for Unicode input or output.

--
nosy: +lemburg

___
Python tracker 

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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Chris Jerdonek

Changes by Chris Jerdonek :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue8142] libffi update to 3.0.9

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

See this post, about Solaris failure:
http://bugs.python.org/issue1544339#msg101485

And the proposed patch:
http://sourceware.org/ml/libffi-discuss/2010/msg00016.html

--
nosy: +nick

___
Python tracker 

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



[issue8142] libffi update to 3.0.9

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

Ignore my last comment. It is not relevant, and the patch is already in 3.0.9.

--

___
Python tracker 

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



[issue6543] traceback presented in wrong encoding

2010-03-22 Thread Florent Xicluna

Changes by Florent Xicluna :


--
nosy: +flox
stage:  -> patch review

___
Python tracker 

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



[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-22 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Can you please try the subversion trunk of Python, and report whether this 
works for you?

--
nosy: +loewis

___
Python tracker 

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



[issue7643] What is a Unicode line break character?

2010-03-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

Florent Xicluna wrote:
> Backward compatibility concern:
>  * it adds VT u'\x0b' and FF u'\x0c' as line breaks.
> 
> The choice is either to preserve backward compatibility, or to comply with 
> the specification (UAX #14).

I think we should correct this bug together with a clear warning in
the Misc/NEWS file.

--

___
Python tracker 

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



[issue2223] regrtest.py -R not working

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

No known issues with "regrtest -R :" on trunk.

--
nosy: +flox
resolution:  -> out of date
stage: patch review -> 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



[issue5035] Compilation --without-threads fails

2010-03-22 Thread STINNER Victor

STINNER Victor  added the comment:

_tkinter patch (r70641) was backported to py3k as r70707. py3k compiles fine 
without threads.

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



[issue8201] test_logging fails if the loggerDict contains non-ASCII loggers.

2010-03-22 Thread Florent Xicluna

New submission from Florent Xicluna :

Following test case fails with a UnicodeDecodeError:

import logging
import logging.config
logging.getLogger("\xab\xd7\xbb")
logging.getLogger(u"LOG")
logging.config.dictConfig({'version': 1})


Same behavior on "non-ASCII" path buildbots, when test_lib2to3 is run before 
test_logging. It happens because "test_lib2to3" set a logger with key 
u"".
IMHO, it should be fixed in the logging module.

--
assignee: vinay.sajip
components: 2to3 (2.x to 3.0 conversion tool), Library (Lib)
keywords: buildbot
messages: 101497
nosy: benjamin.peterson, flox, haypo, vinay.sajip
priority: normal
severity: normal
stage: test needed
status: open
title: test_logging fails if the loggerDict contains non-ASCII loggers.
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



[issue8201] test_logging fails if the loggerDict contains non-ASCII loggers.

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

Proposed patch with tests.

--
keywords: +patch
Added file: http://bugs.python.org/file16621/issue8201_logging_config.diff

___
Python tracker 

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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Vinay Sajip

Vinay Sajip  added the comment:

A slightly more generic fix checked into trunk (r79279), please verify in your 
environment.

--
assignee:  -> vinay.sajip
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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

I would suggest something like:

if logMultiprocessing:
try:
self.processName = sys.modules['multiprocessing'] 
.current_process().name
except StandardError:
self.processName = 'MainProcess'
else:
self.processName = None

--
nosy: +flox
priority:  -> normal
stage:  -> committed/rejected

___
Python tracker 

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



[issue1583863] __str__ cannot be overridden on unicode-derived classes

2010-03-22 Thread STINNER Victor

STINNER Victor  added the comment:

Commited: r79278+r79280 (trunk), r79281 (py3k), r79282 (3.1), r79283 (2.6).

--

___
Python tracker 

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



[issue1583863] __str__ cannot be overridden on unicode-derived classes

2010-03-22 Thread STINNER Victor

Changes by STINNER Victor :


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



[issue1503789] Cannot write source code in UTF16

2010-03-22 Thread STINNER Victor

STINNER Victor  added the comment:

This feature was requested only once, 4 years ago, so I don't think that the 
feature is a "must-have" :-)

I think that a lot of code have to be modified in Python parser to support 
UTF-16-* and UTF-32-* codecs. Since there is no working patch, I consider that 
I can close this issue.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue1069092] segfault on printing nested sequences of None/Ellipsis

2010-03-22 Thread STINNER Victor

STINNER Victor  added the comment:

This issue is 6 years old. Python has some protections against stack overflow, 
but there is no perfect solution. Since there is no patch, I consider that I 
can close this issue (as wont fix).

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue8201] test_logging fails if the loggerDict contains non-ASCII loggers.

2010-03-22 Thread Vinay Sajip

Vinay Sajip  added the comment:

Fix checked into trunk (r79284).

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



[issue4261] The pwd module doesn't distinguish between errors and no user

2010-03-22 Thread STINNER Victor

STINNER Victor  added the comment:

This issue is open since 2 years without any patch. It looks like the feature 
request is not really important, and I consider that we can close it. Reopen 
the issue (with a patch!) if you consider that this ticket is important.

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



[issue4261] The pwd module doesn't distinguish between errors and no user

2010-03-22 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution: fixed -> wont fix

___
Python tracker 

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



[issue4261] The pwd module doesn't distinguish between errors and no user

2010-03-22 Thread R. David Murray

R. David Murray  added the comment:

Victor, since this is a real,fixable bug but nobody has stepped forward with a 
patch, I think it is better make its status 'languishing' with the reason 'no 
one has stepped forward with a patch'.  This kind of thing is exactly what we 
introduced languishing for.  And two years is nothing ;)

--
components: +Extension Modules -Library (Lib)
keywords: +easy
nosy: +r.david.murray
priority:  -> normal
resolution: wont fix -> accepted
stage:  -> test needed
status: closed -> languishing
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.4

___
Python tracker 

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2010-03-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> This last issue seems related to SSL 0.9.8m:
> http://bugs.python.org/issue8108

I don't think so:

$ rpm -qv openssl
openssl-0.9.8k-5.1mdv2010.0

--

___
Python tracker 

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-03-22 Thread Brian Curtin

Brian Curtin  added the comment:

Ah, that's simple enough :)

Minor changes to the test patch: uname caches it's results, so I added a few 
lines to clear the cache before the uname calls. In order to not affect other 
tests, the whole thing is in a try/finally so we don't leave anything behind in 
cache.

The test passes on both a 32 and 64 bit Python.

--
Added file: http://bugs.python.org/file16622/uname_WOW64_test2.patch

___
Python tracker 

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



[issue8199] zipfile.py: consistency between "write" and "writestr"

2010-03-22 Thread Brian Curtin

Brian Curtin  added the comment:

Given that this is a feature request, it would go into 2.7 rather than 2.6.

The patch will need a test (see Lib/test/test_zipfile.py) and a documentation 
update (see Doc/library/zipfile.rst).

--
nosy: +brian.curtin
priority:  -> normal
stage:  -> test needed
versions: +Python 2.7, 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



[issue8199] zipfile.py: consistency between "write" and "writestr"

2010-03-22 Thread Brian Curtin

Brian Curtin  added the comment:

Actually this was recently fixed on trunk (r78097) and py3k (r78098). See #6003.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue8156] pybsddb 4.8.4 integration

2010-03-22 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Integration committed as r79285.

The integration is with just released pybsddb 4.8.4, with patches for issue6462 
and issue3892 added.

--
title: pybsddb 4.8.3+ integration -> pybsddb 4.8.4 integration

___
Python tracker 

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



[issue2960] bsddb/test/test_replication.py bus error, segfault, assertion error, pass

2010-03-22 Thread Jesús Cea Avión

Changes by Jesús Cea Avión :


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

___
Python tracker 

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



[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2010-03-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> The patch seems ok to me. This is how it was supposed to be in the
> first place if ssl.py behaved as expected with non blocking sockets.

Ok, patch applied.

In light of the recv() and recv_into() implementation change, I also
think we should enable SSL_MODE_AUTO_RETRY for SSL sockets. It prevents
blocking read() calls from getting SSL_ERROR_WANT_READ at all.
(previously, we would loop manually in recv() and recv_into(); letting
the C OpenSSL runtime do it for us is certainly more efficient)

See description in
http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html:

« SSL_MODE_AUTO_RETRY

Never bother the application with retries if the transport is
blocking. If a renegotiation take place during normal operation,
a SSL_read(3) or SSL_write(3) would return with -1 and indicate
the need to retry with SSL_ERROR_WANT_READ. In a non-blocking
environment applications must be prepared to handle incomplete
read/write operations. In a blocking environment, applications
are not always prepared to deal with read/write operations
returning without success report. The flag SSL_MODE_AUTO_RETRY
will cause read/write operations to only return after the
handshake and successful completion. »

--

___
Python tracker 

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



[issue1124861] subprocess fails on GetStdHandle in interactive GUI

2010-03-22 Thread Daniel Serodio

Daniel Serodio  added the comment:

Ah, it works now. Thanks.

--

___
Python tracker 

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



[issue3928] os.mknod missing on Solaris

2010-03-22 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

Roumen Petrov (rpetrov) wrote:
>>
>> Jesús Cea Avión  added the comment:
>>
>> I just did the minimal change. I don't know if removing 
>> "defined(HAVE_MAKEDEV)" is safe.

> The python build system is full with minimal changes and result is a
> big mess. Did you found which revision add ".. defined(HAVE_MAKEDEV)"
> in posix*.c ?

The code was added in 2002-07-30 by nnorwitz, to support OSF1 (Dec Unix). Is 
that platform still supported?. I don't see any related  buildbot.

>> "HAVE_DEVICE_MACROS" is defined if "configure" finds "makedev()" macro.

> And what is result on you platform ?

It is defined if I add the new "include".


> Cases:
> 1) platform is no longer supported - it is save to remove test case from 
> configure and defined(HAVE_MAKEDEV) from posixmodule.c

Do we have a list of officially supported?.

> 2) HAVE_DEVICE_MACROS is defined for you . Then check how is written 
> test for HAVE_DEVICE_MACROS and make test for makedev similar.

Investigating the issue, I could say that HAVE_MAKEDEV should be deleted, but I 
don't have access to a OSF1 machine for trying.

How should I proceed?

--
nosy:  -barry, rpetrov

___
Python tracker 

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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Vinay Sajip

Vinay Sajip  added the comment:

It's structured the way it is for two reasons:
 1. IMO It's better (more readable) to have the simpler case in the "then" 
clause and the more complicated case in the "else" clause.
 2. If multiprocessing is not used, the process name needs to be set anyway to 
"MainProcess". So, I've structured it so the assignment is in just one place.

--

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Ok, I finally agree that test_ftplib should be patched.
The patch isn't exactly correct: it should ideally retry the unwrap() call 
later, rather than simply ignore the error. But since it's just used for 
testing, it looks sufficient.

(we probably lack a higher-level abstraction around ssl sockets, especially 
non-blocking ones; there's too many domain-specific stuff to know for the 
average programmer.)

--

___
Python tracker 

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



[issue7703] Replace buffer()-->memoryview() in Lib/ctypes/test/

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

Fixed with r79288 and r79295.

--
priority:  -> normal
resolution:  -> fixed
stage: patch review -> 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



[issue3928] os.mknod missing on Solaris

2010-03-22 Thread Jesús Cea Avión

Jesús Cea Avión  added the comment:

My browser keeps deleting nosy.  Sorry.

Roumen, please read.

--
nosy: +barry, rpetrov

___
Python tracker 

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



[issue1069092] segfault on printing nested sequences of None/Ellipsis

2010-03-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

General policy is that ordinary code (not using, for instance, ctypes) should 
not crash or segfault the interpreter.  I believe there is a 'crashers' 
subdirectory somewhere in the tree for examples that do so that people so 
inclined can work on them.

The OP reported a crash on 2.3/2.4a on Linux, but not 1.5. I could not 
reproduce it on 2.2 on Windows. Instead, I (properly) got an exception. Trying 
again with 3.1, I get a similar exception: RuntimeError: maximum recursion 
depth exceeded while getting the repr of a tuple. List instead of tuple does 
similar.

If 
>>> t=None,
>>> for i in range(5): t = t,None

>>> print(t)

still crashes on 2.6/2.7, at least with Linux, then there is still a bug to be 
fixed and the issue should be left open. If it now raises an exception as 
above, then this should be closed as fixed.

I am pretty sure this issue has nothing to do with None and Ellipsis but only 
with the structure (not necessarily a sequence) being deeply, deeply nested. So 
I think the title should be: "Segfault on printing deeply nested structures."

I think the deeper issue is the use of recursion on the C stack to print. If 
the print routine instead usee iteration with an auxiliary Python stack (list), 
then there should be no stack overflow to worry about. [When in increase the 
recursion limit to 10 and try to print the 5 nested tuples, I get 
"MemoryError: stack overflow" instead of the RuntimeError above. So there might 
be more than one fix needed.]

--

___
Python tracker 

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



[issue1625] bz2.BZ2File doesn't support multiple streams

2010-03-22 Thread David Bonner

David Bonner  added the comment:

Picking this back up again.  There's actually no docs changes necessary...the 
docs never mentioned that the module didn't support multiple logical streams, 
and I didn't see any other mentions in the docs that seemed to need updating.  
I supposed I could add something along the lines of "BZ2File supports multiple 
logical streams in a single compressed file", if that's what you/re looking for.

Working on a patch for trunk as well.

--

___
Python tracker 

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



[issue7666] test_lib2to3 fails if path contains space

2010-03-22 Thread Florent Xicluna

Changes by Florent Xicluna :


Removed file: http://bugs.python.org/file15818/lib2to3_path_with_space.py

___
Python tracker 

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



[issue7666] test_lib2to3 fails if path contains space

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

Ultimate pach, tested with this insane path:

>>> os.getcwdu()
u'/home/user/dev/python/py2u;\u2026 \u2192 u"n\\ic\'ode'

It should fix some buildbot failures.

--
assignee:  -> benjamin.peterson
components: +2to3 (2.x to 3.0 conversion tool) -Tests
keywords: +buildbot, patch
nosy: +pitrou
priority:  -> normal
resolution:  -> accepted
Added file: http://bugs.python.org/file16623/lib2to3_path_with_space_v2.diff

___
Python tracker 

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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Chris Jerdonek

Chris Jerdonek  added the comment:

Reversing the if-else in Florent's suggestion seems to address points (1) and 
(2).  Is there a reason to set and check an mp variable rather than simply 
having the try-except block?

if not logMultiprocessing:
self.processName = None
else:
# Errors may occur if multiprocessing has not finished loading
# yet - e.g. if a custom import hook causes third-party code
# to run when multiprocessing calls import. See issue 8200
# for an example
try:
self.processName = sys.modules['multiprocessing'].current_process().name
except StandardError:
self.processName = 'MainProcess'

Thanks for the quick action!  I'll try in my dev environment when this is 
settled.

--

___
Python tracker 

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



[issue8196] sqlit3.paramstyle reported as 'qmark'

2010-03-22 Thread Georg Brandl

Changes by Georg Brandl :


--
assignee:  -> ghaering
nosy: +ghaering

___
Python tracker 

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-03-22 Thread R. David Murray

R. David Murray  added the comment:

Patches applied to trunk in r79294, py3k in r79298.  Should this be backported?

--
keywords:  -needs review
stage: patch review -> commit review

___
Python tracker 

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



[issue1069092] segfault on printing nested sequences of None/Ellipsis

2010-03-22 Thread R. David Murray

R. David Murray  added the comment:

On linux: on Py3 (trunk and 3.1) I get the recursion depth exceeded message, 
but on py2 trunk I get the segfault if I use 10 for the range.  So somebody 
fixed this crasher in py3, somehow.

--
nosy: +r.david.murray
resolution: wont fix -> 
stage:  -> needs patch
status: closed -> open
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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Vinay Sajip

Vinay Sajip  added the comment:

- Original Message 

Reversing the if-else in Florent's suggestion seems to 
> address points (1) and (2).  Is there a reason to set and check an mp 
> variable rather than simply having the try-except block?

Just that it went over the 80-column limit :-)

Also, I know about asking forgiveness rather than permission, but Florent's 
change doesn't make clear the intent to call current_process only if 
multiprocessing has already been imported (i.e. is in sys.modules). In other 
words, he would catch both the KeyError and any error due to an incomplete 
import of multiprocessing. While either version will work, the way I have it 
preserves the original intent and only traps errors due to multiprocessing 
being incompletely imported.

--

___
Python tracker 

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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Chris Jerdonek

Chris Jerdonek  added the comment:

I agree.  Thanks!

--

___
Python tracker 

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-03-22 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

R. David Murray wrote:
> 
> R. David Murray  added the comment:
> 
> Patches applied to trunk in r79294, py3k in r79298.  Should this be 
> backported?

I don't think so: applications relying on the previous behavior
would need to be updated and requiring this for a patch level
release of Python is not a good idea.

--

___
Python tracker 

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



[issue6352] Compiler warning in unicodeobject.c

2010-03-22 Thread Hagen Fürstenau

Hagen Fürstenau  added the comment:

Apparently this was never backported to 3.1.

--

___
Python tracker 

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



[issue7512] shutil.copystat may fail EOPNOTSUPP

2010-03-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I committed the simple patch in r79299 (trunk), r79300 (2.6), r79301 (py3k), 
r79302 (3.1). Tarek suggested a test could be added for this, assigning the 
issue to him.

--
assignee: pitrou -> tarek
nosy: +tarek
stage: commit review -> committed/rejected
status: open -> pending

___
Python tracker 

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



[issue8202] sys.argv[0] and python -m package

2010-03-22 Thread Michael Foord

New submission from Michael Foord :

When you execute "python -m package" the package is first imported with 
sys.argv[0] set to '-c' (and sys.modules['__main__'] exists but is empty. Then 
package.__main__.py is executed with the correct sys.argv[0].

This means module level code executed during the initial import that attempts 
to work out how the code is being executed can't use either 
sys.modules['__main__'] *or* sys.argv[0].

--
assignee: ncoghlan
messages: 101531
nosy: michael.foord, ncoghlan
severity: normal
status: open
title: sys.argv[0] and python -m package
type: behavior
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



[issue8203] IDLE about dialog credits raises UnicodeDecodeError

2010-03-22 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

Install 3.1.2 -> Open IDLE -> Open "About IDLE" dialog -> click on "Credits"

Exception in Tkinter callback
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/tkinter/__init__.py",
 line 1399, in __call__
return self.func(*args)
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib/aboutDialog.py",
 line 123, in ShowIDLECredits
self.display_file_text('About - Credits', 'CREDITS.txt', 'iso-8859-1')
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib/aboutDialog.py",
 line 138, in display_file_text
textView.view_file(self, title, fn, encoding)
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/idlelib/textView.py",
 line 76, in view_file
return view_text(parent, title, textFile.read())
  File 
"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/codecs.py", 
line 300, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1540-1543: 
invalid data

--
components: IDLE
messages: 101532
nosy: srid
severity: normal
status: open
title: IDLE about dialog credits raises UnicodeDecodeError
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit

2010-03-22 Thread Sridhar Ratnakumar

New submission from Sridhar Ratnakumar :

This happens on 3.1.2 Linux 64-bit.

test test_ttk_guionly failed -- Traceback (most recent call last):
  File 
"/home/apy/rrun/tmp/autotest/apy/lib/python3.1/tkinter/test/test_ttk/test_widgets.py",
 line 708, in test_traversal
self.assertEqual(self.nb.select(), str(self.child2))
AssertionError: '.183072530064' != '.183072529552'

--
components: Tests, Tkinter
messages: 101533
nosy: srid
severity: normal
status: open
title: test_ttk_guionly assertion error on 3.x linux 64-bit
type: behavior
versions: Python 3.1

___
Python tracker 

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



[issue8108] test_ftplib fails with OpenSSL 0.9.8m

2010-03-22 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

> The patch isn't exactly correct: it should ideally retry the unwrap() 
> call later, rather than simply ignore the error. But since it's just 
> used for testing, it looks sufficient.

Actually unwrap() should already be called.
What the patch does is returning in case of ERROR_WANT_READ/WRITE, and 
*explicitly avoids to close() the connection when such an event occurs*.

This should grant that another asyncore poll() loop is executed, handle_close() 
automatically be called again and so unwrap().

As I said in comment #100977 I'm not 100% sure of this since I've not been able 
to reproduce the issue. I'm just presuming this as I know that asyncore works 
like this with plain-text sockets.

I'd like to make sure this works as expected even if it's just a test.
If some of the folks able to reproduce this issue could confirm that unwrap() 
gets called again it would be great.

--

___
Python tracker 

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



[issue7026] test_urllib: unsetting missing 'env' variable

2010-03-22 Thread Sridhar Ratnakumar

Sridhar Ratnakumar  added the comment:

Re-opening. test_urllib in 3.1.2 fail similarly (on Linux 64-bit):

test_urllib
Warning: os.environ was modified by test_urllib
test test_urllib failed -- Traceback (most recent call last):
  File "/home/apy/rrun/tmp/autotest/apy/lib/python3.1/test/test_urllib.py", 
line 122, in setUp
for k in os.environ.keys():
  File "/home/apy/rrun/tmp/autotest/apy/lib/python3.1/_abcoll.py", line 404, in 
__iter__
for key in self._mapping:
  File "/home/apy/rrun/tmp/autotest/apy/lib/python3.1/os.py", line 404, in 
__iter__
for key in self.data:
RuntimeError: dictionary changed size during iteration

--
status: closed -> open
versions: +Python 3.1

___
Python tracker 

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



[issue3928] os.mknod missing on Solaris

2010-03-22 Thread Roumen Petrov

Roumen Petrov  added the comment:

>>> "HAVE_DEVICE_MACROS" is defined if "configure" finds "makedev()" macro.
>> And what is result on you platform ?
>It is defined if I add the new "include".

a) Why you touch test case for "AC_MSG_CHECKING(for major, minor, and makedev)
AC_TRY_LINK([
#if defined(MAJOR_IN_MKDEV)
#include 
#elif defined(MAJOR_IN_SYSMACROS)
#include 
#else
#include 
#endif
],[
  makedev(major(0),minor(0));
],[
  AC_DEFINE(HAVE_DEVICE_MACROS, 1,
[Define to 1 if you have the device macros.])
  AC_MSG_RESULT(yes)
],[
  AC_MSG_RESULT(no)
])"
?
Sorry I did't understand why this test case fail for you.


b) PEP 11 list unsupported platforms and OSF1 is not listed.

c) So code if from revision 27820 that fix "SF patch #584245, get python to 
link on OSF1 (Dec Unix)" . The current patch as is will break OSF1 and other 
OS-es (as example linux don't define this header). Just adding new include will 
fail test case and will left as undefined HAVE_MAKEDEV => mknod won't be added 
for those platforms.

--

___
Python tracker 

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



[issue1027206] unicode DNS names in socket, urllib, urlopen

2010-03-22 Thread David Watson

David Watson  added the comment:

I was about to report this for the socket module - the gethostbyname(), 
gethostbyname_ex() and getnameinfo() functions are the only things currently 
affected in that module as far as I can see.  3.x is affected too - the 
functions will pass non-ASCII Unicode to the system as UTF-8 there.  The 
attached patch fixes them in 2.x and 3.x.

--
keywords: +patch
nosy: +baikie
versions: +Python 3.2, Python 3.3
Added file: http://bugs.python.org/file16624/idna.diff

___
Python tracker 

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



[issue8202] sys.argv[0] and python -m package

2010-03-22 Thread Nick Coghlan

Nick Coghlan  added the comment:

Hmm, the problem here is we don't *know* the module filename until we get hold 
of the loader for it (see _get_module_details() in runpy). And it is the 
process of finding the loader for the __main__ module that does the initial 
import of the package as a side effect.

Added Brett to the nosy list in case I've not thought of something obvious.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue8205] test_multiprocessing failure

2010-03-22 Thread Antoine Pitrou

New submission from Antoine Pitrou :

r79165 seems to be the culprit

Traceback (most recent call last):
  File "/home/antoine/cpython/trunk/Lib/test/regrtest.py", line 864, in 
runtest_inner
indirect_test()
  File "/home/antoine/cpython/trunk/Lib/test/test_multiprocessing.py", line 
2028, in test_main
run(suite)
  File "/home/antoine/cpython/trunk/Lib/contextlib.py", line 24, in __exit__
self.gen.next()
  File "/home/antoine/cpython/trunk/Lib/test/test_support.py", line 565, in 
_filterwarnings
raise AssertionError("unhandled warning %r" % reraise[0])
AssertionError: unhandled warning ImportWarning("Not importing directory 
'/home/antoine/cpython/trunk/Modules/zlib': missing __init__.py",)

--
assignee: flox
components: Tests
messages: 101539
nosy: flox, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: test_multiprocessing failure
type: behavior
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



[issue8205] test_multiprocessing failure

2010-03-22 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: patch review -> needs patch

___
Python tracker 

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



[issue7666] test_lib2to3 fails if path contains space

2010-03-22 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Resolved in r79304.

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



[issue8205] test_multiprocessing failure

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

It happens only when sysconfig.is_python_build() is True (i.e. build directory).

Proposed patch fixes it.

--
keywords: +patch
Added file: http://bugs.python.org/file16625/issue8205_sys_path.diff

___
Python tracker 

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



[issue8202] sys.argv[0] and python -m package

2010-03-22 Thread Brett Cannon

Brett Cannon  added the comment:

Nick is right that importing package.__main__ requires importing 
package.__init__ first.

But it sounds like Michael really just wants some way to know when runpy is 
being used over something else. Could a special string token like "" or 
"<-m>" be placed in sys.argv until it is back-patched to what it will 
eventually become? That should allow Michael to find out what whether runpy was 
being used or not.

--

___
Python tracker 

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



[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Eric Promislow

New submission from Eric Promislow :

Title should be self-explanatory.

--
components: 2to3 (2.x to 3.0 conversion tool)
messages: 101543
nosy: ericp
severity: normal
status: open
title: 2to3 doesn't convert 'types.InstanceType' to 'object'
versions: Python 3.1

___
Python tracker 

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



[issue8202] sys.argv[0] and python -m package

2010-03-22 Thread Michael Foord

Michael Foord  added the comment:

I've already fixed my specific usecase (for unittest), but a special value in 
sys.argv[0] would indeed have met my needs.

--

___
Python tracker 

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



[issue7667] test_doctest fails with non-ascii path

2010-03-22 Thread Florent Xicluna

Florent Xicluna  added the comment:

Really fixed with r79307.

--
superseder: test_doctest fails when run in verbose mode -> 

___
Python tracker 

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



[issue7667] test_doctest fails with non-ascii path

2010-03-22 Thread Florent Xicluna

Changes by Florent Xicluna :


--
resolution: accepted -> fixed

___
Python tracker 

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



[issue8202] sys.argv[0] and python -m package

2010-03-22 Thread Michael Foord

Michael Foord  added the comment:

'-c' isn't helpful because that is also the content of sys.argv[0] when a 
module is imported in response to "python -c '...'".

--

___
Python tracker 

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



[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I don't think this conversion is correct. If there is a test for InstanceType, 
there is (IMO) a fifty-fifty-chance that it is there to distinguish old-style 
and new-style classes, so converting it to object is most likely to break the 
code.

People who actually want this conversion to happen could replace 
types.InstanceType with

  getattr(types, 'InstanceType', object)

or add

try:
  from types import InstanceType
except ImportError:
  InstanceType = object

to the top of the module; this would then work for both 2.x and 3.x (assuming 
that replacing InstanceType with object is actually correct in the code in 
question).

--
nosy: +loewis

___
Python tracker 

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



[issue8205] test_multiprocessing failure

2010-03-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> It happens only when sysconfig.is_python_build() is True (i.e. build 
> directory).
> 
> Proposed patch fixes it.

Can't say whether the patch is ok, but I confirm it does fix the issue
here.

--

___
Python tracker 

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



[issue8200] logging module errors out if log called when multiprocessing module not finished loading

2010-03-22 Thread Chris Jerdonek

Chris Jerdonek  added the comment:

FYI, I verified the fix in my local environment.  Thanks again.

--

___
Python tracker 

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



[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-22 Thread Nick

Nick  added the comment:

Unfortunately I also get core dump applying that patch alone.

core 'core' of 12847:   /usr/local/Python-2.4.6-SunCC/bin/python setup.py test
 feaf0cfe ffi_call_SYSV (fefb0fc8, 8045898, feaf0b08, feaf08e4, 8045880, 4) + 66
 feaf0caf ffi_call_SYSV (feaf08e4, 8045880, 4, 1, 8045920, fe95133c) + 17
 feaf0b08 ffi_call (80458b0) + 64
 feaeb47a _call_function_pointer (1001, fe95133c, 8045910, 8045900, 82a27bc, 804
5920) + 86
 feaebad0 _CallProc (fe95133c, 842298c, 1001, 0, 82e1e74, 0) + 2dc
 feae8408 CFuncPtr_call (83fe304, 842298c, 0, 8422a6c) + 190
 08063423 PyObject_Call (83fe304, 842298c, 0, 8063423) + 23
 080b308c do_call  (83fe304, 8045aec, 1, 0) + 54
 080b2806 call_function (8045aec, 1, cd24f104, 82ca2cc) + ae
 080afd91 PyEval_EvalFrame (8275154, 815ded4, 82b30b4, 0) + 27a1
 080b1782 PyEval_EvalCodeEx (82ba460, 82b30b4, 0, 8262388, 1, 826238c) + 8ba
 080b2cd6 fast_function (82ca2cc, 8045c9c, 1, 1, 0, 80f1740) + 15a
 080b2822 call_function (8045c9c, 0, a0, 0) + ca

--

___
Python tracker 

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



[issue8196] sqlit3.paramstyle reported as 'qmark'

2010-03-22 Thread Gerhard Häring

Gerhard Häring  added the comment:

Thanks for bringing this up.

By changing this we would maybe be a little bit closer to PEP 0249. I don't get 
why the PEP author thinks that 'qmark' is less clear than 'numeric', though. I 
think they're equally clear.

The real reason why I object changing anything here, however, is that by 
changing the paramstyle we would break backwards compatibility. Third-party 
software like ORMs might depend on sqlite3 having paramstyle 'qmark'.

So now someone might suggest to make paramstyle an instance of a subclass of 
string that will successfully compare against both 'qmark' and 'named'. To 
which possible suggestion I say forget it. You cannot anticipate how people 
will really access the paramstyle. And if it would make a difference in 
real-world scenarios.

--
priority:  -> low

___
Python tracker 

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



[issue1544339] _ctypes fails to build on Solaris x86 32-bit (Sun compiler)

2010-03-22 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

nick: not sure what "this patch" is that you tried applying. What about Python 
trunk?

--

___
Python tracker 

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



[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Eric Promislow

Eric Promislow  added the comment:

I'm working on a debugger, trying to identify instances of
old-style classes in Python 2, and any class in Python 3.
The getattr formulation will work, but because I already
need to maintain an "is_v3" flag, I might as well use it
here.

As a side note, how are instances of new-style classes in
v2 categorized?  This v2 code prints 'None':

import types
def get_type_name(target_type):
  for t in dir(types):
if target_type == getattr(types, t):
  return t

class C(object):
  pass

c = C()
print get_type_name(type(c))

--

___
Python tracker 

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



[issue8206] 2to3 doesn't convert 'types.InstanceType' to 'object'

2010-03-22 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

In a sense, *all* objects are instances of new-style classes in 2.x, including 
instances of old-style classes (which are instances of the InstanceType type, 
which is a type, and hence a new-style class).

You may want to look at the __flags__ property of the type object. If it is a 
heap type, there is a good chance that it was created through a class 
statement. Alternatively, you can look at the type's __module__, and find out 
whether the module is a Python module.

--

___
Python tracker 

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



[issue8139] ossaudiodev not initializing its types

2010-03-22 Thread Bertrand Janin

Bertrand Janin  added the comment:

This is still an issue in Python 3.1.2 release.

--

___
Python tracker 

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



[issue8139] ossaudiodev not initializing its types

2010-03-22 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Committed in r79317 (py3k) and r79318 (3.1). Thank you!

--
nosy: +pitrou
resolution:  -> fixed
stage: patch review -> 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



[issue2636] Regexp 2.7 (modifications to current re 2.2.2)

2010-03-22 Thread Matthew Barnett

Matthew Barnett  added the comment:

issue2636-20100323.zip is a new version of the regex module.

It now includes a test script. Most of the tests come from the existing test 
scripts.

--
Added file: http://bugs.python.org/file16626/issue2636-20100323.zip

___
Python tracker 

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



[issue8196] sqlit3.paramstyle reported as 'qmark'

2010-03-22 Thread Santiago Gala

Santiago Gala  added the comment:

I don't think they are equally clear, at least from the point of view of the 
code written towards the API. I think that

execute("UPDATE authors set name = ?, email = ?, comment = ? WHERE id = ?", 
(form.name, form.email, form.text, form.id))

is way less clear, more verbose, and prone to alignment errors, than

execute("UPDATE authors set name = :name, email = :email, comment = :text WHERE 
id = :id", form)

I think this is the reason why the PEP writer prefer named style and. I was 
about to recode an example using a dictionary for cleaner code, when I noticed 
the bug. Now I need to hardcode that sqlite3 supports 'named' style, even if 
paramstyle says other thing, or to dynamically test, in case they decide to 
remove support for the next release. Both are ugly alternatives.

--

___
Python tracker 

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



[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-03-22 Thread R. David Murray

Changes by R. David Murray :


--
resolution: accepted -> fixed
stage: commit review -> committed/rejected
status: open -> closed
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



[issue8207] test_pep277 fails on OS X

2010-03-22 Thread Ned Deily

New submission from Ned Deily :

With r79207 (Issue8180) applied to trunk, seeing this failure (10.6.2, HFS+ 
case-sensitive file system):

==
ERROR: test_normalize (test.test_pep277.UnicodeFileTests)
--
Traceback (most recent call last):
  File "/private/tmp/pp/usr/local/lib/python2.7/test/test_pep277.py", line 119, 
in test_normalize
os.stat(name)
OSError: [Errno 2] No such file or directory: 
'@test_24797_tmp/\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82A'

--
Ran 30 tests in 0.237s

FAILED (errors=1)
test test_pep277 failed -- Traceback (most recent call last):
  File "/private/tmp/pp/usr/local/lib/python2.7/test/test_pep277.py", line 119, 
in test_normalize
os.stat(name)
OSError: [Errno 2] No such file or directory: 
'@test_24797_tmp/\xe2\x80\x82\xe2\x80\x82\xe2\x80\x82A'

--
messages: 101559
nosy: flox, ned.deily
severity: normal
status: open
title: test_pep277 fails on OS X
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



[issue8208] test_issue7820 fails: "name '?' is not defined"

2010-03-22 Thread Ned Deily

New submission from Ned Deily :

Trunk running on OS X 10.6.2:

==
ERROR: test_issue7820 (test.test_pep263.PEP263Test)
--
Traceback (most recent call last):
  File "/private/tmp/pp/usr/local/lib/python2.7/test/test_pep263.py", line 39, 
in test_issue7820
self.assertRaises(SyntaxError, eval, '\xff\x20')
  File "/private/tmp/pp/usr/local/lib/python2.7/unittest/case.py", line 444, in 
assertRaises
callableObj(*args, **kwargs)
  File "", line 1, in 
NameError: name '?' is not defined

--

--
components: Tests
messages: 101560
nosy: haypo, ned.deily
severity: normal
status: open
title: test_issue7820 fails: "name '?' is not defined"
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



[issue2919] Merge profile/cProfile in 3.0

2010-03-22 Thread Andrew Svetlov

Changes by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

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