[issue4195] Regression for executing packages

2008-10-24 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Added revised version of patch with test cases and documentation updates, as well as fixing a potential recursion issue with pathological packages where __main__ was also a package) -- keywords: +patch Added file: http://bugs.python.or

[issue4012] Minor errors in multiprocessing docs

2008-10-24 Thread Erick Tryzelaar
Erick Tryzelaar <[EMAIL PROTECTED]> added the comment: fyi, the multiprocessing docs also refer to applyAync, but the function was renamed to apply_async. This is also in the python 3.0 docs. -- nosy: +erickt versions: +Python 3.0 ___ Python tracker

[issue4202] Multiple interpreters and readline module hook functions.

2008-10-24 Thread Graham Dumpleton
New submission from Graham Dumpleton <[EMAIL PROTECTED]>: Because the readline module uses PyGILState_Ensure() to facilitate triggering callbacks into Python code, this would make the ability to use the hook functions incompatible with use in sub interpreters. If this is the case, then that re

[issue4200] atexit module not safe in Python 3.0 with multiple interpreters

2008-10-24 Thread Graham Dumpleton
Graham Dumpleton <[EMAIL PROTECTED]> added the comment: I wouldn't be concerned about mod_python as likelihood that it will be ported is very low and even if it was it would be a long long way in the future. There is too much in mod_python itself unrelated to Python 3.0 that needs to be fixed

[issue4197] Doctest module does not work with zipped packages

2008-10-24 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- versions: +Python 2.5.3, Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4201] Pdb cannot access source code in zipped packages.

2008-10-24 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- components: +Library (Lib) type: -> behavior versions: +Python 2.5.3 ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4200] atexit module not safe in Python 3.0 with multiple interpreters

2008-10-24 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Ouch! We totally forgot about sub interpreters during the reimplementation of the atexit module. In my opinion it's a big bug for systems like mod_python and mod_wsgi. However it's too late to fix it for 3.0.0. Perhaps we can fix it in 3.0

[issue4015] [patch] make installed scripts executable on windows

2008-10-24 Thread Mark Hammond
Mark Hammond <[EMAIL PROTECTED]> added the comment: I can see how this might be useful, but I agree it should not happen by default, at least until it has been out for a while and feedback is clear that people do want it by default. I'd also like to find a way to pass all args, not just the firs

[issue4199] add shorthand global and nonlocal statements

2008-10-24 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11884/global_nonlocal_shorthand.patch ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue4201] Pdb cannot access source code in zipped packages.

2008-10-24 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file11883/pdb.patch ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4201] Pdb cannot access source code in zipped packages.

2008-10-24 Thread Alexander Belopolsky
New submission from Alexander Belopolsky <[EMAIL PROTECTED]>: With attached test.zip and svn revision 67006, $ ./python.exe test.zip > /Users/sasha/Work/python-svn/trunk/test.zip/__main__.py(2)f() (Pdb) l [EOF] With pdb.patch: $ ./python.exe test.zip > /Users/sasha/Work/python-svn/trunk/test

[issue2320] Race condition in subprocess using stdin

2008-10-24 Thread Ben Creech
Ben Creech <[EMAIL PROTECTED]> added the comment: You can trigger this bug without use of stdin=subprocess.PIPE, or for that matter any subprocess.PIPE's, although that makes it worse. (So the name for this issue may be overly specific.) I have seen this happening intermittently in our parallel

[issue4199] add shorthand global and nonlocal statements

2008-10-24 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11880/global_nonlocal_short_assign.patch ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4200] atexit module not safe in Python 3.0 with multiple interpreters

2008-10-24 Thread Graham Dumpleton
New submission from Graham Dumpleton <[EMAIL PROTECTED]>: In Python 3.0 the atexit module was translated from Python code to C code. Prior to Python 3.0, because it was implemented at C code level, the list of callbacks was specific to each sub interpreter. In Python 3.0 that appears to no lon

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Winfried Plappert
Changes by Winfried Plappert <[EMAIL PROTECTED]>: -- type: -> performance versions: +Python 2.4, Python 2.5, Python 2.6 ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2008-10-24 Thread Koen van de Sande
Koen van de Sande <[EMAIL PROTECTED]> added the comment: Ah, I wasn't thinking it through. It is fine for all .pyd of course, because they don't have any extra dependencies. I was thinking of DLLs with extra dependencies (of which there is one, TK85.dll). There, leaving out the manifest will b

[issue4199] add shorthand global and nonlocal statements

2008-10-24 Thread Benjamin Peterson
New submission from Benjamin Peterson <[EMAIL PROTECTED]>: PEP 3104 says that the nonlocal and global statements should allow a shorthand. ("global x; x = 3" == "global x = 3") This patch implements that. -- components: Interpreter Core files: global_nonlocal_short_assign.patch keywords:

[issue4196] library documentation errors

2008-10-24 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Thanks for the report! Fixed in r67011. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4197] Doctest module does not work with zipped packages

2008-10-24 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: I don't think there is an easy way to fix source file name reporting without injecting __file__ = '/' into the module namespace is zipimporter, but I don't know if any code relies on __file__ set to None. Setting __file__ to (in the

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Winfried Plappert
Winfried Plappert <[EMAIL PROTECTED]> added the comment: Yes, I can confirm that the performance is lousy on Solaris. Solaris-9/Python 2.5.1: time with os.popen : 0.124045133591 time with subprocess.Popen : 1.60335588455 Solaris-9/Python 2.6: time with os.popen : 0.115752220154 time with sub

[issue4197] Doctest module does not work with zipped packages

2008-10-24 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: The next patch, doctest-1.patch addresses the line number issue, but the file name is still wrong. $ ./python.exe testmodule.zip ** File "__main__", line 2, in __main

[issue4197] Doctest module does not work with zipped packages

2008-10-24 Thread Alexander Belopolsky
Changes by Alexander Belopolsky <[EMAIL PROTECTED]>: -- keywords: +patch Added file: http://bugs.python.org/file11878/doctest.patch ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4197] Doctest module does not work with zipped packages

2008-10-24 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: Attached patch addresses the crash, but two issues remain: $ ./python.exe testmodule.zip ** File "__main__", line ?, in __main__.c Failed example: 'line 2' Expecte

[issue4198] os.path.normcase gets fooled on windows with mapped linux network drive

2008-10-24 Thread dawidjoubert
New submission from dawidjoubert <[EMAIL PROTECTED]>: The documentation for os.path.normcase reads the case gets normalized based on the file system http://docs.python.org/dev/library/os.path.html Current documentation: Normalize the case of a pathname. On Unix, this returns the path unchanged;

[issue4197] Doctest module does not work with zipped packages

2008-10-24 Thread Alexander Belopolsky
New submission from Alexander Belopolsky <[EMAIL PROTECTED]>: With attached teestmodule.zip and svn revision 67006, $ ./python.exe testmodule.zip Traceback (most recent call last): File "/Users/sasha/Work/python-svn/trunk/Lib/runpy.py", line 121, in _run_module_as_main "__main__", fname,

[issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c

2008-10-24 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > Added file: http://bugs.python.org/file11875/mario.jpg Please don't use the bug tracker to upload unrelated code (such as Numpy code - Numpy is not part of Python core). I'm tempted to mark all these images as spam. __

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Winfried Plappert
Winfried Plappert <[EMAIL PROTECTED]> added the comment: Here are my figures from a different processor on Linux (Ubuntu): [EMAIL PROTECTED]:~/python$ python2.5 popentest.py time with os.popen : 0.0478880405426 time with subprocess.Popen : 0.0596849918365 [EMAIL PROTECTED]:~/python$ python2.6

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2008-10-24 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > What would be the best way to integrate a search/replace > operation like this in the Python build process? Is the manifest > generated as a seperate file here first as well, or is it directly > embedded? What's wrong with Andre Heider's

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: I don't expect Python3 to be all that great io performance-wise yet. Still, for me on the Mac os.popen beats subprocess.Popen pretty handily: % python3.0 popentest.py time with os.popen : 0.874988 time with subprocess.Popen : 2.1129

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread David W. Lambert
David W. Lambert <[EMAIL PROTECTED]> added the comment: cygwin Python 2.5.1 (similar) time with os.popen : 0.43818802 time with subprocess.Popen : 0.36161035 linux python 2.4.2 (similar) time with os.popen : 0.0344939231873 time with subprocess.Popen : 0.035442113876

[issue4171] SSL handshake fails after TCP connection in getpeername()

2008-10-24 Thread Bill Janssen
Changes by Bill Janssen <[EMAIL PROTECTED]>: -- assignee: -> janssen ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list ma

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Good suggestion Sameer. I tried it out with Python 2.5 on a Linux host here and saw essentially identical results for the two alternatives (~ 0.08s). S ___ Python tracker <[EMAIL PROTECTED]>

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Sameer
Sameer <[EMAIL PROTECTED]> added the comment: The subprocess module does different things depending on whether the systems are Windows or Posix. This could explain the bad performance on Solaris and the Mac and the good performance on Windows. If this is correct, then we should see poor perform

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Good question. I don't think it's MacOSX-specific. The original problem raised its ugly head on Solaris 10. I don't have quite as many versions of Python available there, but the relative performance is still bad, roughly 0.05 for os.pop

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Winfried Plappert
Winfried Plappert <[EMAIL PROTECTED]> added the comment: Hi Skip, I find different measurements om Windows/XP: I copied the script and ran it under Python 2.5.2 and Python 2.6 (as downloaded from http://python.org/ftp/python/2.6/python-2.6.msi): [EMAIL PROTECTED] /cygdrive/e/tmp $ python ./timi

[issue4196] library documentation errors

2008-10-24 Thread David W. Lambert
New submission from David W. Lambert <[EMAIL PROTECTED]>: 4 problems noted here. Thanks, Dave. 1,2---problems 1 & 2 concern py<3k references: http://docs.python.org/dev/3.0/library/multiprocessing.html 1) "apply(func[, args[, kwds]]) Equivalent of the apply() builtin function. It blocks till

[issue4195] Regression for executing packages

2008-10-24 Thread vajda
New submission from vajda <[EMAIL PROTECTED]>: Copy of #2751. Having discussed this with Nick a bit more over email, he suggested that package execution could actually be properly supported by looking for a __main__ module inside the package and executing it instead. This is consistent with the

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Sameer
Changes by Sameer <[EMAIL PROTECTED]>: -- nosy: +sameerd ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mailing list Un

[issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c

2008-10-24 Thread kai zhu
Changes by kai zhu <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11875/mario.jpg ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Py

[issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c

2008-10-24 Thread kai zhu
Changes by kai zhu <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11874/img2txt.py ___ Python tracker <[EMAIL PROTECTED]> ___ ___ P

[issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c

2008-10-24 Thread kai zhu
Changes by kai zhu <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11873/img2txt 3dplot screenshot.gif ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3238] backport python 3.0 language functionality to python 2.6 by adding 7 opcodes to ceval.c

2008-10-24 Thread kai zhu
kai zhu <[EMAIL PROTECTED]> added the comment: post fyi: here's moderately complex python-3.0 script (plus curry extension) i wrote using numpy, PIL, & scipy.weave 2.6 extensions. it takes a jpeg, gif... image file & outputs it in colorized ascii art. the actual purpose is for colorized 3-d sci

[issue4194] Miserable subprocess.Popen performance

2008-10-24 Thread Skip Montanaro
New submission from Skip Montanaro <[EMAIL PROTECTED]>: I noticed a colleague at work today checked in a change to his code to switch back from subprocess.Popen to os.popen. I asked him about it and he reported that subprocess.Popen was about 10x slower than os.popen. I asked him for a simple t

[issue4193] Multiprocessing example

2008-10-24 Thread David W. Lambert
New submission from David W. Lambert <[EMAIL PROTECTED]>: http://docs.python.org/dev/3.0/library/multiprocessing.html I'm sure the examples have been thoughtfully contrived. Still, this seems instructive without adding much complexity. I'd change the first "trivial example" to #

[issue4136] merge json library with simplejson 2.0.4

2008-10-24 Thread Bob Ippolito
Changes by Bob Ippolito <[EMAIL PROTECTED]>: -- title: merge json library with simplejson 2.0.3 -> merge json library with simplejson 2.0.4 ___ Python tracker <[EMAIL PROTECTED]>

[issue4136] merge json library with simplejson 2.0.3

2008-10-24 Thread Bob Ippolito
Bob Ippolito <[EMAIL PROTECTED]> added the comment: Attached is a new diff, one byte fix to the float parser when parsing JSON documents that are just a float (also a test and a version bump). Added file: http://bugs.python.org/file11870/json_issue4136_r67009.diff _

[issue2983] Ttk support for Tkinter

2008-10-24 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: On Fri, Oct 24, 2008 at 5:27 AM, Guilherme Polo <[EMAIL PROTECTED]> wrote: > > Guilherme Polo <[EMAIL PROTECTED]> added the comment: > > Now that the new branches are around I guess we could consider adding it > then ? I will help with anything.

[issue4192] Subprocess error with I/O redirection to Pipes

2008-10-24 Thread Pascal Chambon
New submission from Pascal Chambon <[EMAIL PROTECTED]>: I've created on my desktop a file flooder.py containing just the following: ## import sys, os progress=open(r"C:\Users\v-pascha\Desktop\STDERR.txt","w") for i in range(101): print str(i)*20 progress.write( str(i)+"\n"

[issue4177] Crash in MIMEText on FreeBSD

2008-10-24 Thread Sérgio Surkamp
Sérgio Surkamp <[EMAIL PROTECTED]> added the comment: When I first saw the problem, the email system queue was stopped about 2 days (weekend) :-( The email system control the number of open threads, so I wasn't opening new threads too and issuing many warnings about it on logs Anyway, already i

[issue4177] Crash in MIMEText on FreeBSD

2008-10-24 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > Usually 100%. But saw it with more (using both CPU's), I think that mean > more then one thread "freezed". Does the program finish its job after 10 minutes or 1 hour? Using all the CPU doesn't mean that Python is frozen, it's the opposite:

[issue4177] Crash in MIMEText on FreeBSD

2008-10-24 Thread Sérgio Surkamp
Sérgio Surkamp <[EMAIL PROTECTED]> added the comment: - FreeBSD version? FreeBSD 7.0-RELEASE - CPU, memory? CPU: 2 x Pentium III 1.133 GHz Memory: 512 Mbytes - Full Python version? Python 2.5.2 (r252:60911, Oct 2 2008, 10:03:50) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7 > On "freeze",

[issue4177] Crash in MIMEText on FreeBSD

2008-10-24 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > The original text block is about 5 to 9 Mbytes (...), it freezes > building the MIMEText object. Actually no MemoryError isn't raised, > just a sudden freeze of the running thread. Can you give more details about the freeze? - FreeBSD ver

[issue4177] Crash in MIMEText on FreeBSD

2008-10-24 Thread Sérgio Surkamp
Sérgio Surkamp <[EMAIL PROTECTED]> added the comment: > Your text file is ~40 MB. Python may allocate mutiple objects bigger than 40 MB to create the email content. The algorithm should be changed to work on a stream (process small chunks, eg. 4 KB) instead of manipule the full text in memory

[issue2983] Ttk support for Tkinter

2008-10-24 Thread Guilherme Polo
Guilherme Polo <[EMAIL PROTECTED]> added the comment: Now that the new branches are around I guess we could consider adding it then ? I will help with anything. ___ Python tracker <[EMAIL PROTECTED]> _

[issue639266] Tkinter sliently discards all Tcl errors

2008-10-24 Thread Guilherme Polo
Guilherme Polo <[EMAIL PROTECTED]> added the comment: Uhm, long time without discussion but I'm hoping someone interested may read this. You have to provide a "bgerror" command to Tcl, so it will get invoked when a background error happens. Either _tkinter.c could create one for an interpreter i

[issue4184] Remove use of private attributes in smtpd

2008-10-24 Thread Doug Hellmann
Changes by Doug Hellmann <[EMAIL PROTECTED]>: -- nosy: +doughellmann ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mai

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2008-10-24 Thread Dan Dibagh
Dan Dibagh <[EMAIL PROTECTED]> added the comment: > Which PEP specifically? PEP 263 only mentions the unicode-escape > encoding in its problem statement, i.e. as a pre-existing thing. > It doesn't specify it, nor does it give a rationale for why it behaves > the way it does. PEP 100 and PEP 263.

[issue4177] Crash in MIMEText on FreeBSD

2008-10-24 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Your example work here on: - Linux, i386, 2 Go of memory, Python 2.5 - FreeBSD in Qemu, i386, 512 MB of memory, Python 2.5 > The program just eat all the CPU and with high memory usage or raise a MemoryError Yes, it takes one minute or mo

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2008-10-24 Thread Koen van de Sande
Koen van de Sande <[EMAIL PROTECTED]> added the comment: OK, so the define is not going to work. For Python extensions built through distutils, the msvc9compiler_stripruntimes.diff patch will work: it will remove just the dependency on the VC90runtimes. It will leave other assembly dependencie

[issue4177] Crash in MIMEText on FreeBSD

2008-10-24 Thread Roumen Petrov
Roumen Petrov <[EMAIL PROTECTED]> added the comment: what about data segment and stack size limits ? ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3714] nntplib module broken by str to unicode conversion

2008-10-24 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: As I did for POP3 (poplib) and IMAP4 (imaplib), nntplib should use bytes instead of characters because the charset may be different for each message and nntplib is unable to retreive the charset from the email header. _

[issue3518] multiprocessing: BaseManager.from_address documented but doesn't exist

2008-10-24 Thread Mart Sõmermaa
Mart Sõmermaa <[EMAIL PROTECTED]> added the comment: I propose we add the following to that section as well. If you need to provide access to a queue from both local and remote processes, use `multiprocessing.Queue` in the server: >>> from multiprocessing import Process, Queue >>> from multipro

[issue3714] nntplib module broken by str to unicode conversion

2008-10-24 Thread Barry A. Warsaw
Changes by Barry A. Warsaw <[EMAIL PROTECTED]>: -- priority: deferred blocker -> release blocker ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4120] Do not embed manifest files in *.pyd when compiling with MSVC

2008-10-24 Thread Andre Heider
Andre Heider <[EMAIL PROTECTED]> added the comment: I tried to use _CRT_NOFORCE_MANIFEST but i couldn't get it working. There're some infos about this approach at http://blog.m-ri.de/index.php/2008/05/06/hotfix-fuer-usemsprivateassembliesh-und-vc-2008/ , but even with the mentioned "__declspec(se

[issue4191] urlparse normalize URL path

2008-10-24 Thread monk.e.boy
New submission from monk.e.boy <[EMAIL PROTECTED]>: Hi, The way urljoin works is a bit funky, equivalent paths do not get cleaned in a consistent way: import urlparse import posixpath print urlparse.urljoin('http://www.example.com', '///') print urlparse.urljoin('http://www.example.com/', '