[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias jason.vas.d...@gmail.com added the comment: To Build: $ gcc -fPIC -shared -o psempy.c psempy.so -I/usr/include/python2.6 -L/usr/lib/python2.6 -lpython2.6 mv psempy.so psem.so $ dd if=/dev/urandom of=app1_20090407.01.log bs=100 count=1 $ python import sys, os, re, datetime, psem,

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias jason.vas.d...@gmail.com: Removed file: http://bugs.python.org/file13656/psem_example.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5725 ___

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias jason.vas.d...@gmail.com added the comment: Example Python use of psem.so Parallel ForEach : Log Compressor Usage: $ gcc -o psem.so -fPIC -shared psempy.c -I/usr/include/python2.6 -L/usr/lib/python2.6 -lpython2.6 $ dd if=/dev/urandom bs=100 count=1 of=app1_20090407.01.log $ python

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Julian Scheid
Julian Scheid julian...@gmail.com added the comment: The same issue is present in 2.4 and 2.5 as well as 3.0 so I'm updating this issue accordingly (haven't tried 2.7 or 3.1). I've been working around this issue with some success and will be posting patches shortly. -- nosy: +julians37

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias jason.vas.d...@gmail.com added the comment: $ time /usr/bin/python2.6 ./psem_example.py 21 | tee log Do you really want to run test using 16 1MB log files ? Y/Ny generating files 0..15 generating file 0 generating file 1 generating file 2 generating file 3 generating file 4 generating

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Julian Scheid
Julian Scheid julian...@gmail.com added the comment: Actually this seems to be fixed in 3.0.1 - yay! -- versions: -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3646 ___

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Julian Scheid
Julian Scheid julian...@gmail.com added the comment: Attached a fix for release26-maint branch. I've tested this as follows: ./configure --enable-toolbox-glue --enable-universalsdk --enable-framework=/tmp/python-2.6-maint-install/Library/Framework --prefix=/tmp/python-2.6-maint-install make

[issue5676] shutils test fails on ZFS (on FUSE, on Linux)

2009-04-09 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: The analysis I wrote on 2009/4/6 is correct, but I just discovered another important detail: it only happens on my ZFS partition. I'm using ZFS on Linux, via FUSE. No wonder I'm the only person it's happening to! I don't know whether it's

[issue5676] shutils test fails on ZFS (on FUSE, on Linux)

2009-04-09 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: I should be more specific: patch was written against py3k/trunk r71404. Though I imagine a very similar patch could be written for 2.7 (or 2.6 if appropriate). -- ___ Python tracker

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Julian: patches for 2.4 and 2.5 will not be accepted, both releases are in critical security fixes only mode. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3646

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Julian Scheid
Julian Scheid julian...@gmail.com added the comment: I had a hunch that might be the case. I'm still planning to upload them here for the benefit of others who, like me, have to maintain those versions as framework installs. Is that OK? -- ___

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Julian Scheid
Julian Scheid julian...@gmail.com added the comment: I was a bit surprised myself but I've just double-checked and it seems to work fine. I started with a freshly unpacked 3.0.1 tarball and used the following command: ./configure --enable-toolbox-glue --enable-universalsdk

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Uploading a patch is fine, my comment was just a warning that your patch won't be applied in the repository (at least not for 2.4 and 2.5). I will look at your patch for 2.6 in the near future. Are you sure that the issue is fixed in

[issue5727] doctest pdb readline broken

2009-04-09 Thread Wolfgang Schnerring
New submission from Wolfgang Schnerring wosc+pyt...@wosc.de: When pdb is called from inside a doctest under python2.5, the readline keys do not work anymore -- like they did just fine in 2.4. Steps to reproduce: 1. Create two files, foo.txt and foo.py, like so: $ cat foo.txt import pdb;

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias jason.vas.d...@gmail.com added the comment: C source code implementing psem.* python module functions -- Added file: http://bugs.python.org/file13662/psempy.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5725

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias jason.vas.d...@gmail.com: Removed file: http://bugs.python.org/file13655/psempy.c ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5725 ___

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Julian Scheid
Julian Scheid julian...@gmail.com added the comment: On second thought, are you sure that's how fullinstall is meant to work? If I use frameworkinstall I get the following message at the end: * Note: not installed as 'python'. * Use 'make fullinstall' to install as 'python'. * However, 'make

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias jason.vas.d...@gmail.com: -- components: +Interpreter Core ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5725 ___ ___

[issue5728] Support telling TestResult objects a test run has finished

2009-04-09 Thread Robert Collins
New submission from Robert Collins robe...@robertcollins.net: Original mail: JML's testtools has a TestResult subclass with a done() method. The reason for this method is to allow doing things after the last test has run. While a result can infer 'first test' it can't infer 'last test' without

[issue5728] Support telling TestResult objects a test run has finished

2009-04-09 Thread Robert Collins
Robert Collins robe...@robertcollins.net added the comment: Now, some refinements, as usual (for me at least) when considering a feature like this from an upstream perspective, where one's immediate use cases are just special cases not general case, I've come up with some refinements. Firstly,

[issue5726] ld_so_aix does exit successfully even in case of failure

2009-04-09 Thread Floris Bruynooghe
New submission from Floris Bruynooghe floris.bruynoo...@gmail.com: ld_so_aix is used to invoke the linker correctly on AIX. However when the linking fails the script happily returns 0 and a Makefile using it will assume all went well. See the trivial patch attached. -- components:

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Julian Scheid
Julian Scheid julian...@gmail.com added the comment: Ah, that makes sense - thanks for clarifying. And I was mistaken about 2.6, the no-suffix symlinks are there in $PREFIX/bin so all is good. Let me know what you think of the patch when you get a chance to look at it. --

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias jason.vas.d...@gmail.com added the comment: PS: Timings for x86{-32,-64} or ia{32,64} architectures are likely to show a significantly smaller speedup because they truly are MIMD CISC pipeline machines ( the multiple-core feature and IA64 instruction triplet groups mean they

[issue3646] MacOS X framework install to non-standard directory fails

2009-04-09 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: For 3.1 I need to check if the right files get install into the various 'bin' directories. At the languages summit at PyCon'09 the consensus seemed to be that the command-line interpreter for Python 3.x should be python3 and that

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias jason.vas.d...@gmail.com added the comment: I suggest a new sys SysV-semaphore API : sys.semget( sem_key, sem_nsems, sem_flags) sys.SEM_KEY_ANY = 0 sys.SEM_UNDO= 0x1000 /*chain of atomic kernel UNDO operations*/ sys.SEM_GETPID = 11 /* get sempid */ sys.SEM_GETVAL =

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias jason.vas.d...@gmail.com: Removed file: http://bugs.python.org/file13657/psem_example.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5725 ___

[issue4136] merge json library with latest simplejson 2.0.x

2009-04-09 Thread djc
Changes by djc dirk...@ochtman.nl: -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4136 ___ ___ Python-bugs-list mailing list

[issue4136] merge json library with latest simplejson 2.0.x

2009-04-09 Thread djc
djc dirk...@ochtman.nl added the comment: I'll take a stab at doing it Raymond's way this weekend. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4136 ___

[issue5728] Support telling TestResult objects a test run has finished

2009-04-09 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: startTestRun and stopTestRun sound good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5728 ___

[issue5673] Add timeout option to subprocess.Popen

2009-04-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I think taking this to python-ideas to discuss the API (and the implementation) would be the best way forward. You can probably get help on the Windows stuff there, too. You are also going to need unit tests. -- nosy:

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias jason.vas.d...@gmail.com added the comment: Contrast what I had to do to perform a process semaphore operation in Python with how one would do it in PERL : -- Perl 5.10.0 documentation -- Show toolbar Home Language reference Functions semop semop Perl functions A-Z | Perl functions by

[issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument

2009-04-09 Thread Paul Morelle
Paul Morelle madp...@htkc.org added the comment: Hello, I can reproduce the bug on a Windows XP Professional, SP 3, with three versions of Python: Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit

[issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument

2009-04-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: If you are passing a custom environment to a subprocess, then you must supply everything in that environment that the program you are calling requires in order to run. That said, it would be a good idea to document the Windows minimum

[issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument

2009-04-09 Thread Paul Morelle
Paul Morelle madp...@htkc.org added the comment: I have just figured out that if you initialize env with os.environ.copy() and then add/modify its components, then the bug disappears: env = os.environ.copy() env['FOO'] = 'BAR' […] But I have no idea (for the moment) of which variable is

[issue5729] Allows tabs for indenting JSON output

2009-04-09 Thread Walter Dörwald
New submission from Walter Dörwald wal...@livinglogic.de: This patchs makes it possible to use tabs for indenting the output of json.dumps(). With this patch the indent argument can now be either an integer specifying the number of spaces per indent level or a string specifying the indent string

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias jason.vas.d...@gmail.com: -- versions: +Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5725 ___ ___

[issue4799] handling inf/nan in '%f'

2009-04-09 Thread Christoph Zwerschke
Christoph Zwerschke c...@online.de added the comment: This is a related problem on Windows: '%g' % 1e400 - '1.#INF' '%.f' % 1e400 -- '1' -- nosy: +cito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4799

[issue2170] rewrite of minidom.Node.normalize

2009-04-09 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2170 ___ ___

[issue5728] Support telling TestResult objects a test run has finished

2009-04-09 Thread Doug Philips
Doug Philips d...@mac.com added the comment: Quite useful! Names are hard, but the ones proposed are pretty good. -- nosy: +dgou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5728 ___

[issue5730] setdefault speedup

2009-04-09 Thread Dan Schult
New submission from Dan Schult dsch...@colgate.edu: In the depths of dictobject.c one can see that dict_setdefault uses two identical calls to PyObject_Hash and ma_lookup. The first to see if the item is in the dict, the second (only if key is not present) to add the item to the dict. This

[issue5730] setdefault speedup

2009-04-09 Thread Dan Schult
Changes by Dan Schult dsch...@colgate.edu: -- keywords: +patch Added file: http://bugs.python.org/file13665/dict_setdefault.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5730 ___

[issue5730] setdefault speedup

2009-04-09 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger versions: -Python 2.6, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5730

[issue5322] Python 2.6 object.__new__ argument calling autodetection faulty

2009-04-09 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- assignee: - pitrou nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5322 ___ ___

[issue5731] bdist_wininst no longer works on non-Windows platforms

2009-04-09 Thread Paul Moore
New submission from Paul Moore p.f.mo...@gmail.com: In revision 62197, Mon Apr 7 01:53:39 2008 UTC, Mark Hammond added code to Lib/distutils/command/bdist_wininst.py which was intended to select an architecture-specific installer executable. In doing so, the code appears to have broken the

[issue5730] setdefault speedup

2009-04-09 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Inlining code saves work but breaks the effort to minimize the number of functions that have direct access to the underlying data structure. The performance of setdefault() is hard to improve in real apps because the cost of

[issue5108] Invalid UTF-8 (%s) length in PyUnicode_FromFormatV()

2009-04-09 Thread Walter Dörwald
Walter Dörwald wal...@livinglogic.de added the comment: The problem with your patch is that it calls PyUnicode_DecodeUTF8() twice. It would be better if step 1 in the code would include the %s format specifiers and step 3 would then call PyUnicode_DecodeUTF8() and put the result into the

[issue5731] bdist_wininst no longer works on non-Windows platforms

2009-04-09 Thread Mark Hammond
Mark Hammond mhamm...@users.sourceforge.net added the comment: +1 on the idea - it's not the first time I've forgotten that works on platforms other than Windows. It appears the patch you attached is reversed though (or its just way too early for me...) --

[issue5731] bdist_wininst no longer works on non-Windows platforms

2009-04-09 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Mark, I have just applied the patch in r71413 because it was obvious. If it's fine with you I'll backport it to 2.6 so it makes it to 2.6.2 final -- ___ Python tracker rep...@bugs.python.org

[issue2170] rewrite of minidom.Node.normalize

2009-04-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Committed in r71414. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2170 ___

[issue5730] setdefault speedup

2009-04-09 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Martin, any thoughts? The same as always: Dan, do you have any benchmarks that demonstrate the speedup? Looking at the usage of setdefault in the standard library, it seems that it's most of the time either an interned string, or an object

[issue5731] bdist_wininst no longer works on non-Windows platforms

2009-04-09 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: fixed in r71413 and r71415. Thanks for the patch ! -- status: open - closed versions: +Python 2.7, Python 3.0, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5731

[issue3440] Starting any program as a subprocess fails when subprocess.Popen has env argument

2009-04-09 Thread Lenard Lindstrom
Lenard Lindstrom le...@telus.net added the comment: The notepad example works with Pythons 2.4.4 and 2.5.4 on Windows 98. So something changed in Windows XP. The 0xc0150004 error code crops up when a side-by-side assembly fails to load. The DLL loader appears to use the SystemRoot environment

[issue5725] process SysV-Semaphore support

2009-04-09 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: In issue5672 Martin said: If somebody would provide a patch that adds prctl to the posix module, that would be fine with me - we have a long tradition of exposing all available system calls if somebody wants them. However, you are

[issue5723] Incomplete json tests

2009-04-09 Thread Bob Ippolito
Bob Ippolito b...@redivi.com added the comment: I don't think the decorator approach would work for the doctests, it looks like it could be an interesting approach though. I have a feeling that it's going to have to be done in some kind of ugly subclass though, I'll dig into unittest deeper

[issue4753] Faster opcode dispatch on gcc

2009-04-09 Thread Andrew I MacIntyre
Andrew I MacIntyre aimacint...@users.sourceforge.net added the comment: Antoine, in my testing the loss of the HAS_ARG() optimisation in my patch appears to have negligible cost on i386, but starts to look significant on amd64. On an Intel E8200 cpu running FreeBSD 7.1 amd64, with gcc 7.2.1 and

[issue5730] setdefault speedup

2009-04-09 Thread Dan Schult
Dan Schult dsch...@colgate.edu added the comment: Benchmarks: Upon trying cooked up examples, I do not notice any speedup beyond 5-10%. Seems like function calling time swamps everything for small examples with fast hashes. I don't have a handy dandy example with long hash times or long lookup