[issue7767] Add PyLong_AsLongLongAndOverflow

2010-01-30 Thread Mark Dickinson
Mark Dickinson added the comment: Ok, great. I'll add the PyInt_Check back in and commit the patch, then. I just wanted to check that I wasn't missing something obvious. Thank you! -- ___ Python tracker ___

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16046/issue7092_test_exceptions.diff ___ Python tracker ___ ___ Python-bu

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-30 Thread Florent Xicluna
Florent Xicluna added the comment: Cleanup test_exceptions: - removed "filterwarnings" for "testSlicing" -- Added file: http://bugs.python.org/file16053/issue7092_test_exceptions_v2.diff ___ Python tracker ___

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16049/issue7092_silence_imports.diff ___ Python tracker ___ ___ Python-bu

[issue7767] Add PyLong_AsLongLongAndOverflow

2010-01-30 Thread Mark Dickinson
Mark Dickinson added the comment: Applied in r77842 (trunk), r77843 (py3k). -- resolution: -> accepted status: open -> closed ___ Python tracker ___

[issue7567] Messed up terminal after calling curses.initscr() twice.

2010-01-30 Thread Sami Zerrade
Sami Zerrade added the comment: This is being caused by the following 2 new lines in the initscr() function of Lib/curses/__init__.py: setupterm(term=_os.environ.get("TERM", "unknown"), fd=_sys.__stdout__.fileno()) Commenting them out will cause the behavior from version 2.5.

[issue7567] Messed up terminal after calling curses.initscr() twice.

2010-01-30 Thread Sami Zerrade
Sami Zerrade added the comment: I'm attaching a file that patches Modules/_cursesmodule.c to make sure that initscr hasn't been called before invoking setupterm(). This fixes the bug for me; your mileage may vary. -- keywords: +patch Added file: http://bugs.python.org/file16054/setup

[issue7567] Messed up terminal after calling curses.initscr() twice.

2010-01-30 Thread Sami Zerrade
Changes by Sami Zerrade : Removed file: http://bugs.python.org/file16054/setupterm.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue7567] Messed up terminal after calling curses.initscr() twice.

2010-01-30 Thread Sami Zerrade
Changes by Sami Zerrade : Added file: http://bugs.python.org/file16055/setupterm.patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7810] fix_callable breakage

2010-01-30 Thread Martin v . Löwis
New submission from Martin v. Löwis : For the attached script, 2to3 reports File "/tmp/lib/python3.1/lib2to3/pytree.py", line 135, in replace assert self.parent is not None, str(self) AssertionError: def a(self): pass This was originally discovered for twisted/trial/test/test_pyuni

[issue7544] Fatal error on thread creation in low memory condition

2010-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: I didn't test the patch but some comments: - PyThreadState_Prealloc and PyThreadState_Init should probably be prefixed with an underscore, because there's no use for them outside of the interpreter - _PyThreadState_New should be static. Besides, static function

[issue7544] Fatal error on thread creation in low memory condition

2010-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, and besides, you can use the -R option to regrtest to find out if there are any reference leaks (e.g. "-R 3:2:"). -- ___ Python tracker ___

[issue7811] [decimal] ValueError -> TypeError in from_tuple

2010-01-30 Thread Stefan Krah
New submission from Stefan Krah : As discussed privately, the following test cases should raise TypeError (currently ValueError): self.assertRaises(TypeError, Decimal, (0., (4, 3, 4, 9, 1), 2) ) self.assertRaises(TypeError, Decimal, (Decimal(1), (4, 3, 4, 9, 1), 2)) self.assertRaises(TypeError,

[issue7812] Call to gestalt('sysu') on

2010-01-30 Thread Peter Hansen
Changes by Peter Hansen : -- nosy: phansen severity: normal status: open title: Call to gestalt('sysu') on type: crash versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker

[issue7812] Call to gestalt('sysu') on OSX can lead to freeze in wxPython apps

2010-01-30 Thread Peter Hansen
New submission from Peter Hansen : In platform.mac_ver() there is a call to look up Mac version info, which results in a call to gestalt.gestalt('sysu'). This call is useless since, as documented in comments in the function the "sysu" option no longer exists, but the call was left in "as docu

[issue7813] Bug of command-line module launcher

2010-01-30 Thread Pascal Chambon
New submission from Pascal Chambon : I have a weird behaviour of the interpreter on my python2.6 win32 install : if I launch as __main__ the file joined below, like "python test_rsFileLocking.py", all works fine. But if I put it in my PYTHONPATH (or current working directory), and launch it vi

[issue7812] Call to gestalt('sysu') on OSX can lead to freeze in wxPython apps

2010-01-30 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- versions: -Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue7814] SimpleXMLRPCServer Example uses "mul" instead of "div" in client portion

2010-01-30 Thread Michael Newman
New submission from Michael Newman : In "20.24.1.1. SimpleXMLRPCServer Example": http://docs.python.org/3.1/library/xmlrpc.server.html The client portion of the example uses "mul", which does not exist in the server portion. The easiest fix to change the client to use "div" instead of "mul".

[issue7567] Messed up terminal after calling curses.initscr() twice.

2010-01-30 Thread Brian Curtin
Changes by Brian Curtin : -- keywords: +needs review priority: -> normal stage: -> test needed type: -> behavior ___ Python tracker ___

[issue7810] fix_callable breakage

2010-01-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: This should be fixed as of r77855 and r77856. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue7813] Bug in command-line module launcher

2010-01-30 Thread R. David Murray
R. David Murray added the comment: This fails on 2.6 maint but works on trunk. There have been several improvements to the way that that compile works in trunk, and one of those fixed the problem that you are seeing. The source of the problem is the final line in the source file containing

[issue7814] SimpleXMLRPCServer Example uses "mul" instead of "div" in client portion

2010-01-30 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r77857. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Py

[issue7802] socket.gaierror before ProtocolError for xmlrpc.client

2010-01-30 Thread Georg Brandl
Georg Brandl added the comment: Thanks, that example was indeed wrong. ProtocolError is not meant to be raised if the HTTP connection to the specified URI can't even be made, e.g. for unknown hosts. Fixed in r77858. -- resolution: -> fixed status: open -> closed __

[issue7798] document pydoc methods

2010-01-30 Thread Georg Brandl
Georg Brandl added the comment: Very likely, these functions are not meant to be anything but utilities. As API functions, they also don't belong into pydoc. -- assignee: georg.brandl -> ___ Python tracker _

[issue7815] Regression in unittest traceback formating extensibility

2010-01-30 Thread Martin
New submission from Martin : Prior to being split up into a package, unittest had an extensible method of trimming uninteresting, testing-framework related parts from tracebacks. As an unintended side effect, this is no longer the case, only modules actually named "unittest" are excluded. Code

[issue7733] asyncore docs reference is unclear

2010-01-30 Thread Georg Brandl
Georg Brandl added the comment: Would you like to contribute a patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue7815] Regression in unittest traceback formating extensibility

2010-01-30 Thread Brian Curtin
Changes by Brian Curtin : -- nosy: +brian.curtin, michael.foord priority: -> normal stage: -> needs patch ___ Python tracker ___ ___

[issue7813] Bug in command-line module launcher

2010-01-30 Thread Pascal Chambon
Pascal Chambon added the comment: Allright, I guess in these conditions this bugs doesn't require a patch B-) Thanks for the details. -- ___ Python tracker ___ __

[issue7812] Call to gestalt('sysu') on OSX can lead to freeze in wxPython apps

2010-01-30 Thread Robin Dunn
Changes by Robin Dunn : -- nosy: +robind ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue5484] subprocess.call() fails for .bat files on Windows, if executable path contains parenthesis

2010-01-30 Thread Brian Curtin
Brian Curtin added the comment: I'm not seeing the same thing Tim sees on 2.6, or 3.1 for that matter. Looks like this is still an issue. -- nosy: +brian.curtin priority: -> normal stage: -> test needed versions: +Python 2.6, Python 3.1 -Python 2.5 __

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-01-30 Thread pmpp
pmpp added the comment: related: f=open('test','w+b') f.write('123456789ABCDEF') #f.seek(0) print "position",f.tell() print '[',len(f.read()),']' f.close() windows: 2.6.2 mingw/ 2.6.4 msvc builds len(f.read()) > 0 ( 4081 when i did the test ) bu

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2010-01-30 Thread Florent Xicluna
Florent Xicluna added the comment: Proposed test and fix. Please comment, there's probably room for improvement. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file16058/issue7385_memoryview.diff ___ Python

[issue7816] test_capi crashes when run with "-R"

2010-01-30 Thread Florent Xicluna
New submission from Florent Xicluna : test test_capi crashed -- : PyDateTime_CAPI somehow initialized 1 test failed: It was introduced in r76824. It may be fixed with something like r72357. -- components: Tests messages: 98579 nosy: benjamin.peterson, flox priority: normal severity: n

[issue7816] test_capi crashes when run with "-R"

2010-01-30 Thread Florent Xicluna
Florent Xicluna added the comment: Patch. -- keywords: +patch Added file: http://bugs.python.org/file16059/issue7816_test_capi.diff ___ Python tracker ___ ___

[issue7816] test_capi crashes when run with "-R"

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue7816] test_capi crashes when run with "-R"

2010-01-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: Should be fixed in r77867. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-01-30 Thread Robert Xiao
Robert Xiao added the comment: It seems like this is actually a problem in Windows libc or something (tested using MinGW on Windows XP): #include main() { FILE *f = fopen("test", "wb"); fwrite("test", 1, 4, f); char buf[2048]; size_t k = fread(buf, 1, 2048, f); printf("%d

[issue7816] test_capi crashes when run with "-R"

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16059/issue7816_test_capi.diff ___ Python tracker ___ ___ Python-bugs-lis

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16058/issue7385_memoryview.diff ___ Python tracker ___ ___ Python-bugs-li

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2010-01-30 Thread Florent Xicluna
Florent Xicluna added the comment: Removed /* XXX */ code -- Added file: http://bugs.python.org/file16060/issue7385_memoryview.diff ___ Python tracker ___ ___

[issue6899] Base.replace breaks tree

2010-01-30 Thread Meador Inge
Meador Inge added the comment: I updated the patch with a few unit tests: euclid:trunk minge$ ./python.exe Lib/test/test_lib2to3.py ... == FAIL: test_replace (lib2to3.tests.test_pytree.TestNodes) -

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: I'm unable to reproduce the crash. Can someone write a shorter code reproducing the issue? I downloaded Cython tip and applied the patch attached to this issue. I tried py3k, py3k compiled in pydebug mode, python 3.1 branch: none crashed. Should I clear gener

[issue3194] Demo/loop.c passing "char *" instead of "wchar_t *"

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: loop demo is still broken in py3k: * try to link to libpython3.0 (wrong python version) * there is still the argv[0] type issue -- nosy: +haypo ___ Python tracker ___

[issue7817] Pythonw.exe fails to start

2010-01-30 Thread Dan
New submission from Dan <10equa...@gmail.com>: Pythonw.exe refuses to start on my Windows 7 x64 computer. I don't get any kind of error message (i.e. "pythonw.exe has stopped working"), it simply doesn't open. python.exe works fine. Attached is a Windows Debugger analysis log, I can also pro

[issue4340] xmlrpc.client - default 'SlowParser' not defined

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: I'm unable to reproduce the bug on py3k nor python3.1. Reopen the issue if the bug reappears. -- nosy: +haypo resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue7817] Pythonw.exe fails to start

2010-01-30 Thread Dan
Dan <10equa...@gmail.com> added the comment: I forgot to mention that this is with a brand new install of Python 3.1.1, and a complete uninstall / reinstall did nothing. -- ___ Python tracker __

[issue6409] 2to3 generates malformed diffs

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: I'm able to reproduce the bug. The problem is that "-j 4" option creates 4 working processes, and they are all writing to stdout at the same time. Main process: main() => refactor() => refactor_file() sends tasks to child processes Children: _child() => queue

[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: antoine's patch (fixing this issue) is commited. Can we close this issue? -- nosy: +haypo ___ Python tracker ___ ___

[issue7708] test_xmlrpc fails with non-ascii path

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: This issue is a duplicate of #7606. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue7606] test_xmlrpc fails with non-ascii path

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: #7608 was a duplicate issue. Copy of my message (msg98091): - SimpleXMLRPCRequestHandler.do_POST() writes the traceback in the HTTP header "X-traceback". But an HTTP header value is ASCII only, whereas a traceback can contain any character (eg. an non-ASCI

[issue7708] test_xmlrpc fails with non-ascii path

2010-01-30 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> duplicate status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue7606] test_xmlrpc fails with non-ascii path

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: pitrou> If it's only about transmitting the string representation of the pitrou> traceback, perhaps we can simply use "replace" or "ignore" as the error pitrou> handler? Both replace and ignore loose information. My patch keeps all information by using backsla

[issue7813] Bug in command-line module launcher

2010-01-30 Thread R. David Murray
R. David Murray added the comment: I meant issue 7268 in my previous message. -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-01-30 Thread STINNER Victor
New submission from STINNER Victor : test_c_api() method of a set() (only defined in pydebug mode) suppose that the set content is "abc". It causes assertion error if the method is called in a set different than set("abc"). My patch modifies the set content at the beginning of the test. -

[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-01-30 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Interpreter Core type: -> crash versions: +Python 2.7, Python 3.2 ___ Python tracker ___ _

[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled

2010-01-30 Thread Ezio Melotti
Ezio Melotti added the comment: The patch for bsddb3 looks good, however there's no reason (IMHO) to keep in the tests those "if sys.version_info[0] < 3:" or replace the version with (2,6) since we are already using things like assertIn that are 2.7-only. I changed it only to avoid warnings,

[issue7819] sys.call_tracing(): check arguments type

2010-01-30 Thread STINNER Victor
New submission from STINNER Victor : Ensure that "args" argument is a tuple. Fix the following crash: $ python -c "import sys; sys.call_tracing(open, u'a')" SystemError: ../Python/getargs.c:1413: bad argument to internal function -- components: Interpreter Core files: sy

[issue7820] parser: restores all bytes in the right order if check_bom() fails

2010-01-30 Thread STINNER Victor
New submission from STINNER Victor : My patch fixes check_bom() to restore all bytes in the right order if there is no BOM to leave the stream unchanged and to fix an assertion error in buf_ungetc() (raised in pydebug mode). The current code only unget one byte (0xFF), even if two or three byt

[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-01-30 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> rhettinger nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue7820] parser: restores all bytes in the right order if check_bom() fails

2010-01-30 Thread Benjamin Peterson
Benjamin Peterson added the comment: Are there test cases for this? -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs

[issue7813] Bug in command-line module launcher

2010-01-30 Thread Nick Coghlan
Nick Coghlan added the comment: Since import and direct execution will cope with files that don't end with a blank line, changing the first argument to "source + '\n'" in the pkgutil compile call seems like a reasonable workaround for the limitation in the 2.6 compile function. -- _

[issue7820] parser: restores all bytes in the right order if check_bom() fails

2010-01-30 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file16068/parser_restore_bom-2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue7820] parser: restores all bytes in the right order if check_bom() fails

2010-01-30 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file16067/parser_restore_bom.patch ___ Python tracker ___ ___ Python-bugs-list

[issue7820] parser: restores all bytes in the right order if check_bom() fails

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: > Are there test cases for this? Here you have. -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue7819] sys.call_tracing(): check arguments type

2010-01-30 Thread STINNER Victor
STINNER Victor added the comment: Before someone is asking, i wrote a new version of my patch using an unit test. The patch also test sys.call_tracing() with valid arguments. -- Added file: http://bugs.python.org/file16069/sys_call_tracing-2.patch _

[issue7818] Improve set().test_c_api(): don't expect a set("abc"), modify the content

2010-01-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: Will think about this. The method was supposed to be for internal use only. May just rename it to _test_c_api() and add a docstring noting that it is only defined for "abc". That being said, it may be worthwhile to build-out the test to accept many di

[issue7809] Documentation for random module should indicate that a call to seed() is not required

2010-01-30 Thread Raymond Hettinger
Raymond Hettinger added the comment: ISTM, the docs are fine in this regard. The very long history of this module suggests that this is not a recurring point of confusion. -- assignee: georg.brandl -> rhettinger nosy: +rhettinger status: open -> closed ___

[issue7817] Pythonw.exe fails to start

2010-01-30 Thread Martin v . Löwis
Martin v. Löwis added the comment: Why do you think this is a bug? It's the whole point of pythonw.exe to not open any window. -- nosy: +loewis ___ Python tracker ___ __

[issue7165] xmlrpc.server assumes sys.stdout will have a buffer attribute

2010-01-30 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue7821] Command line option -U not documented

2010-01-30 Thread Steven D'Aprano
New submission from Steven D'Aprano : There is a command line switch -U (uppercase U) which is mentioned in PEP 3147 http://www.python.org/dev/peps/pep-3147/ but doesn't appear to be documented anywhere. It is listed here, but not described: http://docs.python.org/using/cmdline.html Nor does

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-01-30 Thread Stefan Behnel
Stefan Behnel added the comment: Looks like this is one of those bugs that run away when you look too close... I can get it to crash reliably for me with the latest py3k branch (and all Python 3.x release versions) when I run the test suite completely, so here's a new recipe. The intention is