[issue2121] complex constructor doesn't accept string with nan and inf

2008-12-31 Thread Cournapeau David
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: I disagree the feature is not needed, for several reasons: - complex(repr(..)) roundtrip should work, whatever the value of complex is - it is supported for float, so why not for complex ? - I believe on the contrary it solves a

[issue2121] complex constructor doesn't accept string with nan and inf

2008-12-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: complex(repr(..)) roundtrip should work, Nice-to-have but not a requirement that the entire input domain be supported. it is supported for float, so why not for complex ? It made sense for floats because of prevalence of

[issue2121] complex constructor doesn't accept string with nan and inf

2008-12-31 Thread Cournapeau David
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: Nice-to-have but not a requirement that the entire input domain be supported. Ok. It made sense for floats because of prevalence of use cases and because we wanted to match IEEE-754R as much as possible. But why shouldn't

[issue2121] complex constructor doesn't accept string with nan and inf

2008-12-31 Thread Cournapeau David
Cournapeau David da...@ar.media.kyoto-u.ac.jp added the comment: Ok, I found out how to make tests, and I found some problems while using this on numpy. A third version of the patch, with unit tests: all tests in test_complex.py pass. Added file: http://bugs.python.org/file12504/nan_parse.patch

[issue2121] complex constructor doesn't accept string with nan and inf

2008-12-31 Thread Cournapeau David
Changes by Cournapeau David da...@ar.media.kyoto-u.ac.jp: Removed file: http://bugs.python.org/file12503/nan_parse.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2121 ___

[issue2121] complex constructor doesn't accept string with nan and inf

2008-12-31 Thread Cournapeau David
Changes by Cournapeau David da...@ar.media.kyoto-u.ac.jp: Removed file: http://bugs.python.org/file12502/nan_parse.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2121 ___

[issue4263] BufferedWriter non-blocking overage

2008-12-31 Thread Sever Băneșiu
Sever Băneșiu banesiu.se...@gmail.com added the comment: Thanks for the new implementation of MockNonBlockWriterIO class. It makes tests so much easier to read. There are some minor things in your patch that I would change. For example: # 1 byte will be written, the rest will be buffered

[issue4787] Curses Unicode Support

2008-12-31 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Python 2.5 also requires the addition of libcursesw but it was working for the Ubuntu release because they specifically added it. What do you mean by the addition of libcursesw? _curses.so of Python 2.5 is linked to

[issue4263] BufferedWriter non-blocking overage

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The comment is misleading because in fact no byte is written at raw level. That's because the data size is smaller than the buffer size and the buffer is empty (was emptied by the last write call). It depends on the implementation. A different

[issue4472] Is shared lib building broken on trunk for Mac OS X?

2008-12-31 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: The patch seemed to work for me. Should I worry that I don't see -fPIC or -fpic in the compile commands? Also, running make test before at least installing libpython2.7.dylib appears to be impossible: % otool -L python.exe python.exe:

[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib

2008-12-31 Thread Christopher Mahan
New submission from Christopher Mahan chris.ma...@gmail.com: The python program crashes (stops responding) both from the command line and in IDLE (ver 3.0), after listing all the files in the approprate directory, both with ftp.dir() and with ftp.retrlines('LIST') (see prog listing below). I

[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2008-12-31 Thread Christopher Mahan
Changes by Christopher Mahan chris.ma...@gmail.com: -- title: retrlines('LIST') and dir hang at end of listing in ftplib - retrlines('LIST') and dir hang at end of listing in ftplib (python3.0) ___ Python tracker rep...@bugs.python.org

[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2008-12-31 Thread Christopher Mahan
Christopher Mahan chris.ma...@gmail.com added the comment: Update: Ran the same code with python 2.6.1 on the same computer, and that worked fine. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4791

[issue4539] askdirectory() in tkinter.filedialog is broken

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: I was about to mark this as invalid when I found out I had patched tkinter/filedialog.py myself. Nevertheless, this is a duplicate of issue4406 -- nosy: +gpolo resolution: - duplicate status: open - closed

[issue4263] BufferedWriter non-blocking overage

2008-12-31 Thread Sever Băneșiu
Sever Băneșiu banesiu.se...@gmail.com added the comment: The comment is misleading because in fact no byte is written at raw level. That's because the data size is smaller than the buffer size and the buffer is empty (was emptied by the last write call). It depends on the implementation. A

[issue4406] In Lib\tkinter\filedialog.py, class Directory define loss a_

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: I'm moving this to release blocker since it went unnoticed in the 3.0 release. -- priority: - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4406

[issue4263] BufferedWriter non-blocking overage

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I feel that no matter what implementation algorithm BufferedWriter uses it shouldn't write smaller chunks of data than buffer's size or else the buffer is useless. If you rewrite the above sentence using the word statistically, then I can

[issue4472] Is shared lib building broken on trunk for Mac OS X?

2008-12-31 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Skip: * GCC always generates position-independent code on OSX * I'll look in the test issue, that's probably caused by a broken definition for RUNSHARED. Roumen: * The SHLIB_EXT definition in pyconfig.h is an issue. And I have to

[issue4749] Issue with RotatingFileHandler logging handler on Windows

2008-12-31 Thread Benjamin Peterson
Changes by Benjamin Peterson benja...@python.org: -- assignee: - vsajip nosy: +vsajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4749 ___ ___

[issue4406] In Lib\tkinter\filedialog.py, class Directory define loss a_

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r68103. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4406

[issue4786] xml.etree.ElementTree module name in Python 3

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: So let's close this as won't fix. -- nosy: +benjamin.peterson resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4786

[issue4718] wsgiref package totally broken

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Philip, Graham, do you have any objections to the current patch? Otherwise I think I'm gonna commit it soon. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4718

[issue4792] PythonCmd in Modules/_tkinter.c should use the given interp parameter

2008-12-31 Thread Guilherme Polo
New submission from Guilherme Polo ggp...@gmail.com: Right now PythonCmd is using the Tcl interpreter stored in self-interp, but this is unsafe and since it is a Tcl_CmdProc it already receives the Tcl interpreter as a parameter. Using the interpreter in self-interp is unsafe because Python

[issue4747] SyntaxError executing a script containing non-ASCII characters in its name or path

2008-12-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This also happens if there is any kind of syntax error in the file: SyntaxError: None is printed without any other hint. The (char*) filename passed to PyRun_AnyFile should be utf-8 encoded; Otherwise the file cannot be re-opened.

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- nosy: +christian.heimes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___ ___

[issue4772] undesired switch fall-through in socketmodule.c

2008-12-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: See attached patch. -- keywords: +needs review, patch nosy: +amaury.forgeotdarc stage: - patch review versions: +Python 2.6, Python 3.0 Added file: http://bugs.python.org/file12507/bluetooth.patch

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Christian Heimes
Christian Heimes li...@cheimes.de added the comment: I'm having trouble understanding the technique of the jump table. Can you provide some links to papers that explain the threaded code? I'm interested in learning more. How does your implementation compare to the GForth based threaded code

[issue4747] SyntaxError executing a script containing non-ASCII characters in its name or path

2008-12-31 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I'm unable to reproduce the problem on Linux. I wrote a script /home/haypo/ééé/ééé.py: --- #!/home/haypo/prog/SVN/py3k/python # -*- coding: ascii -*- print(a) --- The script runs fine: $ ./ééé.py a $

[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2008-12-31 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Can you paste the expected result of ftp.retrlines('LIST')? Does a directory contains a non-ASCII character? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm having trouble understanding the technique of the jump table. Can you provide some links to papers that explain the threaded code? I'm interested in learning more. I haven't read any papers. Having a jump table in itself isn't special (the

[issue4747] SyntaxError executing a script containing non-ASCII characters in its name or path

2008-12-31 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Yes. As usual, the problem occurs when the platform encoding (used by wcstombs) is not utf-8. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4747

[issue3638] tkinter.mainloop() is meaningless and crash: remove it

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: tkinter.mainloop seems used in a bunch of places according to Google Code. Am I missing something? http://www.google.com/codesearch?hl=frlr=q=%22tkinter.mainloop%22sbtn=Rechercher -- nosy: +pitrou ___

[issue4732] Object allocation stress leads to segfault on RHEL

2008-12-31 Thread Andrew
Andrew fbsd...@gmail.com added the comment: This problem appears to be specific to RHEL 5, and is not a Python problem. Linking against Google malloc (libtcmalloc) fixes the issue. This bug should be closed. ___ Python tracker rep...@bugs.python.org

[issue4732] Object allocation stress leads to segfault on RHEL

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Ok, thanks for the investigation! -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4732 ___

[issue3638] tkinter.mainloop() is meaningless and crash: remove it

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: On Wed, Dec 31, 2008 at 2:24 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr added the comment: tkinter.mainloop seems used in a bunch of places according to Google Code. Am I missing something? Yes, those

[issue3638] tkinter.mainloop() is meaningless and crash: remove it

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: On Wed, Dec 31, 2008 at 2:27 PM, Guilherme Polo rep...@bugs.python.org wrote: Guilherme Polo ggp...@gmail.com added the comment: On Wed, Dec 31, 2008 at 2:24 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr

[issue3638] tkinter.mainloop() is meaningless and crash: remove it

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Well, well, sorry for the noise! ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3638 ___ ___

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Christian Heimes
Christian Heimes li...@cheimes.de added the comment: I haven't read any papers. Having a jump table in itself isn't special (the compiler does exactly that when compiling the switch() statement). What's special is that a dedicated indirect jump instruction at the end of each opcode helps the

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Is this a special GCC feature? Yes, it is. http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753

[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2008-12-31 Thread Christopher Mahan
Christopher Mahan chris.ma...@gmail.com added the comment: the output: just before the non-responsiveness: -rwxrwxrwx 1 nobody nogroup 3905538 Dec 29 09:51 Bronski Beat - Why.mp3 -rwxrwxrwx 1 nobody nogroup873966 Dec 28 13:53 test9.avi -rwxrwxrwx 1 nobody nogroup 2512653 Dec

[issue4508] distutils compiler not handling spaces in path to output/src files

2008-12-31 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: Hi. I am not familiar with weave. Could you provide a small sample of code that raises this issue. This way, I will be able to write the standalone test we can integrate in distutils together with your fix. -- assignee: - tarek nosy:

[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2008-12-31 Thread Christopher Mahan
Christopher Mahan chris.ma...@gmail.com added the comment: Added file screenshot of filezilla view of the folder in question. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4791 ___

[issue734176] Make Tkinter.py's nametowidget work with cloned menu widgets

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Eh.. old. Anyway, I have made a patch against trunk now and it should work with any nested level of cloned menus according to how tk names cloned menus. -- nosy: +gpolo versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1 -Python

[issue1702551] distutils sdist does not exclude SVN/CVS files on Windows

2008-12-31 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: I have put this ticket in my pile. I will write the test to demonstrate the problem and get back to your patch proposal. As Christian said, both separator should be taken care of under Windows, so the final regexp will be slighly different.

[issue4791] retrlines('LIST') and dir hang at end of listing in ftplib (python3.0)

2008-12-31 Thread Christopher Mahan
Christopher Mahan chris.ma...@gmail.com added the comment: The list does not seem to contain non-ascii characters. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4791 ___

[issue995925] method after() and afer_idle() are not thread save

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: This is not going to happen. You should be protecting it yourself since this is a special case. -- nosy: +gpolo resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: -- nosy: +skip.montanaro ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___ ___ Python-bugs-list

[issue2693] IDLE doesn't work with Tk 8.5

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Closing as only r59654 was backported to release25-maint, so Tk 8.5 is not fully supported by the standard Tkinter present in python 2.5.x -- resolution: - wont fix status: open - closed ___ Python

[issue2693] IDLE doesn't work with Tk 8.5 under python 2.5 and older

2008-12-31 Thread Guilherme Polo
Changes by Guilherme Polo ggp...@gmail.com: -- title: IDLE doesn't work with Tk 8.5 - IDLE doesn't work with Tk 8.5 under python 2.5 and older ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2693

[issue2995] Idle, some Linuxes, cannot position Cursor by mouseclick

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Can you retry making some small example that demonstrates the problem ? -- nosy: +gpolo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2995

[issue2638] tkSimpleDialog Window Flashing

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Dropped for inclusion in python 2.5, but should still be considered for trunk and py3k. -- resolution: - accepted versions: +Python 2.7, Python 3.0, Python 3.1 -Python 2.5 ___ Python tracker

[issue2734] 2to3 converts long(itude) argument to int

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I hope r68106 helps. 2to3 now refuses to change long if it is being assigned to, the name of a function or class, the name of an argument, or an attribute. -- resolution: - fixed status: open - closed

[issue3260] fix_imports does not handle intra-package renames

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I think I will close this as won't fix. As you say, the only applicable rename is test.test_support. That only is not enough IMO to add all the complexity to fix_imports that handling packages properly would require. -- nosy:

[issue4793] Glossary incorrectly describes a decorator as merely syntactic sugar

2008-12-31 Thread Lenard Lindstrom
New submission from Lenard Lindstrom le...@telus.net: http://www.python.org/doc/2.6/glossary.html The decorator entry in the Python 2.6 documentation incorrectly describes a decorator as merely syntactic sugar. It is not, as this example shows: def decorator(f): f.prev =

[issue4793] Glossary incorrectly describes a decorator as merely syntactic sugar

2008-12-31 Thread Guilherme Polo
Guilherme Polo ggp...@gmail.com added the comment: Your example doesn't disprove the merely syntactic sugar found in the documentation about the decorator syntax. The results you are getting are based on when the decorator is applied. -- nosy: +gpolo resolution: - invalid status: open

[issue2827] IDLE 3.0a5 cannot handle UTF-8

2008-12-31 Thread Pavel Kosina
Pavel Kosina g...@post.cz added the comment: the following very simple example might be the the same issue: x=ěščřžýáíé print (x) It reliably puts down IDLE entirely without any error message. It is saved in UTF-8. python +idle 3.0, wxp sp3 -- nosy: +geon

[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects

2008-12-31 Thread darrenr
New submission from darrenr python-roun...@dranalli.com: Python's garbage collector holds GIL during collection and doesn't provide any method of interruption or concurrency with other Python threads within a single Python VM. This can be a problem for realtime applications. The worst-case

[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects

2008-12-31 Thread darrenr
Changes by darrenr python-roun...@dranalli.com: -- components: +Interpreter Core type: - resource usage ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4794 ___

[issue4793] Glossary incorrectly describes a decorator as merely syntactic sugar

2008-12-31 Thread Lenard Lindstrom
Lenard Lindstrom le...@telus.net added the comment: It is distinct behavior. Without a decorator a new function is immediately assigned to the identifier. Any previous reference is lost. A decorator postpones assignment until the decorator returns. That allows the decorator to access the

[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects

2008-12-31 Thread David W. Lambert
Changes by David W. Lambert lamber...@corning.com: -- nosy: +LambertDW ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4794 ___ ___ Python-bugs-list

[issue4793] Glossary incorrectly describes a decorator as merely syntactic sugar

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: It is possible to desugar the exact behavior by creating the function ones self. Regardless, the usefulness this behavior is limited because it relys on the decorator being in the same module as the function. It is also fragile for nested

[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: The garbage collector will never be able to run in a second thread because it manipulates Python objects, which the GIL is supposed to protect! As for non-linear complexity, see #4688 and #4074 for some attempts to sooth this problem

[issue4747] SyntaxError executing a script containing non-ASCII characters in its name or path

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Looks good. -- keywords: -needs review nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4747 ___

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This new patch adds some detailed comments, at Jason Orendorff's request. Added file: http://bugs.python.org/file12511/threadedceval3.patch ___ Python tracker rep...@bugs.python.org

[issue4793] Glossary incorrectly describes a decorator as merely syntactic sugar

2008-12-31 Thread Lenard Lindstrom
Lenard Lindstrom le...@telus.net added the comment: The claim merely syntactic sugar implies that the inverse is also true, the decorator expression: @do_something def foo(): can be replaced it with: def foo(): foo = do_something(foo) This is guaranteed if do_something is

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Alexandre Vassalotti
Alexandre Vassalotti alexan...@peadrop.com added the comment: You may want to check out issue1408710 in which a similar patch was provided, but failed to deliver the desired results. I didn't get the advertised ~15% speed-up, but only 4% on my Intel Core2 laptop and 8% on my AMD Athlon64 X2

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti alexan...@peadrop.com: Added file: http://bugs.python.org/file12513/intel-core2-mobile-pybench.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___ ___

[issue4790] Optimization to heapq module

2008-12-31 Thread Nilton Volpato
Nilton Volpato nil...@google.com added the comment: Nice! Maybe we could add the decorate/undecorate step to guarantee stability to the C implementation. I'll do some experiments and timings on this. The heapq library has a lot of room for optimization, I think.

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Works pretty well for me on my MacBook Pro, but on my G5 it performed abysmally. In fact, it ran so much worse that I cleaned up my sandbox and did both checks all over again to make sure I didn't mess something up. It looks like my MacBook Pro

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Skip Montanaro
Changes by Skip Montanaro s...@pobox.com: ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Works pretty well for me on my MacBook Pro, but on my G5 it performed abysmally. In fact, it ran so much worse that I cleaned up my sandbox and did both checks all over again to make sure I didn't mess something up. It looks like my MacBook Pro

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Works pretty well for me on my MacBook Pro, but on my G5 it performed abysmally. In fact, it ran so much worse that I cleaned up my sandbox and did both checks all over again to make sure I didn't mess something up. It looks like my MacBook

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Antoine You're sure you didn't compile in debug mode or something? Just Antoine checking. There was a cut-n-paste error in that one which I noticed right after submitting (man, do I hate the crappy editing capability of textarea widgets). I

[issue4793] Glossary incorrectly describes a decorator as merely syntactic sugar

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: On Wed, Dec 31, 2008 at 3:17 PM, Lenard Lindstrom rep...@bugs.python.org wrote: However, the issue is one of definitions. Is the phrase merely syntactic sugar misleading? In this case it makes promises that may not be kept. It's not

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hello, You may want to check out issue1408710 in which a similar patch was provided, but failed to deliver the desired results. I didn't get the advertised ~15% speed-up, but only 4% on my Intel Core2 laptop and 8% on my AMD Athlon64 X2

[issue4795] inspect.isgeneratorfunction inconsistent with other inspect functions

2008-12-31 Thread Steven D'Aprano
New submission from Steven D'Aprano st...@pearwood.info: The inspect isSOMETHING() functions all return True or False, except for isgeneratorfunction(), which returns True or None. The body of the function is very brief: if (isfunction(object) or ismethod(object)) and \

[issue4794] garbage collector blocks and takes worst-case linear time wrt number of objects

2008-12-31 Thread darrenr
darrenr python-roun...@dranalli.com added the comment: A 'stop-the-world' garbage collector that periodically released the GIL could be run in a second thread, allowing the main thread to break in and do some processing. However the nature of a stop-the-world collector means that it probably

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Attached new patch for fixes suggested by Alexandre (rename opcode_targets.c to opcode_targets.h, replace USE_THREADED_CODE with USE_COMPUTED_GOTOS). Added file: http://bugs.python.org/file12514/threadedceval4.patch

[issue4796] Decimal to receive from_float method

2008-12-31 Thread Steven D'Aprano
New submission from Steven D'Aprano st...@pearwood.info: In the PEP for Decimal, it was discussed that the class should have a from_float() method for converting from floats, but to leave it out of the Python 2.4 version: http://www.python.org/dev/peps/pep-0327/#from-float Following

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file12511/threadedceval3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: Removed file: http://bugs.python.org/file12474/threadedceval2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4753 ___

[issue4796] Decimal to receive from_float method

2008-12-31 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4796 ___

[issue4751] Patch for better thread support in hashlib

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Based on quick testing on my computer, we could probably put the limit as low as 1KB. But it may be that locks are cheap under Linux. In any case, the patch looks good, but I'm no OpenSSL expert. ___ Python

[issue3959] Add Google's ipaddr.py to the stdlib

2008-12-31 Thread David Moss
David Moss drk...@gmail.com added the comment: I think this might be worth a look before any hard and fast decisions are made :- http://code.google.com/p/netaddr/ -- nosy: +drkjam ___ Python tracker rep...@bugs.python.org

[issue3023] Problem with invalidly-encoded command-line arguments (Unix)

2008-12-31 Thread Gabriel Genellina
Changes by Gabriel Genellina gagsl-...@yahoo.com.ar: -- nosy: +gagenellina ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3023 ___ ___

[issue4795] inspect.isgeneratorfunction inconsistent with other inspect functions

2008-12-31 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Fixed in r68112. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4795

[issue4751] Patch for better thread support in hashlib

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Actually, your code can deadlock since ENTER_HASHLIB doesn't release the GIL. Think about it: // Thread A is here, holding the GIL and waiting for self-lock to be // released by thread B ENTER_HASHLIB(self) Py_BEGIN_ALLOW_THREADS // Thread B is

[issue4796] Decimal to receive from_float method

2008-12-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: The decimal constructor should be lossless. The underlying spec was designed with the notion that all numbers in decimal are exact; operations can be lossy but the numbers themselves are exact. Accordingly, I recommend

[issue4796] Decimal to receive from_float method

2008-12-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FYI, there is already a lossless implementation in the docs: def float_to_decimal(f): Convert a floating point number to a Decimal with no loss of information n, d = f.as_integer_ratio() with localcontext() as

[issue4781] The function, Threading.Timer.run(), may be Inappropriate

2008-12-31 Thread Gabriel Genellina
Gabriel Genellina gagsl-...@yahoo.com.ar added the comment: Note that doing this would change the class semantics. Timer [...] represents an action that should be run only after a certain amount of time has passed — a timer. and the example clearly shows that the action is run *once*. Timer

[issue3959] Add Google's ipaddr.py to the stdlib

2008-12-31 Thread pmoody
pmoody pyt...@hda3.com added the comment: I'm biased ;) but I don't see what netaddr provides over ipaddr. it also seems to be in the neighborhood of 50% slower (at least on my mac mini). pmo...@mini - 04:52 PM - ~/Downloads/ipaddr-1.0.1 - python -m timeit 'import ipaddr;\ ipaddr.IP(1.1.1.1)'

[issue4795] inspect.isgeneratorfunction inconsistent with other inspect functions

2008-12-31 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: This can be simplified to just: return (isfunction(object) or ismethod(object)) and \ object.func_code.co_flags CO_GENERATOR No need for patterns like: if cond: return True return False --

[issue3959] Add Google's ipaddr.py to the stdlib

2008-12-31 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: Performance shouldn't be a major concern here. Utility is more important and the implementation can be optimized later. My initial impression of netaddr is pretty good. One thing it has going for it is documentation. The netaddr

[issue1664] nntplib is not IPv6-capable

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I was going to suggest writing a test but I see that nntplib hasn't got a single unit test :-O -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1664

[issue3959] Add Google's ipaddr.py to the stdlib

2008-12-31 Thread pmoody
pmoody pyt...@hda3.com added the comment: hm, all addresses have a subnet, even if its an implied /32, so specifying a network as (1.1.1.0, 1.1.1.255) seems a lot more off-putting than 1.1.1.0/24. You're also much more likely to see the latter in network devices. I guess I don't see the utility

[issue4572] add SEEK_* values to io and/or io.IOBase

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Sounds like a nice improvement. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4572 ___

[issue4272] set timestamp in gzip stream

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: test_literal_output looks really too strict to me. At most, you could check that the header and trailer are unchanged, but it would probably make it equivalent to test_metadata. Other than that, I think it's an useful addition. -- nosy:

[issue3959] Add Google's ipaddr.py to the stdlib

2008-12-31 Thread Jean-Paul Calderone
Jean-Paul Calderone exar...@divmod.com added the comment: hm, all addresses have a subnet, even if its an implied /32, so specifying a network as (1.1.1.0, 1.1.1.255) seems a lot more off-putting than 1.1.1.0/24. You're also much more likely to see the latter in network devices. I'm not sure

[issue4035] Support bytes for os.exec*()

2008-12-31 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Hmm, I think the supported types should be the same for all platforms, otherwise it creates unnecessary headaches. Perhaps, in addition to the proposed behaviour on Posix (convert everything to bytes if the program name is a bytes object), the

  1   2   >