[issue18802] ipaddress documentation errors

2013-08-21 Thread R. David Murray
Changes by R. David Murray : -- nosy: +ncoghlan, pmoody ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue18803] Fix more typos in .py files

2013-08-21 Thread Févry Thibault
New submission from Févry Thibault: Just like issue 18741 and 18705. It also fixes one typo in a C file. -- assignee: docs@python components: Documentation files: more_typos.diff keywords: patch messages: 195823 nosy: docs@python, iwontbecreative priority: normal severity: normal status

[issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie)

2013-08-21 Thread Nick Coghlan
Nick Coghlan added the comment: On 21 Aug 2013 15:47, "Mark Dickinson" wrote: > > > Mark Dickinson added the comment: > > > Shouldn't it be PendingDeprecationWarning? > > Hmm. Possibly. I'm not sure what the policy is any more regarding DeprecationWarning versus PendingDeprecationWarning. Nic

[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2013-08-21 Thread Benjamin Peterson
Benjamin Peterson added the comment: We can argue about whether it's a bugfix or not. But I don't see how having this patch in 2.7 helps anyone, since ctypes.wintypes is useless on non-Windows platforms. -- ___ Python tracker

[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset ccbe2132392b by Victor Stinner in branch 'default': Close #18794: Add a fileno() method and a closed attribute to select.devpoll http://hg.python.org/cpython/rev/ccbe2132392b -- nosy: +python-dev resolution: -> fixed stage: needs patch -> c

[issue18794] select.devpoll objects have no close() method

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: Charles-François Natali and Guido van Rossum: thanks for your reviews ;-) -- ___ Python tracker ___

[issue12641] Remove -mno-cygwin from distutils

2013-08-21 Thread STINNER Victor
Changes by STINNER Victor : -- title: Test -> Remove -mno-cygwin from distutils ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: Your change looks perfectly valid, except this minor nit: +self.assertTrue(remaining_fds <= set([0, 1, 2])) Using self.assertLessEqual() would provide better message on error. Note: with the PEP 446, you would not have to care of closing file descripto

[issue18763] subprocess: file descriptors should be closed after preexec_fn is called

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: You don't want to fix Python 2.7 and 3.3? It is a bug in my opinion. -- ___ Python tracker ___ ___ P

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine, can you please verify the gdb plug-in is working again? test_gdb works fine here, yes. -- ___ Python tracker ___ ___

[issue18792] test_ftplib timeouts

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 085ba7d85eb2 by Antoine Pitrou in branch 'default': Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as possible, since "localhost" goes through a DNS lookup under recent Windows versions. http://hg.python.org/cpython/rev/085ba

[issue17070] PEP 433: Use the new cloexec to improve security and avoid bugs

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: > Time to close this one, since the PEP has been superseeded by PEP 446? I prefer to wait until Guido decided for the PEP 446. -- ___ Python tracker __

[issue18792] test_ftplib timeouts

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7728b073c77c by Antoine Pitrou in branch '3.3': Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as possible, since "localhost" goes through a DNS lookup under recent Windows versions. http://hg.python.org/cpython/rev/7728b073c

[issue18792] test_ftplib timeouts

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 48de8df194d9 by Antoine Pitrou in branch '2.7': Issue #18792: Use "127.0.0.1" or "::1" instead of "localhost" as much as possible, since "localhost" goes through a DNS lookup under recent Windows versions. http://hg.python.org/cpython/rev/48de8df19

[issue18792] test_ftplib timeouts

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Done, thanks :) -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker ___

[issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor

2013-08-21 Thread STINNER Victor
New submission from STINNER Victor: is_valid_fd() of Python/pythorun.c should use fstat() to check if a file descriptor is valid, instead of duplicating it using dup() (and then closing it). If Windows needs a special check, it would be better to run checks on the handle of the file descripto

[issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > is_valid_fd() of Python/pythorun.c should use fstat() to check if a > file descriptor is valid, instead of duplicating it using dup() (and > then closing it). Why should it? fstat() may be expensive, while dup() is cheap. -- _

[issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: > Why should it? fstat() does not need to create a new file descriptor. Creating a new file descriptor can fail (ex: limit of the number of open files). -- ___ Python tracker ___

[issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Why should it? > > fstat() does not need to create a new file descriptor. Creating a new > file descriptor can fail (ex: limit of the number of open files). Why should I care? fstat() can fail too. The only important thing is whether dup() returns EBADF or

[issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, can you please mention the actual changeset id? (not only the parent) -- ___ Python tracker ___ ___

[issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: > By the way, can you please mention the actual changeset id? (not only the > parent) Oh, I failed to copy/paste the changeset, sorry :-) It is the changeset f15943505db0: changeset: 73775:f15943505db0 branch: 3.2 parent: 73773:661fb211f220 user:

[issue18804] pythorun.c: is_valid_fd() should not duplicate the file descriptor

2013-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks. I guess is_valid_fd() could be improved to check for EBADF, but other than that I don't see the problem. dup() is better than fstat() which may do some actual I/O. Did you encounter this in real life? -- ___

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-21 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file31412/43697011a273.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-21 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file31235/e4e6f45668c7.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-21 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file31378/00df7fc6d2ef.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue18326] Mention 'keyword only' for list.sort, improve glossary.

2013-08-21 Thread R. David Murray
R. David Murray added the comment: In this expository context, I prefer the issue18326.that.diff version, but the index link to the keyword-only_parameter ref should still be added to it (on "only be passed by keyword"). -- ___ Python tracker

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-21 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file31413/775890a666bf.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue18571] Implementation of the PEP 446: non-inheritable file descriptors

2013-08-21 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file31412/43697011a273.diff ___ Python tracker ___ ___ Python-bugs-list maili

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: Attached patch changes the error handle of stdin, stdout and stderr to surrogateescape by default. It can still be changed explicitly using the PYTHONIOENCODING environment variable. -- keywords: +patch Added file: http://bugs.python.org/file31414/surr

[issue18802] ipaddress documentation errors

2013-08-21 Thread Jon Foster
Jon Foster added the comment: (If this is accepted, please consider it for backport to 3.3 too. It is just a documentation improvement). -- type: -> enhancement versions: +Python 3.3 ___ Python tracker _

[issue18805] ipaddress netmask/hostmask parsing bugs

2013-08-21 Thread Jon Foster
New submission from Jon Foster: Short version: Validation of netmasks and hostmasks in IPv4Network is wrong: it rejects many valid netmasks, it accepts many invalid netmasks and hostmasks, and it sometimes throws the wrong exception. Patch attached. Long version: Wrongly rejecting hostmasks

[issue18802] ipaddress documentation errors

2013-08-21 Thread R. David Murray
R. David Murray added the comment: Documentation fixes are always backported. -- nosy: +r.david.murray ___ Python tracker ___ ___ Pyth

[issue14360] email.encoders.encode_quopri doesn't work with python 3.2

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64e004737837 by R David Murray in branch '3.3': #18324: set_payload now correctly handles binary input. http://hg.python.org/cpython/rev/64e004737837 -- ___ Python tracker

[issue16564] email.generator.BytesGenerator fails with bytes payload

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64e004737837 by R David Murray in branch '3.3': #18324: set_payload now correctly handles binary input. http://hg.python.org/cpython/rev/64e004737837 -- ___ Python tracker

[issue18324] set_payload does not handle binary payloads correctly

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64e004737837 by R David Murray in branch '3.3': #18324: set_payload now correctly handles binary input. http://hg.python.org/cpython/rev/64e004737837 New changeset a4afcf93ef7b by R David Murray in branch 'default': Merge #18324: set_payload now cor

[issue1717] Get rid of more references to __cmp__

2013-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 64e004737837 by R David Murray in branch '3.3': #18324: set_payload now correctly handles binary input. http://hg.python.org/cpython/rev/64e004737837 -- nosy: +python-dev ___ Python tracker

[issue17400] ipaddress.is_private needs to take into account of rfc6598

2013-08-21 Thread pmoody
pmoody added the comment: is_private was, as you note, basically shorthand for is_RFC1918 (and is_RFC4193 for v6). It's not a particularly well-named method, but at the time that I wrote it (~5 years ago?), it did what I needed it to do. I'm not sure what you mean by an 'is_natted()' method; t

[issue18324] set_payload does not handle binary payloads correctly

2013-08-21 Thread R. David Murray
R. David Murray added the comment: Thanks, Vajrasky. The v2 patch was almost correct. What you couldn't know without being as deeply enmeshed in this code as I am is that the test failures from the encoders module were actually invalid. We'd previously "fixed" them, but the fixes were incorr

[issue18805] ipaddress netmask/hostmask parsing bugs

2013-08-21 Thread Eric V. Smith
Eric V. Smith added the comment: I haven't had time to review this yet, but at least several of these, if true, are definitely bugs that should be backported. "254.192.128.0" as a netmask? Descending octets as the condition? Yikes. -- nosy: +eric.smith stage: -> patch review

[issue12641] Remove -mno-cygwin from distutils

2013-08-21 Thread Renato Silva
Changes by Renato Silva : -- nosy: -renatosilva ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue18606] Add statistics module to standard library

2013-08-21 Thread Steven D'Aprano
Steven D'Aprano added the comment: On 20/08/13 22:43, Mark Dickinson wrote: > I agree with Oscar about sum for decimal.Decimal. The *ideal* sum for > Decimal instances would return the correctly rounded result (i.e., the exact > result, rounded to the current context just once using the curre

[issue18805] ipaddress netmask/hostmask parsing bugs

2013-08-21 Thread Nick Coghlan
Nick Coghlan added the comment: Right, I don't see any issues with backporting these fixes. One of the reasons for the PEP 411 provisional status of the API was to ensure there were no questions about what should be backported. -- ___ Python tracker

[issue18772] Fix gdb plugin for new sets dummy object

2013-08-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs

[issue15809] IDLE console uses incorrect encoding.

2013-08-21 Thread irdb
irdb added the comment: I really think this information might help, if not, I promise not to post anything else. :) This is a sample program I run: ''' # -*- coding: utf-8 -*- import sys import locale de = sys.getdefaultencoding() pd = locale.getpreferredencoding() print de, pd s1 = 'سلام' p

[issue18806] socketmodule: fix/improve setipaddr() numeric addresses handling

2013-08-21 Thread Charles-François Natali
New submission from Charles-François Natali: Currently, setipaddr() has this code to special-case numeric IPv4 addresses and avoid a name resolution: """ if (sscanf(name, "%d.%d.%d.%d%c", &d1, &d2, &d3, &d4, &ch) == 4 && 0 <= d1 && d1 <= 255 && 0 <= d2 && d2 <= 255 && 0 <= d

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The surrogateescape error handler works only with UTF-8. As a side effect of this change an input from stdin will be incompatible in general with extensions which implicitly encode a string to bytes with UTF-8 (e.g. tkinter, XML parsers, sqlite3, datetime, l

[issue15809] IDLE console uses incorrect encoding.

2013-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Use cp1256 encoding in your source file. It is expected that usually your source files encoding is same as your locale encoding. In such case printing string literals and Unicode string literals produces same result (as they look in the sources). s1 is '\xd

[issue16685] Deprecate accepting strings as arguments in audioop functions

2013-08-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue18713] Enable surrogateescape on stdin and stdout when appropriate

2013-08-21 Thread STINNER Victor
STINNER Victor added the comment: "The surrogateescape error handler works with any codec." The surrogatepass only works with utf-8 if I remember correctly. The surrogateescape error handler works with any codec, especially ascii. "As a side effect of this change an input from stdin will be inc

<    1   2