[issue7143] get_payload(decode=True) eats last newline

2009-10-15 Thread Ehsan Amiri
Changes by Ehsan Amiri : -- nosy: +esam ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError

2009-10-15 Thread Senthil Kumaran
Senthil Kumaran added the comment: In the Issue7044, the reporter has identified the root cause and possible fix too. " In Python 2.6.3 on Mac OS 10.6.1, there is a bug in lib/python2.6/urllib.py, line 1367. The variable hostIP is used before it's defined. You can fix it by adding "hostIP = No

[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError

2009-10-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: Barry: this should be a release blocker, I introduced the problem around or after 2.6.3 :-( When do you cut rc2? I probably won't be able to provide a patch myself until Saturday afternoon (CEST). -- priority: -> release blocker __

[issue7044] urllib.urlopen crashes when used on Mac OS 10.6.1 through a proxy

2009-10-15 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue7044] urllib.urlopen crashes when used on Mac OS 10.6.1 through a proxy

2009-10-15 Thread Ned Deily
Ned Deily added the comment: See also Issue7149. -- nosy: +ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue7149] 2.6.4rc1 regression: test_urllib2 fails on OS X with UnboundLocalError

2009-10-15 Thread Ned Deily
New submission from Ned Deily : Possible Release Blocker A number of proxy test cases in test_urllib2 are now failing with: ERROR: test_proxy (test.test_urllib2.HandlerTests) -- Traceback (most recent call last): File "/Libr

[issue7133] test_ssl failure

2009-10-15 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Reviewed, built, tests ok. Linux trader 2.6.18-ARCH #1 SMP PREEMPT Sun Nov 19 09:14:35 CET 2006 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz GenuineIntel GNU/Linux vote +1 weight +0.1 :-) -- nosy: +kbk priority: -> normal ___

[issue3079] sys.exit() called from optparse - bad, bad, bad

2009-10-15 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: Thanks for the response! I can indeed catch SystemExit, but I would like to be able to take one action (terminate the program) if the user supplied an unknown option, and another action (prompt for a new value) if the user supplied a bad value for an opt

[issue7148] socket.py: r75412 broke build

2009-10-15 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: bah. I looked twice for a prior bug and missed it! Sorry -- ___ Python tracker ___ ___ Python-

[issue6941] Socket error when launching IDLE

2009-10-15 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: 08jpurcell unresponsive, ignoring for now (but see suggestions below) bdouglasoz: had a firewall blocking the subprocess, apparently works for her now. I'd point out that Notepad is just an editor, IDLE gives you much more. Linux is great, but IDLE works f

[issue7148] socket.py: r75412 broke build

2009-10-15 Thread R. David Murray
R. David Murray added the comment: This is a duplicate of issue 7133, where Antoine has already proposed a patch. -- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> test_ssl failure ___

[issue7148] socket.py: r75412 broke build

2009-10-15 Thread Kurt B. Kaiser
New submission from Kurt B. Kaiser : buildbots failing since r75412: testSocketServer (test.test_ssl.ThreadedTests) ... Traceback (most recent call last): File "/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/ SocketServer.py", line 282, in _handle_request_noblock self.process_r

[issue1759169] clean up Solaris port and allow C99 extension modules

2009-10-15 Thread Zooko O'Whielacronx
Zooko O'Whielacronx added the comment: I just tried to port a library of mine -- zfec -- to Nexenta (the Ubuntu variant built on top of OpenSolaris). I hit this bug because the Nexenta folks don't use all the patches that are applied to Python by the Solaris folks. My port of my library is blo

[issue3079] sys.exit() called from optparse - bad, bad, bad

2009-10-15 Thread R. David Murray
R. David Murray added the comment: There was recently a long discussion of this on python-dev (in the context of a proposal to add argparse to the stdlib; argparse does the same thing). The conclusion was that the current behavior is the most useful behavior, and that if you don't want to exit

[issue6721] Locks in python standard library should be sanitized on fork

2009-10-15 Thread Gregory P. Smith
Gregory P. Smith added the comment: > Antoine Pitrou added the comment: > > Rather than having a kind of global module registry, locks could keep > track of what was the last PID, and reinitialize themselves if it changed. > This is assuming getpid() is fast :-) Locks can't blindly release the

[issue3079] sys.exit() called from optparse - bad, bad, bad

2009-10-15 Thread Phillip M. Feldman
Phillip M. Feldman added the comment: The current behavior of optparse is contrary to how most of Python works. optparse should throw a named exception that can be trapped and identified by the calling program. Doing a SystemExit is unacceptable. I can't believe that this is such a hard thing

[issue7146] [PATCH] platform.uname()[4] returns 'amd64' on Windows and 'x86-64' on Linux

2009-10-15 Thread Philip Jenvey
Changes by Philip Jenvey : -- nosy: +lemburg, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue7147] Remove WITHOUT_COMPLEX from 3.x trunk

2009-10-15 Thread Skip Montanaro
New submission from Skip Montanaro : I raised the topic of the use of WITHOUT_COMPLEX in python-dev. Here's a patch to remove it from the 3.x trunk. -- components: Interpreter Core files: nocomplex.diff keywords: easy, needs review, patch, patch messages: 94113 nosy: skip.montanaro prio

[issue7146] [PATCH] platform.uname()[4] returns 'amd64' on Windows and 'x86-64' on Linux

2009-10-15 Thread Zooko O'Whielacronx
New submission from Zooko O'Whielacronx : Looking at http://bugs.python.org/setuptools/issue1 and reading the source of Lib/platform.py, it appears to me that uname() returns different strings identifying the amd64 architecture depending on what operating system is running. It would seem to me t

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Ryan Williams
Ryan Williams added the comment: Adding 2.5 back, looks like it was removed accidentally. Also, here's a list of strings for testing purposes: ['', '', '', '', '', '', ''] -- versions: +Python 2.5 ___ Python tracker

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Added file: http://bugs.python.org/file15143/subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Added file: http://bugs.python.org/file15142/test_subprocess.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Removed file: http://bugs.python.org/file15137/test_subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Removed file: http://bugs.python.org/file15141/subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Added file: http://bugs.python.org/file15141/subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Removed file: http://bugs.python.org/file15135/subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue7128] cPickle looking for non-existent package copyreg

2009-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Here is a test+patch. This does not apply to py3k: restricted mode does not exist there. -- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file15140/cpickle_restricted.patch ___ P

[issue7145] UTF-16 BOM is not written by socket.makefile (but is expected by read)

2009-10-15 Thread Yang Zhang
Yang Zhang added the comment: To answer my own question: specify UTF-16BE or UTF-16LE -- ___ Python tracker ___ ___ Python-bugs-list m

[issue7145] UTF-16 BOM is not written by socket.makefile (but is expected by read)

2009-10-15 Thread Yang Zhang
New submission from Yang Zhang : When I call s.makefile('r',encoding='utf-16').read(), this expects a BOM, but s.makefile('w',encoding='utf-16').write('hello') doesn't produce it. This is asymmetric. BTW is there a way to prevent the reading file from expecting a BOM? -- components: L

[issue7144] imp.load_module in thread causes core dump on OSX 10.6

2009-10-15 Thread Ronald Oussoren
Ronald Oussoren added the comment: This seems to be a known issue: importing extensions in a thread fails on OSX 10.6 (with a hard crash of the interpreter). The crash in inside the initialisation function for an Apple framework. I haven't been able to determine if the problem is in Python o

[issue7144] imp.load_module in thread causes core dump on OSX 10.6

2009-10-15 Thread Pete Hunt
New submission from Pete Hunt : Apologies if I mess up the formatting - my first bug report submitted. Steps to reproduce (OSX Snow Leopard, 2.6.3) >>> import threading, imp >>> def doit(): ... print imp.load_module("cherrypy", None, "/Library/Frameworks/Python.framework/Versions/2.6/lib/p

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

2009-10-15 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: Antoine asked me to give my opinion on the non-blocking SSL API. I can say that the current behavior of SSLSocket.recv is certainly not very good and probably makes SSLSocket useless for any non-blocking application. Letting the underlying want-read/want-

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: One more question, why is "ssl_version=ssl.PROTOCOL_TLSv1" hardwired? -- ___ Python tracker ___ ___

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: >From a quick look at the patch, if you call login() twice, the socket will be wrapped twice as well? Perhaps auth_tls() should have a protection against this. In prot_p() and prot_c(), it seems that self._prot_p is updated unconditionally, regardless of the FT

[issue6721] Locks in python standard library should be sanitized on fork

2009-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Rather than having a kind of global module registry, locks could keep track of what was the last PID, and reinitialize themselves if it changed. This is assuming getpid() is fast :-) -- nosy: +pitrou ___ Python track

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I can surely write tests altough I think that issue 3890 might cause some problems since the test server I included some months ago is asyncore-based and hence asynchronous. I have a good knowledge of the FTP protocol but someone with a good knowledge of

[issue7143] get_payload(decode=True) eats last newline

2009-10-15 Thread Andreas Thomas
New submission from Andreas Thomas : The attachment of my sample email contains '123\n', but get_payload (decode=True) returns '123'. The source of this error is the function _bdecode from the email.utils module, which gets called for decoding base64 encoded payloads. Here the last \n gets stri

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, first some tests should be added. As for reviewing, it needs to be done by someone competent with FTP and SSL/TLS. If no such person is available and you are confident that the patch is ok (and ready to do necessary maintenance), then perhaps you can commi

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file13171/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file13161/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file10784/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file9807/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file9783/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file9782/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file9775/unnamed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Are there chances to see this reviewed? -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue2054] add ftp-tls support to ftplib - RFC 4217

2009-10-15 Thread Lance Edgar
Changes by Lance Edgar : -- nosy: +lgedgar ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue7142] __repr__ of memoryview object has type unicode; should be str.

2009-10-15 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks, Antoine. Fixed in r75438. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue7142] __repr__ of memoryview object has type unicode; should be str.

2009-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good, obviously. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue7140] imp.new_module does not function correctly if the module is returned from a function and used directly

2009-10-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r75437. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue7142] __repr__ of memoryview object has type unicode; should be str.

2009-10-15 Thread Mark Dickinson
New submission from Mark Dickinson : Objects/memoryobject.c makes calls to PyUnicode_FromString and PyUnicode_FromFormat. This prevents building of Python with the -- disable-unicode option. Here's a patch. -- assignee: pitrou components: Interpreter Core files: memoryview.patch keywo

[issue7141] 2to3 should add from __future__ import print_statement

2009-10-15 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> benjamin.peterson nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list maili

[issue7141] 2to3 should add from __future__ import print_statement

2009-10-15 Thread Daniel Stutzbach
New submission from Daniel Stutzbach : I'm in the process of converting several Python scripts so that they work under both Python 2.6 and 3.1. For the most part, 2to3 does an amazing job. Great tool. One little feature request: could we make it add "from __future__ import print_statement" to

[issue7080] locale.strxfrm raises MemoryError

2009-10-15 Thread egreen
egreen added the comment: All right. The function strcoll also isn't tested (except for issue #3303). I'll look into that one, too. -- ___ Python tracker ___ __

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Added file: http://bugs.python.org/file15137/test_subprocess.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Removed file: http://bugs.python.org/file15136/test_subprocess.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Changes by Marco Buccini : Added file: http://bugs.python.org/file15136/test_subprocess.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Marco Buccini
Marco Buccini added the comment: I agree with Milko. However, I think Popen.send_signal should poll() before sending any signals, without resetting any variables to zero (or None). In this way, if you poll() before sending a signal, if the return code is None, the child is still running. If th

[issue7120] logging depends on multiprocessing

2009-10-15 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Please apply this for 2.6.4rc2 -- priority: -> release blocker resolution: fixed -> accepted status: pending -> open ___ Python tracker ___ __

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: FWIW, the latest Debian package: http://packages.debian.org/sid/libexpat1 is also vulnerable (I checked in the sources expat_2.0.1.orig.tar.gz, and it's not corrected in expat_2.0.1-4.diff.tgz) -- ___ Python tr

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't know really. I wonder how Linux distributions handle maintenance of that library. Perhaps Fred Drake can help us? -- assignee: effbot -> nosy: +fdrake ___ Python tracker _

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The same thing had been discovered in expat 12 months before: http://expat.cvs.sourceforge.net/viewvc/expat/expat/lib/xmltok_impl.c?r1=1.13&r2=1.15 But expat hasn't made any release since 2.0.1, in June 2007... Are you suggesting to update our copy of exp

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Ralf Schmitt
Changes by Ralf Schmitt : -- nosy: +schmir ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is our copy of expat in sync with upstream? How does maintenance happen? -- nosy: +pitrou ___ Python tracker ___ ___

[issue7080] locale.strxfrm raises MemoryError

2009-10-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nice catch. I wonder why not all of our modules are PY_SSIZE_T_CLEAN in py3k. This function is not actually tested, could you add a test to the regression suite? -- nosy: +pitrou priority: -> high ___ Python tracker

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This has already been fixed with r74429, but no issue was filed at the time. It should be backported to 2.6 and 3.1 at least. And probably to 2.5 as well, because a crash on XML input can be considered as a security issue. Raising to "deferred blocker" s

[issue7140] imp.new_module does not function correctly if the module is returned from a function and used directly

2009-10-15 Thread Jamie Kirkpatrick
Jamie Kirkpatrick added the comment: Updated the testcase to show that the __dict__ for the module is incorrect unless the module is assigned to a temp variable. -- Added file: http://bugs.python.org/file15134/testcase.py ___ Python tracker

[issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated

2009-10-15 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti priority: -> normal stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-lis

[issue7140] imp.new_module does not function correctly if the module is returned from a function and used directly

2009-10-15 Thread Jamie Kirkpatrick
New submission from Jamie Kirkpatrick : See the testcase included. If you instead assign the result of the get_module() call to a variable and then make the call to the function defined in that module it works as expected. -- components: Library (Lib) files: testcase.py messages: 9408

[issue7123] Multiprocess Process does not always exit when run from a thread.

2009-10-15 Thread Peter Saunders
Peter Saunders added the comment: Tested on Linux, and repeated the issue - just to confirm this isn't a Solaris specific issue. Tested using dummy_threading - bug does not appear when that is used. Added _verbose=True to threads, and log_to_stderr(SUBDEBUG) set for Process. Attached is the o

[issue7138] elementtree segfaults on invalid xml declaration

2009-10-15 Thread Walter Dörwald
Walter Dörwald added the comment: Here is a stacktrace of the crash with the system Python 2.6.1 on Mac OS X 10.6.1: Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x00010100 0x7fff810f96b8 in XML_SetEncoding () (gdb) bt #0

[issue7080] locale.strxfrm raises MemoryError

2009-10-15 Thread egreen
egreen added the comment: Could someone triage this? And review my simple fix? I think it should be a release blocker. It seems to me to be a problem on all 64-bit non-Windows platforms, or any platform if using UCS-4. The 4 high-order bytes of an 8-byte Py_ssize_t variable are not initializ

[issue5243] Missing dependency in distutils build

2009-10-15 Thread Tarek Ziadé
Tarek Ziadé added the comment: It looks like there's a missing part in the patch: get_outputs(), and get_inputs() should also return files created in build() Now something I don't understand is how reportlab distribution is doing to copy the compiled extensions when "install" is called. Could

[issue7139] ElementTree: Incorrect serialization of end-of-line characters in attribute values

2009-10-15 Thread Moriyoshi Koizumi
Moriyoshi Koizumi added the comment: Tabs must be converted to character references as well. -- ___ Python tracker ___ ___ Python-bugs