[issue1305] socket.py hangs on Mac OS X

2007-10-19 Thread andres
New submission from andres: Repeated socket connection attempts hang for >2s on Python 2.5.1 & OS X 10.4 after 250 attempts have been made. -- components: Library (Lib), Macintosh files: sockettest.py messages: 56601 nosy: andres severity: normal status: open title: socket.py hangs on M

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Martin v. Löwis
Changes by Martin v. Löwis: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > Thanks. I just wish this whole ordeal had not been necessary (filed a > bug report with Apple in hopes that this can be prevented for someone > else). I can see why some people prefer to hack on PyPy, IronPython, > or Jython instead of d

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: On 10/19/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > > Christian Heimes added the comment: > > Brett Cannon wrote: > > This suggests that perhaps we should standardize on file pointers or > > file descriptors in Python to prevent something like this from happ

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > This suggests that perhaps we should standardize on file pointers or > file descriptors in Python to prevent something like this from happening > again. rewind() it used couple of times in the Python code. Have you checked if the other ca

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: 58557 as the fix. Yes, it was stupid on OS X's part and I was lucky to just think of the possible solution. Basically OS X does not like it when you do stuff with a file pointer but then poke around with the file descriptor. That means that when PyTokenizer_Find

[issue1179] [CVE-2007-4965] Integer overflow in imageop module

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: Neal, didn't you say you had a fix for this? -- nosy: +nnorwitz __ Tracker <[EMAIL PROTECTED]> __ ___ Python

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: > OK, I think I might have a solution, and it is really stupid. I will > run the unit test suite to see if it really fixes everything. Here's keeping my fingers crossed. I do note that the new code still leaks the encoding string which is malloc'ed in PyToke

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: OK, I think I might have a solution, and it is really stupid. I will run the unit test suite to see if it really fixes everything. __ Tracker <[EMAIL PROTECTED]> __

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Nope, didn't do it. I also checked using gdb a few minutes ago and ftell() was reporting a position of 0 all they way back to PyObject_MethodCall(). __ Tracker <[EMAIL PROTECTED]>

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: I checked in your ``< 2`` change and plugged a memory leak since you were not freeing the struct tok_state. Checked in r58555. __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > Brett Cannon added the comment: > > OK, for some reason, when PyTokenizer_FindEncoding() is called and the > resulting file is big enough, it starts off with a seek position > (according to TextIOWrapper.tell()) of 4096. That happens to

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: I've made a short unit tests which tests a large file with and w/o -*- coding: -*-. It passes on Linux. Added file: http://bugs.python.org/file8575/py3k_test_issue1267.patch __ Tracker <[EMAIL PROTECTED]>

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: OK, for some reason, when PyTokenizer_FindEncoding() is called and the resulting file is big enough, it starts off with a seek position (according to TextIOWrapper.tell()) of 4096. That happens to be exactly half the size of the buffer used by io. But I am not su

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: It's unrelated to the problem but Parser/tokenizer.c:1619 has a minor bug. > while(((tok->lineno <= 2) && (tok->done == E_OK))) { > PyTokenizer_Get(tok, &p_start, &p_end); > } (tok->lineno < 2) is sufficient. See line 516 Chri

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: PyTokenizer_FindEncoding() is the culprit. If I comment it out in Python/import.c:call_find_module(), and thus just use the system encoding, runpy works again. __ Tracker <[EMAIL PROTECTED]> _

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Brett Cannon wrote: > Brett Cannon added the comment: > > It looks like the file object returned by imp.find_module() has its read > position WAY too far forward (at least on OS X). That's strange. It should never read more than 2 lines of a file. I don't und

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: > runpy is failing because pkgutil is failing because it is giving > compile() part of a source file instead of the entire thing:: > > Traceback (most recent call last): > File "/Users/drifty/Dev/python/3.x/pristine/Lib/runpy.py", line 97, > in _run_module_a

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: It looks like the file object returned by imp.find_module() has its read position WAY too far forward (at least on OS X). Re-opening. -- status: closed -> open __ Tracker <[EMAIL PROTECTED]>

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: runpy is failing because pkgutil is failing because it is giving compile() part of a source file instead of the entire thing:: Traceback (most recent call last): File "/Users/drifty/Dev/python/3.x/pristine/Lib/runpy.py", line 97, in _run_module_as_main loade

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: I don't have a Mac at my disposal any more. :( Can you attach the output of the failing tests to the bug report? Maybe I can be of assistance. __ Tracker <[EMAIL PROTECTED]> __

[issue1303] adapt str8 constructor to bytes constructor

2007-10-19 Thread Brett Cannon
Changes by Brett Cannon: -- nosy: +brett.cannon __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue1303] adapt str8 constructor to bytes constructor

2007-10-19 Thread Brett Cannon
Changes by Brett Cannon: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Yeah, I just noticed this as well. is it definitely this change? On 10/19/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Guido van Rossum added the comment: > > FWIW, on Mac I get six failures (all these pass on Linux): > > test_cmd_line test_inspect test_mo

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Attached a fix for test_format. It was testing string interpolation on both str8 and str and using a str for the comparison. Since string interpolation is going away for str8 once it becomes bytes I just removed the testing of str8. The failures I know of left a

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: FWIW, on Mac I get six failures (all these pass on Linux): test_cmd_line test_inspect test_modulefinder test_pyclbr test_quopri test_runpy __ Tracker <[EMAIL PROTECTED]> __

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Attached is a patch to fix test_compile. Simple fix of turning an empty string into ``str8('')``. Added file: http://bugs.python.org/file8573/fix_test_compile.diff __ Tracker <[EMAIL PROTECTED]>

[issue1298] Support for z/OS and EBCDIC.

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: FYI, I checked the moderation queue for python-dev and didn't find your message. You might want to resend. __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-19 Thread Guido van Rossum
Changes by Guido van Rossum: -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: The file I just uploaded is unicode-string-eq-false-all-r4.patch with the codecs.c and structmember.c parts of the patch removed. -- nosy: +brett.cannon Added file: http://bugs.python.org/file8572/r4-revised.patch __ Tracke

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: The bug was fixed in r58553 together with http://bugs.python.org/issue1267. Please close this bug. __ Tracker <[EMAIL PROTECTED]> __

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58553 (with minor tweaks only). Thanks! -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1304] py3k compilation on Windows

2007-10-19 Thread Amaury Forgeot d'Arc
New submission from Amaury Forgeot d'Arc: This patch is needed to have py3k compile on win32, since the introduction of bytes_methods.c. Also, use the recently re-added md5module.c and sha1module.c, because a precompiled openssl library is difficult to obtain on Windows. Note: I tested only with

[issue1303] adapt str8 constructor to bytes constructor

2007-10-19 Thread Georg Brandl
New submission from Georg Brandl: This makes the str8 constructor accept the same kinds of types as the bytes constructor. I had to fix instances of str8("abc") to str8(b"abc") to make tests pass again. The only remaining failure should be test_str -- the string test suite must be thoroughly rede

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Brett Cannon
Changes by Brett Cannon: Removed file: http://bugs.python.org/file8543/unnamed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsu

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Christian Heimes
Christian Heimes added the comment: Sure there is a patch ... well it's ... *uhm* ... it's hidden under your bed. O:-) Added file: http://bugs.python.org/file8569/py3k_profile_fix.patches __ Tracker <[EMAIL PROTECTED]> _

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: There is no patch. =) -- assignee: -> gvanrossum keywords: +py3k nosy: +brett.cannon __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1302] Fixes for profile/cprofile

2007-10-19 Thread Christian Heimes
New submission from Christian Heimes: The patch fixes the output for profile and cProfile. Another patch from Alexandre and me added additional calls to the UTF-8 codec. -- components: Library (Lib) messages: 56569 nosy: gvanrossum, tiran severity: normal status: open title: Fixes for pr

[issue1297] pyconfig.h not compatible with MS VC++ Express Edition

2007-10-19 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I found that BaseTsd.h is part of the Windows SDK, which is not included in the Express Edition. It can be installed separately. OTOH, the python core still compiles without the #include (using VC++ 2005 Express Edition). What about other compilers? What

[issue1280] PEP 3137: Make PyString's indexing and iteration return integers

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: Checked in. I addressed some of your XXX'es, left others in (sre needs a serious checkup for compatibility with bytes). Committed revision 58552. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL P

[issue1263] PEP 3137 patch - str8/str comparison should return false

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: I've committed the half of this patch that doesn't break any tests: the changes to codecs.c and structmember.c. Committed revision 58551. I'm seeking help getting the remaining unit tests to pass. (Thanks Thomas for the enumeration of the test failures!) ___

[issue1280] PEP 3137: Make PyString's indexing and iteration return integers

2007-10-19 Thread Guido van Rossum
Changes by Guido van Rossum: -- assignee: -> gvanrossum nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Brett Cannon
Brett Cannon added the comment: Thanks, Guido. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue1267] Py3K cannot run as ``python -S``

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: I will take this. -- assignee: brett.cannon -> gvanrossum __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-

[issue1161] Garbled chars in offending line of SyntaxError traceback

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: There were some seriously broken things with exception reporting, most of which I seem to have fixed. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> ___

[issue1151] "TypeError: expected string, bytes found" instead of KeyboardInterrupt

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: There were some seriously broken things with exception reporting, most of which I seem to have fixed. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> ___

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-19 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: I tested cmd.py on Linux and two things (including the one reported by OP) looked odd to me. 1) CTRL-D produces a message "*** Unknown syntax: EOF". 2) CTRL-C produces a KeyboardInterrupt exception and the session terminates. I am attaching a patch that

[issue1151] "TypeError: expected string, bytes found" instead of KeyboardInterrupt

2007-10-19 Thread Eduardo Padoan
Eduardo Padoan added the comment: Can't reproduce this error anymore with revision 58472. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing

[issue1161] Garbled chars in offending line of SyntaxError traceback

2007-10-19 Thread Eduardo Padoan
Eduardo Padoan added the comment: Can't reproduce this error anymore with revision 58472. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing

[issue1284] typo in lib doc 7.3.2.1 MaildirMessage

2007-10-19 Thread Georg Brandl
Georg Brandl added the comment: Thanks, fixed in r58545, r58546 (2.5). -- nosy: +georg.brandl resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: Hmm... I don't think this is the right thing to do. The code is broken in several ways. I recommend you find someone to help you come up with a better patch in comp.lang.python. -- keywords: +patch __ Tracker <[EMAIL

[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-19 Thread Raghuram Devarakonda
Raghuram Devarakonda added the comment: The fact that the problem occurs only from the command line and not when run from a script indicates that the real issue is in trying to print the object. Sure enough, if you modify the script to do repr(mydom.firstChild.childNodes), it gets the same proble

[issue1299] distutils.sysconfig is not cross-platform compatible

2007-10-19 Thread Nick
Nick added the comment: I'll look into it this weekend. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue1297] pyconfig.h not compatible with MS VC++ Express Edition

2007-10-19 Thread Nick
Nick added the comment: MS VC++ 2005 Express Edition __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue1298] Support for z/OS and EBCDIC.

2007-10-19 Thread Guido van Rossum
Guido van Rossum added the comment: > How do you measure importance? Z/OS is not important to many > people in the world, but to those to whom it is important, it is > _very_ important, in a very tangible way. It was certainly > important enough for someone to port Python to it. :) But is it imp

[issue602345] option for not writing .py[co] files

2007-10-19 Thread Georg Brandl
Georg Brandl added the comment: Since the PEP is now withdrawn, I updated Neal's patch to the trunk and added the env variable as well as the sys module value, including documentation. -- priority: low -> normal Added file: http://bugs.python.org/file8567/no-pyc-flag.diff __

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-10-19 Thread BULOT
BULOT added the comment: Hello, Here is my patch for cmd.py Regards stephbul Added file: http://bugs.python.org/file8566/cmd.py.keyboardinterrupt.patch __ Tracker <[EMAIL PROTECTED]> __--- backuo

[issue602345] option for not writing .py[co] files

2007-10-19 Thread Tom Tanner
Tom Tanner added the comment: Is there likely to be any action on this. We can get issues with the creation of .pyc files due to our build setup. We can get situations where we run builds in parallel on 2 different architectures. Our build is set up so that anything generated by compilers end up

[issue1298] Support for z/OS and EBCDIC.

2007-10-19 Thread Lauri Alanko
Lauri Alanko added the comment: How do you measure importance? Z/OS is not important to many people in the world, but to those to whom it is important, it is _very_ important, in a very tangible way. It was certainly important enough for someone to port Python to it. :) _

[issue1298] Support for z/OS and EBCDIC.

2007-10-19 Thread Lauri Alanko
Lauri Alanko added the comment: The character set of EBCDIC is a superset of the character set of ASCII. In fact CP1047, the variant used on z/OS, has the same character set as Latin-1. Only the encoding is completely different. As a non-ASCII platform, z/OS is certainly challenging for people u