[issue7767] Add PyLong_AsLongLongAndOverflow

2010-01-30 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com 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 rep...@bugs.python.org

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

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file16046/issue7092_test_exceptions.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___

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

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

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

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file16049/issue7092_silence_imports.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___

[issue7767] Add PyLong_AsLongLongAndOverflow

2010-01-30 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Applied in r77842 (trunk), r77843 (py3k). -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7767

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

2010-01-30 Thread Sami Zerrade
Sami Zerrade szerr...@gmail.com 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

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

2010-01-30 Thread Sami Zerrade
Sami Zerrade szerr...@gmail.com 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:

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

2010-01-30 Thread Sami Zerrade
Changes by Sami Zerrade szerr...@gmail.com: Removed file: http://bugs.python.org/file16054/setupterm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7567 ___

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

2010-01-30 Thread Sami Zerrade
Changes by Sami Zerrade szerr...@gmail.com: Added file: http://bugs.python.org/file16055/setupterm.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7567 ___

[issue7810] fix_callable breakage

2010-01-30 Thread Martin v . Löwis
New submission from Martin v. Löwis mar...@v.loewis.de: 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

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

2010-01-30 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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,

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

2010-01-30 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org http://bugs.python.org/issue7544

[issue7811] [decimal] ValueError - TypeError in from_tuple

2010-01-30 Thread Stefan Krah
New submission from Stefan Krah stefan-use...@bytereef.org: 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))

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

2010-01-30 Thread Peter Hansen
Changes by Peter Hansen pe...@engcorp.com: -- 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 rep...@bugs.python.org

[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 pe...@engcorp.com: 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

[issue7813] Bug of command-line module launcher

2010-01-30 Thread Pascal Chambon
New submission from Pascal Chambon chambon.pas...@gmail.com: 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

[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 mar...@v.loewis.de: -- versions: -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7812 ___ ___

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

2010-01-30 Thread Michael Newman
New submission from Michael Newman michael.b.new...@gmail.com: 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

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

2010-01-30 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- keywords: +needs review priority: - normal stage: - test needed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7567 ___

[issue7810] fix_callable breakage

2010-01-30 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: This should be fixed as of r77855 and r77856. -- nosy: +benjamin.peterson resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7810

[issue7813] Bug in command-line module launcher

2010-01-30 Thread R. David Murray
R. David Murray rdmur...@bitdance.com 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

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

2010-01-30 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r77857. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7814 ___

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

2010-01-30 Thread Georg Brandl
Georg Brandl ge...@python.org 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 ge...@python.org 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 rep...@bugs.python.org

[issue7815] Regression in unittest traceback formating extensibility

2010-01-30 Thread Martin
New submission from Martin gzl...@googlemail.com: 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

[issue7733] asyncore docs reference is unclear

2010-01-30 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Would you like to contribute a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7733 ___

[issue7815] Regression in unittest traceback formating extensibility

2010-01-30 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- nosy: +brian.curtin, michael.foord priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7815 ___

[issue7813] Bug in command-line module launcher

2010-01-30 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com added the comment: Allright, I guess in these conditions this bugs doesn't require a patch B-) Thanks for the details. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7813

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

2010-01-30 Thread Robin Dunn
Changes by Robin Dunn ro...@alldunn.com: -- nosy: +robind ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7812 ___ ___ Python-bugs-list mailing list

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

2010-01-30 Thread Brian Curtin
Brian Curtin cur...@acm.org 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 pmpp@gmail.com 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

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2010-01-30 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr 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

[issue7816] test_capi crashes when run with -R

2010-01-30 Thread Florent Xicluna
New submission from Florent Xicluna la...@yahoo.fr: test test_capi crashed -- class 'AssertionError': 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:

[issue7816] test_capi crashes when run with -R

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

[issue7816] test_capi crashes when run with -R

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7816 ___ ___ Python-bugs-list

[issue7816] test_capi crashes when run with -R

2010-01-30 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Should be fixed in r77867. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7816 ___

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

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

[issue7816] test_capi crashes when run with -R

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file16059/issue7816_test_capi.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7816 ___

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2010-01-30 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file16058/issue7385_memoryview.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7385 ___

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

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

[issue6899] Base.replace breaks tree

2010-01-30 Thread Meador Inge
Meador Inge mead...@gmail.com 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 victor.stin...@haypocalc.com 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

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

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 rep...@bugs.python.org

[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

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

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 rep...@bugs.python.org http://bugs.python.org/issue7817

[issue6409] 2to3 generates malformed diffs

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

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

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: antoine's patch (fixing this issue) is commited. Can we close this issue? -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7165

[issue7708] test_xmlrpc fails with non-ascii path

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is a duplicate of #7606. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7708 ___

[issue7606] test_xmlrpc fails with non-ascii path

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue7708] test_xmlrpc fails with non-ascii path

2010-01-30 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7708 ___

[issue7606] test_xmlrpc fails with non-ascii path

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue7813] Bug in command-line module launcher

2010-01-30 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I meant issue 7268 in my previous message. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7813 ___

[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 victor.stin...@haypocalc.com: 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

[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 victor.stin...@haypocalc.com: -- components: +Interpreter Core type: - crash versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7818

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

2010-01-30 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

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

2010-01-30 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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:

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

2010-01-30 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: 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

[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 benja...@python.org: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7818 ___

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

2010-01-30 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: Are there test cases for this? -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7820 ___

[issue7813] Bug in command-line module launcher

2010-01-30 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com 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

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

2010-01-30 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file16068/parser_restore_bom-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7820 ___

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

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Are there test cases for this? Here you have. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7820 ___

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

2010-01-30 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 rhettin...@users.sourceforge.net 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

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

2010-01-30 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net 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 mar...@v.loewis.de 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 rep...@bugs.python.org http://bugs.python.org/issue7817

[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 mar...@v.loewis.de: -- stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7165 ___

[issue7821] Command line option -U not documented

2010-01-30 Thread Steven D'Aprano
New submission from Steven D'Aprano st...@pearwood.info: 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:

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-01-30 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net 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