[issue10841] binary stdio

2011-01-06 Thread Guido van Rossum
Guido van Rossum added the comment: On Thu, Jan 6, 2011 at 1:20 PM, STINNER Victor wrote: > I don't know the effect of _setmode(stderr, O_BINARY) on calls to > fputs(stderr, ...) in Py_FatalError(). On Windows it will write lines ending in LF only instead of CRLF. Most tools to read text file

[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2011-01-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: - should KeyboardInterrupt always exit with SIGINT, or only if it was actually raised by a signal handler? - if _Py_UnhandledKeyboardInterrupt is defined in Modules/main.c but used in Python/pythonrun.c, can't it cause linker errors when embedding Python? - pl

[issue10848] Move test.regrtest from getopt to argparse

2011-01-06 Thread Brett Cannon
New submission from Brett Cannon : r87812 shows that using getopt is not a good thing; having the short and long versions of an argument separated from each other can lead to bugs. It would be good to move test.regrtest over to argparse to help prevent that from happening again. -- co

[issue10835] sys.executable default and altinstall

2011-01-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: I fail to see the bug. Garbage in, garbage out. AFAIU, returning /usr/bin/python2.7 still might be the wrong answer. -- nosy: +loewis ___ Python tracker

[issue10845] test_multiprocessing failure under Windows

2011-01-06 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: +brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue10848] Move test.regrtest from getopt to argparse

2011-01-06 Thread Sandro Tosi
Sandro Tosi added the comment: I had that in mind since quite some time, so I'm taking ownership of this issue. -- assignee: -> sandro.tosi nosy: +sandro.tosi versions: +Python 3.3 ___ Python tracker

[issue10849] Backport test/__main__

2011-01-06 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : It is much easier to remember and to type -m test instead of -m test.regrtest, but the usefulness of this feature is limited by the fact that it only works with the latest version. Since this does not require any user-visible changes, I think it shoul

[issue10824] urandom should not block

2011-01-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: > You'll see that read returns less that 100M bytes when interrupted. I see. > while len(data) < expected: > read(expected - len(data)) > > So we're sure it won't break under some systems/conditions. I think this is not quite the idiom we should use if

[issue10849] Backport test/__main__

2011-01-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue10849] Backport test/__main__

2011-01-06 Thread Sandro Tosi
Changes by Sandro Tosi : -- nosy: +sandro.tosi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10849] Backport test/__main__

2011-01-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: -0 we don't backport new features -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-li

[issue2973] _ssl compiler warnings

2011-01-06 Thread Daniel Black
Daniel Black added the comment: out of date? still occurs on: AMD64 Leopard 2.7: http://www.python.org/dev/buildbot/all/builders/AMD64 Leopard 2.7/builds/308/steps/compile/logs/warnings (57) PPC Leopard 2.7: http://www.python.org/dev/buildbot/all/builders/PPC Leopard 2.7/builds/532/steps/comp

[issue10812] Add some posix functions

2011-01-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: Patch looks mostly good. Some comments: - sethostname supports names with embedded null bytes, so wrapper should not use strlen - it's a bit asymmetric that gethostname is in the socket module and supports Windows, and sethostname is in the POSIX module.

[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2011-01-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: I wonder whether there is a precedent of some system mapping SIGINT to an exception. We could probably learn something from them. > - should KeyboardInterrupt always exit with SIGINT, or only if it was > actually raised by a signal handler? IMO, if we give th

[issue10850] inconsistent behavior concerning multiprocessing.manager.BaseManager._Server

2011-01-06 Thread chrysn
New submission from chrysn : The multiprocessing.manager.BaseManager class has a class property called _Server, defaulting to multiprocessing.manager.Server, that is used in the ._run_server method (typically invoked via .run()) to determine the class of the server that is to be created. On t

[issue10849] Backport test/__main__

2011-01-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > -0 we don't backport new features New tests are routinely backported when they accompany bug fixes, so new features under Lib/test are probably a fair game. Given that this feature is implemented entirely in a file that is not used for any other purp

[issue5171] itertools.product docstring missing 'repeat' argument

2011-01-06 Thread mrjbq7
mrjbq7 added the comment: I noticed a Reddit post[1] today that makes the comment that the docstring should read: product(*iterables[, repeat]) --> product object instead of: product(*iterables) --> product object --- [1] http://www.reddit.com/r/Python/comments/ex68j/omission_

[issue10827] Functions in time module should support year < 1900 when accept2dyear = 0

2011-01-06 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Attached patch, issue10827c.diff, implements the following logic in gettmarg: /* If year is specified with less that 4 digits, its interpretation

[issue10848] Move test.regrtest from getopt to argparse

2011-01-06 Thread R. David Murray
R. David Murray added the comment: Note that based on my experience with the conversion of compileall to argparse,it is important to have good tests. Of course, regrtest itself has no tests... -- nosy: +r.david.murray ___ Python tracker

[issue10827] Functions in time module should support year < 1900 when accept2dyear = 0

2011-01-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file20295/issue10827c.diff ___ Python tracker ___ ___ Python-bugs-list ma

[issue10835] sys.executable default and altinstall

2011-01-06 Thread R. David Murray
R. David Murray added the comment: I agree that not guessing would be better. But as long as we *are* guessing, it seems to me that /usr/bin/python2.7 would be less wrong than /usr/bin/python, for almost all modern unix systems. -- ___ Python trac

[issue10851] further extend ssl SNI and ciphers API

2011-01-06 Thread Daniel Black
New submission from Daniel Black : as a further extension to issue #5639 (sni) and issue #8322 this patch provides the ability to set ciphers in the SSLContext.wrap_socket and server_hostname in ssl.wrap_socket. This just makes all the ssl apis look the same. Restructured the documentation as

[issue8109] Support for TLS Server Name Indication extension

2011-01-06 Thread Daniel Black
Daniel Black added the comment: issue #5639 only has functionality for client side SNI. Server side SNI is still missing. For server side SNI to be supported a server program should be able to retrieve the server name provided by the client call and alter the server certificate/key before th

[issue10512] regrtest ResourceWarning - unclosed sockets and files

2011-01-06 Thread Nadeem Vawda
Nadeem Vawda added the comment: Looking at the warnings from test_urllib2net, it seems that they all originate in the FTP tests: * OtherNetworkTests.test_ftp() * TimeoutTest.test_ftp_basic() * TimeoutTest.test_ftp_default_timeout() Most of these leaks seem to stem from the fact that socket.Soc

[issue10686] email.Generator should use unknown-8bit encoded words for headers with 8 bit data

2011-01-06 Thread R. David Murray
R. David Murray added the comment: Here is a patch. Three of the tests currently fail due to what appears to be a bug in the Header formatting routines. I'll have to look in to that before finishing this issue. Note that doing str on a message with binary headers can produce overlong lines

[issue10686] email.Generator should use unknown-8bit encoded words for headers with 8 bit data

2011-01-06 Thread R. David Murray
Changes by R. David Murray : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue10686] email.Generator should use unknown-8bit encoded words for headers with 8 bit data

2011-01-06 Thread R. David Murray
R. David Murray added the comment: I have a little bit of concern whether or not 'unknown-8bit' is the correct charset to use. It seems to be the one in the RFCs, but I have a feeling it may not be what is used "in the wild" in headers, so I am looking for opinions. -- nosy: +sjt __

[issue3132] implement PEP 3118 struct changes

2011-01-06 Thread Meador Inge
Meador Inge added the comment: Attached is the latest version of the struct string patch. I tested on OS X 10.6.5 (64-bit) and Ubuntu 10.04 (32-bit). I also scanned for memory problems with Valgrind. There is one test failing on 32-bit systems ('test_crasher'). This is due to the fact tha

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2011-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: @Antoine: I actually had a closer look at the way dup_buffer is used, and I think it is currently legitimate (including for the anonymous memory case). It just isn't documented very well. For the "FromBuffer" case, it assumes the calling code already invoked Ge

[issue10686] email.Generator should use unknown-8bit encoded words for headers with 8 bit data

2011-01-06 Thread Stephen J. Turnbull
Stephen J. Turnbull added the comment: I agree with you that according to RFC1428, use of unknown-8bit is implicitly recommended. However, note that the RFC itself is not standards-track. I agree with your interpretation that in this context the email module should be considered a gateway.

[issue10845] test_multiprocessing failure under Windows

2011-01-06 Thread Nick Coghlan
Nick Coghlan added the comment: I'm curious as to the results you get running "python -m test.__main__" and "python Lib/test/__main__.py" as well. I suspect both will fail. Looking at the forking.py code, I think multiprocessing makes some assumptions that are flat out invalid in the presence

[issue10852] SSL/TLS sni use in smtp, pop, imap, nntp, ftp client libs by default

2011-01-06 Thread Daniel Black
New submission from Daniel Black : Like r85793, sni is enabled by default for url and https classes. This continues the consistency throughout the python libraries by adding it to other places where wrap_socket is used to instigate a SSL/TLS connection. -- components: Library (Lib) fil

[issue10853] SSL/TLS sni use in smtp, pop, imap, nntp, ftp client libs by default

2011-01-06 Thread Daniel Black
New submission from Daniel Black : Like r85793, sni is enabled by default for url and https classes. This continues the consistency throughout the python libraries by adding it to other places where wrap_socket is used to instigate a SSL/TLS connection. -- components: Library (Lib) fil

[issue10852] SSL/TLS sni use in smtp, pop, imap, nntp, ftp client libs by default

2011-01-06 Thread Daniel Black
Daniel Black added the comment: dup #10853 -- nosy: -pitrou resolution: -> duplicate status: open -> closed ___ Python tracker ___

[issue1054041] Python doesn't exit with proper resultcode on SIGINT

2011-01-06 Thread Gregory P. Smith
Gregory P. Smith added the comment: > IMO, if we give the illusion that the interpreter was actually killed, > we should equate KeyboardInterrupt with SIGINT; any uncaught > KeyboardInterrupt should consequently always lead to raising SIGINT. Agreed. Plus that is easier to implement and what I

[issue10848] Move test.regrtest from getopt to argparse

2011-01-06 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue10849] Backport test/__main__

2011-01-06 Thread Éric Araujo
Éric Araujo added the comment: FWIW, I’ve already been caught by “./python -m test” not working with 3.1 and 2.7 when doing backports and using my shell history functionality. I share Alexander’s viewpoint that adding test.__main__ is a core dev-specific convenience that should not count as

[issue10813] Suppress adding decimal point for places=0 in moneyfmt()

2011-01-06 Thread Carsten Grohmann
Carsten Grohmann added the comment: Setting dp to an empty string is only a workaround from my perspective. I get the value of the places parameter from a configuration instance and have to implement an additional check "places == 0" every time I call the original moneyfmt(). To reduce this e

[issue10835] sys.executable default and altinstall

2011-01-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I agree that not guessing would be better. Well, on Linux, readlink("/proc/self/exe") would be better than guessing. -- ___ Python tracker

[issue10849] Backport test/__main__

2011-01-06 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> benjamin.peterson nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs-list mail

<    1   2