[issue874900] threading module can deadlock after fork

2008-07-13 Thread Gregory P. Smith
Gregory P. Smith [EMAIL PROTECTED] added the comment: I still don't like the _after_fork() implementation. Its O(n) where n == number of threads the parent process had. Very wasteful when the fork() was done in the most common case of being followed by an exec and calling os._exit(). It won't

[issue3008] Let bin/oct/hex show floats

2008-07-13 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: So far this looks good. Will complete the review on the next leg of my flight (about 12 hrs). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3008

[issue3106] speedup some comparisons

2008-07-13 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Raymond, would you want to take a look? -- nosy: +rhettinger ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3106 ___

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-13 Thread Nick Coghlan
Nick Coghlan [EMAIL PROTECTED] added the comment: Fixed in r64915. The end result is that the import system now only emits a RuntimeWarning instead of raising SystemError if it can't find the parent module when attempting to perform an absolute import (regardless of whether the parent module

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

2008-07-13 Thread kai zhu
kai zhu [EMAIL PROTECTED] added the comment: import/reload now works. accomplished by adding 5 lines in parse_source_module (import.c) to 1st check for the hook __builtins__.parse_source_module_py3k. the hook will automatically compile in py3k format if it finds the magic comment: # import as

[issue616013] cPickle documentation incomplete

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Is this still desired? If so, I have fairly long list of differences that I could document. Or maybe, I could backport the _pickle module to Python 2.6, which doesn't have as many differences. -- nosy: +alexandre.vassalotti

[issue616013] cPickle documentation incomplete

2008-07-13 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: +1 to backporting _pickle as cPickle. Do bring it up on python-dev. -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue616013

[issue3350] multiprocessing adds built-in types to the global copyreg.dispatch_table

2008-07-13 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti [EMAIL PROTECTED]: The multiprocessing module modifies the global copyreg.dispatch_table to extend pickling to several built-in types (mostly callable types). In my humble opinion, this is unacceptable for a standard library module. Here is an example of

[issue3350] multiprocessing adds built-in types to the global copyreg.dispatch_table

2008-07-13 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- assignee: - jnoller nosy: +jnoller ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3350 ___ ___

[issue2303] isinstance is 4x as slow as in 2.5 because the common case raises

2008-07-13 Thread Gregory P. Smith
Gregory P. Smith [EMAIL PROTECTED] added the comment: % ./python.exe -mtimeit 'isinstance(3, int)' 100 loops, best of 3: 0.269 usec per loop % ../release25-maint/python.exe -mtimeit 'isinstance(3, int)'100 loops, best of 3: 0.335 usec per loop So I'd say its no longer 4x slower these

[issue2534] Restore isinstance and issubclass speed in 2.6

2008-07-13 Thread Gregory P. Smith
Gregory P. Smith [EMAIL PROTECTED] added the comment: speedup of this patch confirmed. Also, it triggers the bugs mentioned that have their own issues open. Once #2542 is fixed this should be looked at again. Its a big performance regression in 2.6 over 2.5 if we don't get this in, marking it

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

2008-07-13 Thread kai zhu
kai zhu [EMAIL PROTECTED] added the comment: why not? it allows developers to migrate 2.x scripts one-by-one to working 3.0 conformant ones while maintaining backwards-compatibility w/ existing 2.x scripts extension modules (eg. numpy, PIL, zope, ...) py3to2 can transparently import mix

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

2008-07-13 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: On Sun, Jul 13, 2008 at 2:03 PM, kai zhu [EMAIL PROTECTED] wrote: kai zhu [EMAIL PROTECTED] added the comment: why not? it allows developers to migrate 2.x scripts one-by-one to working 3.0 conformant ones while maintaining

[issue3119] pickle.py is limited by python's call stack

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: On some benchmark of my own, I get a good 2x slowdown when this patch is applied. The benchmark consists of loading ~1.4 millions objects (mostly dict, list, str and int) from a pickle string. It is basically a torture test for the inner

[issue3274] Py_CLEAR(tmp) seg faults

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Committed the fix r64927. Thanks. -- nosy: +alexandre.vassalotti resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3274

[issue3112] implement PEP 3134 exception reporting

2008-07-13 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: Here is a new patch incorporating Amaury's better indentation fix for tracebacks. It should be ready for consumption (all the tests pass). And for the code review junkies: http://codereview.appspot.com/2448 Added file:

[issue3326] py3k shouldn't use -fno-strict-aliasing anymore

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: With gcc 4.2.3, I see a whole bunch of warnings: Objects/exceptions.c: In function ‘UnicodeDecodeError_init’: Objects/exceptions.c:1472: warning: dereferencing type-punned pointer will break strict-aliasing rules Objects/frameobject.c:

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

2008-07-13 Thread kai zhu
kai zhu [EMAIL PROTECTED] added the comment: then the 2 can complement each other well ;) i don't c any competition between them as they have completely different objectives 2to3 - convert 2x scripts to 3k py3to2 - use the newly created 3k scripts in existing 2x environ u have to admit

[issue3326] py3k shouldn't use -fno-strict-aliasing anymore

2008-07-13 Thread Ismail Donmez
Ismail Donmez [EMAIL PROTECTED] added the comment: Wow thats no good, I will test with -fstrict-aliasing to be sure, if there are such problems still we should start with fixing those towards 3.1 . ___ Python tracker [EMAIL PROTECTED]

[issue3221] SystemError: Parent module 'foo' not loaded on import statement

2008-07-13 Thread Ralf Schmitt
Ralf Schmitt [EMAIL PROTECTED] added the comment: Thanks Nick for fixing this in a timely manner. BTW I've seen this when trying to run doctests with py.test. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3221

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

2008-07-13 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: don't u think that possibly merits its mention in the 2to3 category? Please trust our judgment on how to use the bug tracker. This isn't a competition for publicity; it's a tool to help organizing work among committers and other

[issue3153] sqlite leaks on error

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Fixed in r64930 (trunk) and r64931 (py3k). Thanks. -- nosy: +alexandre.vassalotti resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED]

[issue3208] function annotation for builtin and C function

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti [EMAIL PROTECTED] added the comment: Extension modules can use PyFunction_GetAnnotations() to access and modify the annotations dictionary. In addition, PyFunction_SetAnnotations() can be used to add annotations. I added some documentation for these functions in r64934.

[issue2885] Create the urllib package

2008-07-13 Thread Brett Cannon
Changes by Brett Cannon [EMAIL PROTECTED]: -- dependencies: +Proposal for fix_urllib ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2885 ___ ___

[issue2874] Remove use of the stat module in the stdlib

2008-07-13 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: Another option is to eliminate the use of PyStructSequence and handle the creation of a named tuple and a class with the methods in os.py. Then stat() can just return a tuple and the Python code can create the instances from that.

[issue2874] Remove use of the stat module in the stdlib

2008-07-13 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: On Sun, Jul 13, 2008 at 4:04 PM, Brett Cannon [EMAIL PROTECTED] wrote: Brett Cannon [EMAIL PROTECTED] added the comment: Another option is to eliminate the use of PyStructSequence and handle the creation of a named tuple and a class with the

[issue3218] 2to3 Fix_imports optimization

2008-07-13 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- priority: - high ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3218 ___ ___ Python-bugs-list

[issue3182] 2to3 Slight Patch

2008-07-13 Thread Collin Winter
Collin Winter [EMAIL PROTECTED] added the comment: So, revisiting this... On the face of it, I'm not convinced that the isinstance(x, Leaf) - type(x) is Leaf changes are correct: certain fixers have in the past utilized their own subclasses of Node, and I can foresee this being done again in

[issue3182] 2to3 Slight Patch

2008-07-13 Thread Nick Edds
Nick Edds [EMAIL PROTECTED] added the comment: Fair enough. I guess that even though there's a little bit of a performance improvement from this, it does hurt extensibility, so its probably not a worthwhile change after all. ___ Python tracker [EMAIL

[issue2874] Remove use of the stat module in the stdlib

2008-07-13 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: I just finished taking Georg's idea and fleshing it out. Problem is that when I went to change the docs for 'stat', I noticed how many other function in the os module rely on the stat module for its constants. Should we move the constants over to

[issue3218] 2to3 Fix_imports optimization

2008-07-13 Thread Collin Winter
Collin Winter [EMAIL PROTECTED] added the comment: fix_imports.diff fails to apply cleanly against HEAD of fix_imports.py. Also, fix_imports2 now inherits from fix_imports, so it needs to be fixed as well. + yield power module_name=%r + trailer'.' import_as_names any

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Valgrind output for Python trunk compiled with pydebug option: ==29848== Invalid read of size 4 ==29848==at 0x809AF61: _Py_ForgetReference (object.c:2044) ==29848==by 0x809AFCF: _Py_Dealloc (object.c:2065) ==29848==by 0x80FE635:

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: F*ck, Firefox just crashed! I have to rewrite my long comment... First, to explain why the problem only occurs in pydebug mode: a PyObject has only _ob_next and _ob_prev attributes if Py_TRACE_REFS is set (eg. by pydebug). PyObject_NEW() and

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file10828/re_finditer.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3299 ___

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10892/_curses_panel.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3299 ___

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Other examples of invalid use of PyObject_Del(). Don't apply the patch, i didn't check it. Eg. element_dealloc() should crash if self-tag is NULL... and at line 331, self-tag is NULL whereas I called element_dealloc() using Py_DECREF()!

[issue3299] invalid object destruction in re.finditer()

2008-07-13 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: About _curses_panel.patch: same as pyobject_del.patch, i didn't tested the code, and is looks like PyCursesPanel_Dealloc() expects that the object is properly initialized. It looks like this bug (invalid use of PyObject_Del/PyObject_DEL) is

[issue3351] Python crashed

2008-07-13 Thread yiyuan
New submission from yiyuan [EMAIL PROTECTED]: Hi, I'm new here and I'm not sure whether this should be reported here. OS: CentOS 2.6.9-67.0.15.EL Memory: 512M Python Version: 2.5.1 The crash happened after our web program writen with python running for many days (maybe 20 days). Here are the

[issue3351] Python crashed

2008-07-13 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: This is a Linux kernel crash, and has nothing to do with Python. No matter what errors Python or your script may have - the operating system kernel should not crash. Please report this in a Linux forum, or try to upgrade to a newer kernel.

[issue3026] mmap broken with large files on 64bit system

2008-07-13 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: So would anybody like to contribute a patch? -- nosy: +loewis ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3026 ___

[issue3346] test_ossaudiodev fails

2008-07-13 Thread Ismail Donmez
Ismail Donmez [EMAIL PROTECTED] added the comment: Works with today's SVN, please close as invalid. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3346 ___ ___

[issue3346] test_ossaudiodev fails

2008-07-13 Thread Ismail Donmez
Ismail Donmez [EMAIL PROTECTED] added the comment: Scratch that, it still fails in the second phase of make testall with the same error. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3346 ___