[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: I found the errror in my previous patch. It lacked a self.decode=.. line in the StreamReader.decode elif branch. I attach a replacement patch diff-u.py26_utf8sig (apply to the 2.6 version of utf_8_sig.py. (If allowed, I will next remove the incorrect pat

[issue1631171] implement warnings module in C

2007-11-15 Thread Brett Cannon
Changes by Brett Cannon: -- assignee: nnorwitz -> brett.cannon _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-list mailing list Uns

[issue1736190] asyncore/asynchat patches

2007-11-15 Thread billiejoex
billiejoex added the comment: The current implementation of asynchat.async_chat.initiate_send method doesn't look at what is specified in ac_out_buffer_size attribute which represents the buffer size of the outgoing data defaulting to a maximum of 4096 bytes to send in a single socket.send() call

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: I've submitted socket2.diff plus small changes to ssl.py. This seems the best I can do given that I don't think I can make dup() work on ssl sockets. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL

[issue1720390] Remove backslash escapes from tokenize.c.

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: I don't think tokenizer.py needs to be changed -- it never interpreted backslashes in string literals anyway (not even in regular, non-raw literals). The tokenizer.c cleanup is submitted as revision 59007. I still am not warming up towards the no-raw-escapes

[issue1720390] Remove backslash escapes from tokenize.c.

2007-11-15 Thread Ron Adam
Changes by Ron Adam: Added file: http://bugs.python.org/file8763/no_raw_escapes_patch.diff _ Tracker <[EMAIL PROTECTED]> _ ___ Python-bugs-li

[issue1720390] Remove backslash escapes from tokenize.c.

2007-11-15 Thread Ron Adam
Ron Adam added the comment: It looks like the disabling of \u and \U in raw strings is done. Does tokenize.py need to be fixed, to match? While working on this I was able to clean up the string parsing parts of tokenize.c, and have a separate patch with just that. And an updated patch with bot

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! roudkerk's patch is submitted as revision 59004. BTW I need to go back to the drawing board for the rest of the socket patch here. Using dup() in makefile() doesn't work for the ssl.SSLSocket class. Maybe the explicit reference counting is the best

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread roudkerk
roudkerk added the comment: Currently on Windows set_error() make use of a large array which maps socket error numbers to error messages. This patch (against socketmodule.c from Python 2.6) removes that array and just lets PyErr_SetExcFromWindowsErr() generate the message by using the Win32 f

[issue1423] wave sunau aifc 16bit errors

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Crys, since you apparently have working sound on Windows, could you have a look at this? There's also an (unrelated) issue with sunau.py on Py3k, it doesn't work (but the unittests aren't strong enough to discover that :-). -- assignee: -> tiran nosy

[issue1431] pth files not loaded at startup

2007-11-15 Thread Giambattista Bloisi
Giambattista Bloisi added the comment: Please find attached a patch for http://docs.python.org/dev/install/index.html. I think removing a statement is enough to make things clear. About darwin additional directories I'm unsure whether it need further documentation as it seems very platform-relate

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Bill Janssen
Bill Janssen added the comment: Looks like the Python SVN cert did not get included in the patch, which is causing a failure. I'll check that in. __ Tracker <[EMAIL PROTECTED]> __ ___

[issue1134] Parsing a simple script eats all of your memory

2007-11-15 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Corrected in revision 59001, with a modified patch. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ __

[issue1433] marshal roundtripping for unicode

2007-11-15 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think you have a wrong understanding of round-tripping. In Unicode it is really irrelevant if you're using a UCS2 surrogate pair or a UCS4 representation to describe a code point. The length of the Unicode representation may change, but the meaning won't,

[issue1446] Link to call me for free

2007-11-15 Thread Georg Brandl
Georg Brandl added the comment: Shouldn't the account be closed? -- nosy: +georg.brandl __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list m

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Hold on, socket3.diff breaks four unit tests: test_ftplib test_poplib test_smtplib test_urllib2net > newfd = _socket.dup(socket_instance) But that doesn't allow fromfd to work. I found some real use cases for fromfd where the fd is passed in through some oth

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Bill Janssen
Bill Janssen added the comment: OK, it's checked in. Let's see what the Windows buildbots think :-). Bill On Nov 15, 2007 1:35 PM, Bill Janssen <[EMAIL PROTECTED]> wrote: > > Bill Janssen added the comment: > > I'll check it in this afternoon -- I've just got to figure out how to > run the Pyt

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks! To be continued in issue 1378... -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ _

[issue1449] make msi work the vs 2005(MSVC8)

2007-11-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: One issue that also needs discussion is the structure of the build directory. It could temporarily be PCbuild9, but in the long run, it should replace PCbuild. Apart from that, the issue is whether there should be a flat structure as it is currently in PCbuild,

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: I've yet another idea for a tiny improvement. Instead of doing newfd = _socket.dup(socket_instance.fileno()) I prefer newfd = _socket.dup(socket_instance) It removes some confusing magic and makes error checking on Windows slightly easier. __

[issue1449] make msi work the vs 2005(MSVC8)

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: Weck, if you like to help and spend some time on getting VS2008 support into Python 2.6 and 3.0 I'm willing to assist you. You can download the Beta 2 of the VS C++ 2008 Express Edition from http://msdn2.microsoft.com/en-us/express/future/bb421473.aspx IMHO t

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Bill Janssen
Bill Janssen added the comment: I'll check it in this afternoon -- I've just got to figure out how to run the Python clean-up tool. Then you can check in the socket3.diff patch, then I'll make sure the SSL module works with that version of sockets. Bill On 11/15/07, Guido van Rossum <[EMAIL PR

[issue1445] SystemError accessing uninitialised cell contents

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Patch anyone? -- nosy: +gvanrossum __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsu

[issue1417] Weakref not working properly

2007-11-15 Thread MHOOO
MHOOO added the comment: Yeah, cool :) Thanks =) __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: If you haven't checked this in by tomorrow morning, I'll submit issue 1378 (socket3.diff) first, and you'll have to do a bunch of cleanup. Or, if you like, I can submit that now and you can do the cleanup this afternoon. (Basically, we can dup() sockets on Wi

[issue1031213] Use correct encoding for printing SyntaxErrors

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: > In release25-maint, PyErr_Print() should be replaced with > PyErr_Clear() also. Committed revision 58991. _ Tracker <[EMAIL PROTECTED]> _ _

[issue1430436] recursive __getattr__ in thread crashes

2007-11-15 Thread Brett Cannon
Brett Cannon added the comment: And under 2.6 on OS X. I doubt this is a BSD thing but more of a recursion depth issue. And I don't think there is anything to fix here. The recursion depth is a per-thread thing, and this test is blowing the C stack before the recursion depth is reached. If yo

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Forgot to upload socket3.diff. Added file: http://bugs.python.org/file8759/socket3.diff __ Tracker <[EMAIL PROTECTED]> __Index: Include/longobject.h ===

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: socket3.diff builds on socket2.diff: - Rename socket class to Socket; add socket() as a factory function. - Implement roudkerk's suggestion of using a duplicate socket in makefile() to get rid of the manual reference counting. Yay! Note: this dinterferes wit

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: socket2.diff makes dup() a module-level function in _socket (and hence in socket.py) and uses that to implement fromfd() in socket.py. No changes otherwise compared to py3k_another_socket.patch. Added file: http://bugs.python.org/file8758/socket2.diff __

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: - I'm hoping that Bill can submit his SSL changes first. - If we make _dup() a module-level function, we can implement fromfd() in Python. I'll do this now. __ Tracker <[EMAIL PROTECTED]>

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Looks good (after skimming). Some stylistic nits: - Please fold lines >= 80 chars. - Please strip trailing whitespace (for Python code, you won't be allowed to submit with it present). - You can fold long imports without using the dreaded backslash now, e.g.

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: > I've reviewed your patch and merged it was some pending changes of my > own. The socket tests are passing on Windows. Great work :) You didn't upload this though. __ Tracker <[EMAIL PROTECTED]>

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: Oh, I forgot Added file: http://bugs.python.org/file8757/py3k_another_socket.patch __ Tracker <[EMAIL PROTECTED]> __Index: Include/longobject.h

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Christian Heimes
Changes by Christian Heimes: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/py

[issue1144] parsermodule validation out of sync with Grammar

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Committed revision 58987. -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list m

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Bill Janssen
Bill Janssen added the comment: I've tried several different times to fix that warning. It appears on some releases of gcc, and not on others. There seems to be no cast or declaration that fixes it everywhere. More power to you if you can find one! Bill On 11/15/07, Christian Heimes <[EMAIL

[issue1449] make msi work the vs 2005(MSVC8)

2007-11-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: I'm opposed to this patch. Any change to the MSI build process should only be made when/after the default compiler for Python is changed. That needs to be discussed on python-dev first, and I hope that the new build infrastructure will *not* use the PCbuild8 dir

[issue1144] parsermodule validation out of sync with Grammar

2007-11-15 Thread David Binger
David Binger added the comment: Okay, here is the whole thing with a unittest that exposes the problem. Index: Lib/test/test_parser.py === --- Lib/test/test_parser.py (revision 58984) +++ Lib/test/test_parser.py (working cop

[issue1448] Build Python with VS 2005(MSVC8)

2007-11-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: I'm rejecting this patch, for several reasons: - it addresses too many issues in a single patch. Separate bug reports need to be submitted for independent issues. - for each issue, it fails to explain what the problem is. For example, "some libraries are outdate

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: roudkerk, can you turn that suggestion into a proper patch? __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list ma

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Bill Janssen
Bill Janssen added the comment: Actually, it's some combination of the version of OpenSSL plus the version of gcc. Bill On 11/15/07, Bill Janssen <[EMAIL PROTECTED]> wrote: > I've tried several different times to fix that warning. It appears on > some releases of gcc, and not on others. There

[issue1451] SSL patch for Python 3000

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: Ubuntu Linux 7.10, x86, gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2) /home/heimes/dev/python/py3k/Modules/_ssl.c: In function '_get_peer_alt_names': /home/heimes/dev/python/py3k/Modules/_ssl.c:680: warning: passing argument 2 of 'ASN1_item

[issue1447] patch to make msvccompiler.py work with vs 2005(MSVC8)

2007-11-15 Thread Martin v. Löwis
Martin v. Löwis added the comment: tiran is correct. distutils should work without having to invoke a VS build environment. Relying on that environment would have worked way back to VC6 and earlier, but it would reduce the ease of use of distutils. Rejecting the patch. -- nosy: +loewis

[issue1378] fromfd() and dup() for _socket on WIndows

2007-11-15 Thread roudkerk
roudkerk added the comment: >From Guido's patch: >if (!DuplicateHandle(GetCurrentProcess(), (HANDLE)handle, > GetCurrentProcess(), &newhandle, > 0, FALSE, DUPLICATE_SAME_ACCESS)) >{ >WSASetLastError(GetLastE

[issue1144] parsermodule validation out of sync with Grammar

2007-11-15 Thread Guido van Rossum
Guido van Rossum added the comment: Can you submit a unittest that catches this? Then I can check in the fix. -- assignee: fdrake -> gvanrossum __ Tracker <[EMAIL PROTECTED]> __ __

[issue1448] Build Python with VS 2005(MSVC8)

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: I'm a bit concerned with the upgrade from DB 4.4. to 4.6 and SQLite from 3.3 to 3.5. Are the APIs backward compatible or can the Python bindings handle the new APIs? I believe that Python 2.6 is compatible with db4.6 but I'm not sure about SQLite. Have you run

[issue1449] make msi work the vs 2005(MSVC8)

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: The patch looks fine but I've a small request. Could you please use a global var PCBUILD instead of "PCBuild" / "PCBuild8" and change the dependencies to use either MSVCR 71 or 80 depending on the content of the var. This way the msi module can handle both vers

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread Georg Brandl
Changes by Georg Brandl: -- assignee: -> doerwalter nosy: +doerwalter __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsu

[issue1447] patch to make msvccompiler.py work with vs 2005(MSVC8)

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: I've checked your patch. It's not enough to move to VS 2005 as the default compiler. People expect python setup.py to work w/o opening a VS 2005 Command Prompt. -- nosy: +tiran __ Tracker <[EMAIL PROTECTED]>

[issue1446] Link to call me for free

2007-11-15 Thread Christian Heimes
Changes by Christian Heimes: -- resolution: -> invalid status: open -> closed __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing li

[issue1450] make modulator more general

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your work! I'm changing the version number to Python 2.6. It's too late to get it into Python 2.5. Christian PS: Next time could you please create the patch in the root of the Python source tree? It makes it easier to apply the patch. -- k

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread Christian Heimes
Changes by Christian Heimes: -- keywords: +patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue1447] patch to make msvccompiler.py work with vs 2005(MSVC8)

2007-11-15 Thread Christian Heimes
Changes by Christian Heimes: -- components: +Installation keywords: +patch versions: +Python 2.6, Python 3.0 -Python 2.5 __ Tracker <[EMAIL PROTECTED]> __ _

[issue1448] Build Python with VS 2005(MSVC8)

2007-11-15 Thread Christian Heimes
Changes by Christian Heimes: -- components: +Installation keywords: +patch priority: -> normal versions: +Python 2.6, Python 3.0 -Python 2.5 __ Tracker <[EMAIL PROTECTED]> __

[issue1449] make msi work the vs 2005(MSVC8)

2007-11-15 Thread Christian Heimes
Christian Heimes added the comment: I'm resetting the target version of all your MSVC patches to 2.6 + 3.0. While we can't alter the compiler version of Python 2.5 I really like to update to a new compiler for 2.6 and 3.0. -- components: +Demos and Tools, Installation keywords: +patch no

[issue1450] make modulator more general

2007-11-15 Thread zouguangxian
New submission from zouguangxian: modulator may be outdated. i made a changement to make it use the new feature of PyTypeObject in Python2.5. for example, to support members, methods, new, init and etc. -- components: Demos and Tools files: modulator.patch messages: 57533 nosy: weck se

[issue1449] make msi work the vs 2005(MSVC8)

2007-11-15 Thread zouguangxian
New submission from zouguangxian: with vs 2003, msi.py get msvcr71.dll from msm. but with vs 2005, It's better to extract msvcr80.dll from %VCINTALLDIR%\redist\x86 \Microsoft.VC80.CRT\. In addition, it seems to extract file from Microsoft_VC80_CRT_x86.msm need upgrade MSI to 3.1, i am not sure.

[issue1447] patch to make msvccompiler.py work with vs 2005(MSVC8)

2007-11-15 Thread zouguangxian
New submission from zouguangxian: It seems that the directory information of MSVC8 *just* can be got from environment variable instead of registry. This patch make me compile pywin32 with MSVC8(VS 2005). -- files: msvccompiler.py.diff messages: 57530 nosy: weck severity: normal status

[issue1328] feature request: force BOM option

2007-11-15 Thread Walter Dörwald
Walter Dörwald added the comment: > For utf16, (arguably) a missing BOM should merely assume machian endianess. > For utf_16_le, utf_16_be input, both should accept & discard a BOM. > On output, I'm not sure; maybe all should write a BOM unless passed a flag > signifying no bom? > Or to preserve

[issue1328] feature request: force BOM option

2007-11-15 Thread Walter Dörwald
Walter Dörwald added the comment: jgsack wrote: > > If codec utf_8 or utf_8_sig were to accept input with or without the > 3-byte BOM, and write it as currently specified without/with the BOM > respectively, then _I_ can reread again with either utf_8 or utf_8_sig. That's exactly what the utf_8_

[issue1144] parsermodule validation out of sync with Grammar

2007-11-15 Thread David Binger
David Binger added the comment: The one line patch below makes "import parser; parser.sequence2st(parser.suite("class A(object): pass").tolist())" work. It puts the parsermodule's validation back in sync with the Python3 grammar for this rule of the grammar. This bug is a serious problem for m

[issue1445] SystemError accessing uninitialised cell contents

2007-11-15 Thread Duncan Booth
New submission from Duncan Booth: The following code throws a SystemError exception. cell_get_contents in Objects\cellobject.c should check for a null op->ob_ref value and throw an appropriate exception. >>> def oops(): def f(): cell f.func_closure[0].cell_contents cell =

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: One additional clue: test_codecs succeeds in verbose mode but fails in non- verbose mode (autotest "verbosity") .. I think. My eyes are getting blurry. More tomorrow, I guess. ..j __ Tracker <[EMAIL PROTECTED]>

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: Oops, it looks like my patch may have broken test_partial in test_codecs. I will try to figure out what the test_partial does in the next day or so, unless someone else can add some insignt in the meantime. .jim __ Tracker

[issue1328] feature request: force BOM option

2007-11-15 Thread James G. sack (jim)
James G. sack (jim) added the comment: re: msg57041, I'm sorry if I gave the wrong impression about interacting with other programs. I started this feature request with some half-baked thinking, which I tried to revise in my second post. Anyway I'm most interested right now in lobbying for a c

[issue1430436] recursive __getattr__ in thread crashes BSDs

2007-11-15 Thread bwpy
bwpy added the comment: I can still reproduce this on FreeBSD 7.0 BETA2. Python version is Python 2.5.1 (r251:54863, Nov 14 2007, 13:09:04) [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7 -- nosy: +bwpy versions: +Python 2.5 _ Tracker <[EMAIL PROTECTED]

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
Changes by James G. sack (jim): Added file: http://bugs.python.org/file8750/test_utf8sig_stream.py __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-lis

[issue1444] utf_8_sig streamreader bug, patch, and test

2007-11-15 Thread James G. sack (jim)
New submission from James G. sack (jim): The streamreader in utf_8_sig.py fails when asked to read a specified bytelength of data that ends up in the middle of a multibyte utf8 code. I will attached a atandalone unittest (which does work from autotest, but doesn't use test_support), test_utf8s