[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: An option of `configure` could be added, whose enabling would change this behavior. -- title: Non-zero exit status of setup.py when building of extensions has failed -> Add option of non-zero exit status of setup.py when building o

[issue6697] Python 3.1 segfaults when invalid UTF-8 characters are passed from command line

2009-08-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The problem is actually wider:: >>> getattr(None, "\udc80") Segmentation fault An idea would be to change _PyUnicode_AsDefaultEncodedString and allow unpaired surrogates (utf8+surrogateescape, as explained in PEP383), but I fear the consequences...

[issue6697] Python 3.1 segfaults when invalid UTF-8 characters are passed from command line

2009-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > The problem is actually wider:: > >>> getattr(None, "\udc80") > Segmentation fault > An idea would be to change _PyUnicode_AsDefaultEncodedString and allow > unpaired surr

[issue6734] Imap lib implicit conversion from bytes to string

2009-08-19 Thread Eric
New submission from Eric : using imaplib IMAP4_SSL, would fail at login due to TypeError, implicit conversion from bytes object to string around line 1068 involving function "_quote". My fix: def _quote(self, arg): #Could not implicitly convert to bytes object to string arg = a

[issue6697] Python 3.1 segfaults when invalid UTF-8 characters are passed from command line

2009-08-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Do you suggest to remove all usages of _PyUnicode_AsString() and _PyUnicode_AsStringAndSize()? -- ___ Python tracker ___ _

[issue6697] Python 3.1 segfaults when invalid UTF-8 characters are passed from command line

2009-08-19 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > Do you suggest to remove all usages of _PyUnicode_AsString() and > _PyUnicode_AsStringAndSize()? In the short-term, I suggest that all uses that do not check the return value get

[issue6697] Python 3.1 segfaults when invalid UTF-8 characters are passed from command line

2009-08-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The %U format seems adequate for this purpose - actually PyObject_GenericSetAttr uses it already. Yes, the exception message will contain the same lone UTF-8 surrogates; this is not a problem because sys.stderr uses the "backslashreplace" error handler.

[issue6734] Imap lib implicit conversion from bytes to string

2009-08-19 Thread R. David Murray
R. David Murray added the comment: See issue 1210 for background on the imaplib bytes/string issues. A quick glance at the imaplib code leaves me confused. _checkquote, for example, appears to be mixing string comparisons and byte comparisons. Issue 1210 says imaplib _command should only quot

[issue5114] 2.5.4.3 / test_threading hangs

2009-08-19 Thread Roger Collins
Roger Collins added the comment: I can confirm the same exact issue exists in python2.6 on: Solaris 5.8 sparc Killing the bottom process worked for me as well -- nosy: +zulrang versions: +Python 2.6 ___ Python tracker

[issue5114] 2.5.4.3 / test_threading hangs

2009-08-19 Thread Roger Collins
Roger Collins added the comment: Platform: Solaris 5.8 sparc Compiler: gcc version 4.2.4 make test reported back the following on the initial test: test test_threading failed -- Traceback (most recent call last): File "/tools/webapps/local/src/Python-2.6.2/Lib/test/test_threading.py", line 41

[issue5114] 2.5.4.3 and 2.6.2 / test_threading hangs

2009-08-19 Thread Roger Collins
Changes by Roger Collins : -- title: 2.5.4.3 / test_threading hangs -> 2.5.4.3 and 2.6.2 / test_threading hangs ___ Python tracker ___ ___

[issue6735] restype pointer to Structure subclass never initialized

2009-08-19 Thread dontbugme
New submission from dontbugme : So, say I'm sub-classing ctypes.Structure with a class: MyClass. I define __init__() in MyClass.. If I explicitly instantiate MyClass(), then the __init__() is properly executed as expected. But say I have a CFUNCTYPE where I set it's restype member to a POINTER

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2009-08-19 Thread Alex Quinn
Alex Quinn added the comment: This bug also prevents the cgi module from handling POST data with multipart/form-data. Consequently, 3.x cannot be readily used to write web apps for uploading files. See #4953: http://bugs.python.org/issue4953 -- nosy: +Alex Quinn

[issue6735] restype pointer to Structure subclass never initialized

2009-08-19 Thread Thomas Heller
Thomas Heller added the comment: This is on purpose. The idea is that the function call returns an existing pointer to an existing object, so __init__ (or __new__, IIRC) is never called in this case. -- resolution: -> invalid status: open -> closed ___

[issue4485] fast swap of "default" Windows python versions

2009-08-19 Thread Daniel Harding
Changes by Daniel Harding : -- nosy: +dharding ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: Why is it desirable to have such an option? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: This makes it more easily possible for automated systems to detect that there was a problem with the build. Checking an exit code is easy. Grabbing and parsing stdout and stderr is hard and fragile. -- nosy: +exarkun

[issue4953] cgi module cannot handle POST with multipart/form-data in 3.0

2009-08-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Please, please, please contact the email-sig and help pitch in. For many reasons I simply haven't had the cycles to work on this and I don't see that happening any time soon. There are folks willing to work on the package in the email-sig and I will add my $0

[issue6697] Python 3.1 segfaults when invalid UTF-8 characters are passed from command line

2009-08-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: > It would be unfortunate to replace all usages of _PyUnicode_AsString to > check the return value. I agree with MAL: we do need to check for errors returned from _PyUnicode_AsString, and it would be best if we created a fail-safe version of it. In the specif

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: > This makes it more easily possible for automated systems to detect that > there was a problem with the build. How do you define "problem" in this context? Why is it a problem if some extension module did not get built? Perhaps it cannot build correctly on th

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: If it's not a problem, then the invoker doesn't need to check the exit code of setup.py. Why are you resistant to exposing more information? -- ___ Python tracker ___

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Guilherme Polo
Guilherme Polo added the comment: > If it's not a problem, then the invoker doesn't need to check the exit > code of setup.py. Suppose the _tkinter module failed to compile on a given system, how would you know if this is a problem or not ? setup.py would return 1 because it couldn't be built,

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: > If it's not a problem, then the invoker doesn't need to check the exit > code of setup.py. Why are you resistant to exposing more information? Because I believe that the information that is being exposed in this patch is confusing, and will trick people int

[issue1550273] Fix numerous bugs in unittest

2009-08-19 Thread Ionut Turturica
Ionut Turturica added the comment: I keep trying to repro this on a smaller scale TestSuite but without any success. The whole test framework has around 300 tests and I can't really upload it. In the mean time I changed the TestSuite's __eq__ back to identity. I will attach the _breadth_first(

[issue6734] Imap lib implicit conversion from bytes to string

2009-08-19 Thread STINNER Victor
STINNER Victor added the comment: IMAP4 protocol uses bytes, not characters. There is no "standard charset", so you have to encode (manually) your login and password as bytes. login method prototype: IMAP4.login(login: bytes, password: bytes) You server may use UTF-8, but another server may u

[issue5210] zlib does not indicate end of compressed stream properly

2009-08-19 Thread Travis H.
Travis H. added the comment: Attaching unit test diff Output of "diff -u test_zlib.py~ test_zlib.py" -- Added file: http://bugs.python.org/file14745/zlib_finished_test.txt ___ Python tracker __

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: > When they then try to track down the problems, they will > (then rightly) complain that the implemented behavior is > incorrect. setup.py could optionally fail immediately when building of an extension has failed. -- ___

[issue6736] File handling in Python

2009-08-19 Thread Salebona
New submission from Salebona : How can I make read a text file from a normal text editor lik emicrosoft word or word pad? -- components: Windows messages: 91751 nosy: SallaS07 severity: normal status: open title: File handling in Python type: behavior versions: Python 2.6 _

[issue6737] PEP 372 odict.__eq__ behaves incorrectly

2009-08-19 Thread Christopher Egner
New submission from Christopher Egner : The current definition for odict.__eq__ is def __eq__(self, other): if isinstance(other, OrderedDict): return all(p==q for p, q in _zip_longest(self.items(), other.items())) return dict.__eq__(self, other) The current behav

[issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed

2009-08-19 Thread Martin v . Löwis
Martin v. Löwis added the comment: >> When they then try to track down the problems, they will >> (then rightly) complain that the implemented behavior is >> incorrect. > > setup.py could optionally fail immediately when building of an > extension has failed. What about skipped extensions (i.e

[issue6737] PEP 372 odict.__eq__ behaves incorrectly

2009-08-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue6737] PEP 372 odict.__eq__ behaves incorrectly

2009-08-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: I cannot reproduce your final example: Python 2.7a0 (trunk, Aug 4 2009, 12:07:15) >>> from collections import OrderedDict [41375 refs] >>> if (OrderedDict() != None): ... print 'okie' ... else: ... print 'gah' ... okie Both are based on OrderedDict

[issue6737] PEP 372 odict.__eq__ behaves incorrectly

2009-08-19 Thread Raymond Hettinger
Raymond Hettinger added the comment: If you need an implementation for OrderedDict that runs on Pythons before 2.7 or 3.1, use the recipe at: http://code.activestate.com/recipes/576693/ That code matches what was actually added to the language. --

[issue6737] PEP 372 odict.__eq__ behaves incorrectly

2009-08-19 Thread Christopher Egner
Christopher Egner added the comment: I was running the odict.py file from the PEP, figured out that things were going off the rails at dict.__eq__ and generalised, saw the same implementation in OrderedDict, I thought the same problem would exist. This is what I get for taking a shortcut. I ch

[issue5210] zlib does not indicate end of compressed stream properly

2009-08-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Some comments about the patch: - In zlibmodule.c, the is_finished member should be an int, and converted to a PyObject only when requested. - The test should check that is_finished is False one byte before the compressed part, and becomes True when the d

[issue6617] During compiling python 3.1 getting error Undefined symbol libintl_bind_textdomain_codeset

2009-08-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I dont know Solaris, but googling for "libintl_textdomain solaris" shows that many other projects have the same issue. The solution seems to set LDFLAGS=-lintl -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue6736] File handling in Python

2009-08-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The issue tracker is not a place to get help. Please ask your question on the comp.lang.python newsgroup, there are many people willing to help you. -- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed

[issue6737] PEP 372 odict.__eq__ behaves incorrectly

2009-08-19 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> works for me status: open -> closed ___ Python tracker ___ ___ Python-bugs-list maili

[issue6444] multiline exception logging via syslog handler

2009-08-19 Thread Simon Litchfield
Simon Litchfield added the comment: >From the manual for logging.handlers.SysLogHandler -- emit(record) The record is formatted, and then sent to the syslog server. If exception information is present, it is not sent to the server. Ideal, for me, would be to have each traceback line logged as