[issue5116] expose _CrtSetReportMode via the msvcrt module

2009-12-22 Thread Brian Curtin
Brian Curtin added the comment: Has there been any consensus about what to do with this? I know there was some chatter on python-dev about assertions causing problems with buildbots (6 months ago?) but I don't think anything came out of it. The code change is small and looks good. Is it worth e

[issue4772] undesired switch fall-through in socketmodule.c

2009-12-22 Thread Brian Curtin
Brian Curtin added the comment: I think both AF_BLUETOOTH and AF_TIPC should raise ValueError since the type of the argument is correct but it's not a good value. I piggybacked on Amaury's patch and changed the exceptions with a patch against r77004. -- nosy: +brian.curtin Added file: h

[issue7566] Add ntpath.sameopenfile support for Windows

2009-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: As NTFS supports hard links, I think GetFileInformationByHandle should be used to compare handles (looking at dwVolumeSerialNumber, nFileIndexHigh,nFileIndexLow) -- nosy: +loewis ___ Python tracker

[issue7565] Increasing resource.RLIMIT_NOFILE has no effect

2009-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: What operating system are you using? Can you provide a relevant snipped of strace output? -- nosy: +loewis ___ Python tracker ___ _

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

2009-12-22 Thread Yury
New submission from Yury : Calling curses.initscr after curses.endwin() results in a messed up terminal the second time curses.endwind() is called. For example: import curses curses.initscr(); curses.endwin(); curses.initscr(); curses.endwin() This behaves correctly in python 2.5. It does not w

[issue2698] Extension module build fails for MinGW: missing vcvarsall.bat

2009-12-22 Thread Craig McQueen
Craig McQueen added the comment: This seems to be an bug in Python 3.1.1. Is it fixed in the Python 3 code? Is the issue being tracked in a separate issue? -- ___ Python tracker

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-12-22 Thread Jason R. Coombs
Jason R. Coombs added the comment: Eric: That's great news. I was gearing up to test myself to see if I could reproduce the issue, but I'm glad it works since you beat me to it. Let me know if it would help to provide a Windows 7 VMWare Player virtual machine. -- __

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-12-22 Thread Jason R. Coombs
Jason R. Coombs added the comment: Andrew, thanks for pointing out the apparent mismatch of having ntpath.samefile but not ntpath.sameopenfile. Since this behavior doesn't immediately affect the support of os.symlink, I've created a separate issue, issue7566, to track that effort. -- _

[issue7566] Add ntpath.sameopenfile support for Windows

2009-12-22 Thread Jason R. Coombs
New submission from Jason R. Coombs : In issue1578269, asvetlov suggests adding an implementation of os.sameopenfile to ntpath.py: --- Jason, as I see you implemented os.samefile (actually ntpath.samefile) but os.sameopenfile is still not implemented. Looks like it's easy to do: while GetFina

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-12-22 Thread Jason R. Coombs
Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file15403/windows symlink draft 16.patch ___ Python tracker ___ ___ Python

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-12-22 Thread Jason R. Coombs
Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file15219/windows symlink draft 15.patch ___ Python tracker ___ ___ Python

[issue7565] Increasing resource.RLIMIT_NOFILE has no effect

2009-12-22 Thread George King
New submission from George King : My builds from trunk fail to open a number of files greater than the default 2660, even when I increase the limit using: resource.setrlimit(resource.RLIMIT_NOFILE, (test_limit, -1)) Attached is a script that doubles the default limit, sets it, queries it to m

[issue7564] test_ioctl fails sometimes

2009-12-22 Thread Florent Xicluna
New submission from Florent Xicluna : I got it to fail sometimes on trunk, when run with "-r -uall". Debian 64bits, Python 2.7a r77004 test_ioctl test_ioctl (test.test_ioctl.IoctlTests) ... FAIL test_ioctl_mutate (test.test_ioctl.IoctlTests) ... FAIL test_ioctl_signed_unsigned_code_param (test

[issue1729305] test_doctest fails when run in verbose mode

2009-12-22 Thread Florent Xicluna
Florent Xicluna added the comment: It still occurs on trunk. test test_doctest crashed -- : 'ascii' codec can't encode characters in position 343-344: ordinal not in range(128) -- components: +Tests -Library (Lib) nosy: +flox versions: +Python 2.7 ___

[issue7563] yield in except clause causes exception context to be lost

2009-12-22 Thread Benjamin Peterson
Benjamin Peterson added the comment: This is fixed in Python 3. I don't know if it's worth backporting the changes because it may be hard to avoid also backporting the incompatibilities in the exception model. -- nosy: +benjamin.peterson priority: -> normal ___

[issue1675951] [gzip] Performance for small reads and fix seek problem

2009-12-22 Thread Karl D'Adamo
Karl D'Adamo added the comment: This patch is awesome. It makes it possible to do this with http response objects that return gzipped streams: >>> conn = httplib.HTTPConnection('blah') >>> req = conn.request('GET', 'a.gz') >>> resp = conn.getresponse() >>> unzipper = gzip.GzipFile(fileobj=resp

[issue7562] Custom order for the subcommands of build

2009-12-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The distutils way of implementing a different fixed order would be to create a build command sub-class, override the .sub_commands list and then register this new subclass as 'build' command with distutils via the cmdclass setup() keyword argument. (eGenix u

[issue6058] Add cp65001 to encodings/aliases.py

2009-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: I also wonder whether stdin/stdout/stderr should be streams on Windows that use WriteConsole instead of WriteFile. Then the entire issue of console CP would go away for Unicode output. -- ___ Python tracker

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/o

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: sh: I don't argue against supporting bytes (here), only against supporting bytearray. -- ___ Python tracker ___ ___

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: sh: I don't argue against supporting bytes (here), only against supporting bytearray. -- ___ Python tracker ___ ___

[issue7563] yield in except clause causes exception context to be lost

2009-12-22 Thread Ronnie Maor
New submission from Ronnie Maor : Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def coroutine(): ... try: ... raise Exception('bla') ... except: ...

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: I doubt that buffers (including bytearray) are as useful in Python for storing file names as they are in C. Typically, when creating a buffer, you allocate some maximum size (in C: MAXPATH or some such), and then you fill the buffer, and null-terminate. In Pyt

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Sebastian Hagen
Sebastian Hagen added the comment: Oh, and *forcing* use of the PEP 383 hack for such interfaces would really be the Wrong Thing. Byte sequences are the natural (and most efficient, and least prone to misunderstandings) way to store filenames on a posix-like. Storing them as unicode-except-not-r

[issue6058] Add cp65001 to encodings/aliases.py

2009-12-22 Thread Christos Georgi ou
Χρήστος Γεωργίου (Christos Georgiou) added the comment: re Martin's question, I can offer the indirect wisdom of Michael Kaplan in this blog post: http://blogs.msdn.com/michkap/archive/2008/03/18/8306597.aspx where he mentions that the easiest way to output unicode text in the Windows console

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Sebastian Hagen
Sebastian Hagen added the comment: Well, it doesn't *need* to accept them ... but it would certainly be nice to have. If you've already got the filename in a bytearray object for some reason, being able to pass it through directly saves you both a copy and the explicit conversion code, which is

[issue6058] Add cp65001 to encodings/aliases.py

2009-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: This report is really about the issues reported in #1602 and #7441, i.e. where console output fails if the terminal encoding is 65001. Rather than adding the alias, I would prefer to find out why terminal output fails in that code page. -- ___

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Martin v . Löwis
Martin v. Löwis added the comment: Stepping back from the issue, I wonder whether posixmodule needs to accept bytearray objects at all. IIRC, the rationale was to allow access to file names that are unencodable, an issue that was mitigated by PEP 383. But even if byte-oriented file names stay s

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Sebastian Hagen
Sebastian Hagen added the comment: I've glanced at some of the other PyByteArray_AS_STRING() (and PyByteArray_AsStr(), which inherits this behaviour) uses in the stdlib. By far the heaviest user is bytearrayobject.c; aside from that, there's by my count only 24 uses in current trunk. I haven't l

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Stefan Krah
Stefan Krah added the comment: Sorry that I missed the first part of your patch. I don't know exactly what PyByteArray_AS_STRING() is meant to do either, but I think it would make sense to return an empty string. This here works: >>> bytes(bytearray(b'')) b'' -- __

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Sebastian Hagen
Sebastian Hagen added the comment: Correction: "Only fixing that one will get rid of the segfaults" ... well, for mkdir() on GNU/Linux, anyway. POSIX.1-2008 doesn't specify what happens if you call mkdir() with a NULL pointer, so I guess other conforming implementations might in fact still segfa

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Sebastian Hagen
Sebastian Hagen added the comment: You're correct about PyUnicode_FSConverter(), which is why the very first part of my patch fixes that function. Only fixing that one will get rid of the segfaults, but also lead to incorrect error reporting for the zero-length bytearray case; the bytes2str() mo

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Stefan Krah
Stefan Krah added the comment: Correction: You are of course right about PyByteArray_AS_STRING(), but with os.mkdir(bytearray(b'')) I get the segfault in PyUnicodeUCS2_FSConverter(): (gdb) n 1638 size = PyByteArray_GET_SIZE(output); (gdb) n 1639 data = PyByteArray_AS_

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Sebastian Hagen
Sebastian Hagen added the comment: Not exactly. The last part fixes the second problem, which you get for non-zero-length bytearrays. But without the first fix, zero-length bytearrays still lead to a crash: Python 3.2a0 (py3k:77001M, Dec 22 2009, 18:17:08) [GCC 4.3.4] on linux2 Type "help", "co

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread Stefan Krah
Stefan Krah added the comment: Crash confirmed. I don't see any issue with bytes2str(), the second part of your patch is what fixes the problem. I attach the reduced patch so it's clear what I mean. -- nosy: +skrah Added file: http://bugs.python.org/file15663/release_bytes.diff ___

[issue7562] Custom order for the subcommands of build

2009-12-22 Thread Tarek Ziadé
Changes by Tarek Ziadé : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue7562] Custom order for the subcommands of build

2009-12-22 Thread Jari Pennanen
New submission from Jari Pennanen : Long story short: Sometimes build_ext should be run before build_py, or something similar. As an example when using SWIG and setup.py the build order is incorrect: During build_ext the SWIG generates .py files that should be used during build_py, but since

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-12-22 Thread Eric Smith
Eric Smith added the comment: With patch 17 all tests pass on XP. I'm (still) working on getting a Windows 7 environment to test there. -- ___ Python tracker ___ _

[issue6058] Add cp65001 to encodings/aliases.py

2009-12-22 Thread Stefan Krah
Changes by Stefan Krah : Added file: http://bugs.python.org/file15662/check65001.py ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue6058] Add cp65001 to encodings/aliases.py

2009-12-22 Thread Stefan Krah
Stefan Krah added the comment: I wrote a small C application that converts all possible wchar_t to multibyte strings, using code page 65001. Usage: cl.exe gen65001.c python check65001.py Except for the newline character and a sequence from 55296-57343, this code page matches UFT-8. Note, ho

[issue7561] Filename-taking functions in posix segfault when called with a bytearray arg.

2009-12-22 Thread R. David Murray
Changes by R. David Murray : -- priority: -> high stage: -> test needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu