[issue5733] py3_test_grammar.py syntax error

2009-04-09 Thread Kurt B. Kaiser
New submission from Kurt B. Kaiser : Try running it as a script: File "Lib/lib2to3/tests/data/py3_test_grammar.py", line 130 x = ... ^ SyntaxError: invalid syntax Furthermore, testEllipsis seems invalid. What is intended? >>> class C: def __getitem__(self, x): return x

[issue5730] setdefault speedup

2009-04-09 Thread Dan Schult
Dan Schult 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 times. That's what

[issue4753] Faster opcode dispatch on gcc

2009-04-09 Thread Andrew I MacIntyre
Andrew I MacIntyre 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 the 3.1a2 sources, the computed

[issue5723] Incomplete json tests

2009-04-09 Thread Bob Ippolito
Bob Ippolito 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 this weekend to s

[issue5725] process SysV-Semaphore support

2009-04-09 Thread R. David Murray
R. David Murray 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 talking about a System

[issue5732] add a new command called "check" into Distutils

2009-04-09 Thread Tarek Ziadé
New submission from Tarek Ziadé : Right now, both register and sdist commands are implementing a check_metadata function to check that the metadata are complete enough. check will refactor this and also add a test to validate that the long_description is/is not reST compliant (if asked *and* if

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

2009-04-09 Thread Lenard Lindstrom
Lenard Lindstrom 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 variable to find d

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

2009-04-09 Thread Tarek Ziadé
Tarek Ziadé 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 ___

[issue5730] setdefault speedup

2009-04-09 Thread Martin v. Löwis
Martin v. Löwis 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 hashed by memory

[issue2170] rewrite of minidom.Node.normalize

2009-04-09 Thread R. David Murray
R. David Murray added the comment: Committed in r71414. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___

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

2009-04-09 Thread Tarek Ziadé
Tarek Ziadé 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 __

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

2009-04-09 Thread Mark Hammond
Mark Hammond 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...) -- ___ Python tracker

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

2009-04-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm sorry, I don't have any opinion on this. -- assignee: pitrou -> ___ Python tracker ___ ___ Pyth

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

2009-04-09 Thread Walter Dörwald
Walter Dörwald 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 callresults buffer. BTW, I c

[issue5730] setdefault speedup

2009-04-09 Thread Raymond Hettinger
Raymond Hettinger 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 instantiating the default object

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

2009-04-09 Thread Paul Moore
New submission from Paul Moore : 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 ability to build install

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

2009-04-09 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> pitrou nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5730] setdefault speedup

2009-04-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger versions: -Python 2.6, Python 3.0 ___ Python tracker ___

[issue5730] setdefault speedup

2009-04-09 Thread Dan Schult
Changes by Dan Schult : -- keywords: +patch Added file: http://bugs.python.org/file13665/dict_setdefault.patch ___ Python tracker ___ _

[issue5730] setdefault speedup

2009-04-09 Thread Dan Schult
New submission from Dan Schult : 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 second lookup (and h

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

2009-04-09 Thread Doug Philips
Doug Philips added the comment: Quite useful! Names are hard, but the ones proposed are pretty good. -- nosy: +dgou ___ Python tracker ___ ___

[issue2170] rewrite of minidom.Node.normalize

2009-04-09 Thread R. David Murray
Changes by R. David Murray : -- versions: -Python 2.6, Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

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

2009-04-09 Thread Christoph Zwerschke
Christoph Zwerschke added the comment: This is a related problem on Windows: '%g' % 1e400 -> '1.#INF' '%.f' % 1e400 --> '1' -- nosy: +cito ___ Python tracker ___ __

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias : -- versions: +Python 3.0, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue5729] Allows tabs for indenting JSON output

2009-04-09 Thread Walter Dörwald
New submission from Walter Dörwald : 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 directly:: json.d

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

2009-04-09 Thread Paul Morelle
Paul Morelle 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 mandatory or not.

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

2009-04-09 Thread R. David Murray
R. David Murray 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 environment requirements

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

2009-04-09 Thread Paul Morelle
Paul Morelle 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 (Intel)] on win32

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias 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 category | The 'perlf

[issue5673] Add timeout option to subprocess.Popen

2009-04-09 Thread R. David Murray
R. David Murray 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: +r.david.murray stage: -> test

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

2009-04-09 Thread Michael Foord
Michael Foord added the comment: startTestRun and stopTestRun sound good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing

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

2009-04-09 Thread djc
djc added the comment: I'll take a stab at doing it Raymond's way this weekend. -- ___ Python tracker ___ ___ Python-bugs-list mailing

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

2009-04-09 Thread djc
Changes by djc : -- nosy: +djc ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/op

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

2009-04-09 Thread Robert Collins
Robert Collins 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, I said you can infer start

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

2009-04-09 Thread Robert Collins
New submission from Robert Collins : 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 ugliness like __del__. Som

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias : -- components: +Interpreter Core ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias : Removed file: http://bugs.python.org/file13657/psem_example.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
Changes by jvdias : Removed file: http://bugs.python.org/file13655/psempy.c ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias added the comment: C source code implementing "psem.*" python module functions -- Added file: http://bugs.python.org/file13662/psempy.c ___ Python tracker ___

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias 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 are more optimized

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias 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 = 12 /* get semval */ sy

[issue5727] doctest pdb readline broken

2009-04-09 Thread Wolfgang Schnerring
New submission from Wolfgang Schnerring : 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; pdb.set_trace() $ ca

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

2009-04-09 Thread Floris Bruynooghe
New submission from Floris Bruynooghe : 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: Build files: ld_so_aix.diff key

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

2009-04-09 Thread Julian Scheid
Julian Scheid 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 fullinstall' is discou

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

2009-04-09 Thread Julian Scheid
Julian Scheid 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. -- ___

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

2009-04-09 Thread Ronald Oussoren
Ronald Oussoren 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 "python" would always refe

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

2009-04-09 Thread Julian Scheid
Julian Scheid 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 --enable-framework=/tmp/python-3.0.1-ins

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

2009-04-09 Thread Ronald Oussoren
Ronald Oussoren 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 3.x? AFAIK that would b

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

2009-04-09 Thread Julian Scheid
Julian Scheid 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? -- ___ Python tracker

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

2009-04-09 Thread Ronald Oussoren
Ronald Oussoren 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 ___

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

2009-04-09 Thread Larry Hastings
Larry Hastings 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

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

2009-04-09 Thread Larry Hastings
Larry Hastings 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 because of FUSE or b

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

2009-04-09 Thread Julian Scheid
Julian Scheid 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 -j3 && make framewo

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

2009-04-09 Thread Julian Scheid
Julian Scheid added the comment: Actually this seems to be fixed in 3.0.1 - yay! -- versions: -Python 3.0 ___ Python tracker ___ ___

[issue5725] process SysV-Semaphore support

2009-04-09 Thread jvdias
jvdias added the comment: $ time /usr/bin/python2.6 ./psem_example.py 2>&1 | 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 file 5 1+0 records in 1+0

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

2009-04-09 Thread Julian Scheid
Julian Scheid 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 versions: +Python 2