[issue3196] Option in pydoc to show docs from private methods

2010-05-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue762920] API Functions for PyArray

2010-05-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Is there still any interest in pursuing this? Raymond? -- ___ Python tracker ___ ___ Python

[issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__()

2010-05-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue2651] Strings passed to KeyError do not round trip

2010-05-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- versions: +Python 3.2 -Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue2651] Strings passed to KeyError do not round trip

2010-05-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- assignee: -> belopolsky nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue4653] Patch to fix typos for Py3K

2010-05-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Strike my comment about Python/dynload_win.c - I was looking at the trunk version instead of py3k. In py3k theInfo is wchar_t and patch seems to be valid. -- ___ Python tracker

[issue4653] Patch to fix typos for Py3K

2010-05-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I don't run Windows either but I believe sizeof(char) == 1 is guaranteed by the C standard, so the first report (Python/dynload_win.c) is invalid. The last two appear to be valid [1], and a common mistake. [2] Unit tests are needed for these. I also n

[issue2394] [Py3k] Finish the memoryview object implementation

2010-05-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue6583] 2to3 fails to fix test.test_support

2010-05-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: r81579 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue6583] 2to3 fails to fix test.test_support

2010-05-27 Thread Rodrigo Bernardo Pimentel
Rodrigo Bernardo Pimentel added the comment: Pascal is correct, trunk Doc/library/test.rst still says: "The 2to3 tool will automatically adapt imports when converting your sources to 3.0." Perhaps this should simply be changed to "The 2to3 tool will not automatically convert this, so make sur

[issue672115] Assignment to __bases__ of direct object subclasses

2010-05-27 Thread Hari Krishna Dara
Hari Krishna Dara added the comment: I just hit up on this same bug and the "class object(object): pass" workaround worked fine. I too would like to know how safe this workaround is, could someone more insightful please comment on this? -- nosy: +Hari.Krishna.Dara ___

[issue8841] GetoptError strings should be localized

2010-05-27 Thread Richard Lowe
New submission from Richard Lowe : The GetoptError exception raised by getopt.getopt() to indicate errors in provided arguments seems intended to be displayed to the user[1], but is not localized and doesn't contain enough information, short of interpreting the error string, for consumers to r

[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: This was an exceptional API change in 3.1.2: truncate() doesn't move the file pointer anymore, you have to do it yourself (with seek(0) in your case). I'm sorry for the inconvenience; the change was motivated by the desire of having an API more consistent wit

[issue8840] io.StringIO: truncate+print disabled in 3.1.2

2010-05-27 Thread Terry J. Reedy
New submission from Terry J. Reedy : Some of my tests use io.StringIO and assert that captured print output equals expected output. Until now, I reused one buffer by truncating between tests. I recently replaced 3.1.1 with 3.1.2 (WinXP) and the *second* test of each run started failing. The fo

[issue8825] int("0",0) throws exception

2010-05-27 Thread Dino Viehland
Dino Viehland added the comment: I've opened a bug in the IronPython bug tracker: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=27209 -- ___ Python tracker ___ __

[issue8834] Define order of Misc/ACKS entries

2010-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. -- nosy: +pitrou versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___

[issue8839] PyArg_ParseTuple(): remove "t# format

2010-05-27 Thread STINNER Victor
New submission from STINNER Victor : "t#" format was introduced by r11803 (11 years ago): "Implement new format character 't#'. This is like s#, accepting an object that implements the buffer interface, but requires a buffer that contains 8-bit character data." Python3 now has a strict separat

[issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode()

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: A search in Google doesn't show anything interesting: it looks like these functions were never used outside Python test suite. I just noticed r41461: "Add tests for various error cases and for readbuffer_encode() and charbuffer_encode(). This increases code co

[issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode()

2010-05-27 Thread STINNER Victor
New submission from STINNER Victor : readbuffer_encode() and charbuffer_encode() are not really encoder nor related to encodings: they are related to PyBuffer. readbuffer_encode() uses "s#" format and charbuffer_encode() uses "t#" format to parse their arguments. Both functions were introduced

[issue8837] PyArg_ParseTuple(): remove old and unused "O?" format

2010-05-27 Thread STINNER Victor
Changes by STINNER Victor : -- versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8837] PyArg_ParseTuple(): remove old and unused "O?" format

2010-05-27 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue8837] PyArg_ParseTuple(): remove old and unused "O?" format

2010-05-27 Thread STINNER Victor
New submission from STINNER Victor : "O?" format was introduced by r4301 (15 years, 9 months ago). PyArg_ParseTuple() was first documented in Python 2.2, but without the full list of all formats. The format list was added to Python 2.3, but "O?" was never documented. So I get that no third par

[issue8836] Conflicting default values of parameter to __import__

2010-05-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r81572. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue8835] buildbot: support.transient_internet() doesn't catch DNS socket.gaierror

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: I commited the patch as r81571 in trunk. Wait for the buildbot before porting it to other branches. -- ___ Python tracker ___ _

[issue8836] Conflicting default values of parameter to __import__

2010-05-27 Thread Anthony Foglia
New submission from Anthony Foglia : Looking at the documentation for the __import__ builtin, the default value of the level parameter is unclear. Two different values are mentioned. The function signature is written: __import__(name, globals={}, locals={}, fromlist=[], level=-1) But the th

[issue8835] buildbot: support.transient_internet() doesn't catch DNS socket.gaierror

2010-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks ok to me. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue8835] buildbot: support.transient_internet() doesn't catch DNS socket.gaierror

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: Patch to catch gaierror(EAI_NODATA) and gaierror(EAI_NONAME). -- keywords: +patch Added file: http://bugs.python.org/file17477/transilient_internet_dns.patch ___ Python tracker ___

[issue1289118] timedelta multiply and divide by floating point

2010-05-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- stage: -> commit review Added file: http://bugs.python.org/file17476/issue1289118-withdoc.diff ___ Python tracker ___

[issue7150] datetime operations spanning MINYEAR give bad results

2010-05-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Committed in r81566 (trunk), r81568 (py3k), r81569 (release26-maint), r81570 (release31-maint). -- stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue8835] buildbot: support.transient_internet() doesn't catch DNS socket.gaierror

2010-05-27 Thread STINNER Victor
New submission from STINNER Victor : The nameserver responsible of sha2.hboeck.de is down and this hostname is used in test_ssl. The result is that all trunk buildbots are red (error). support.transient_internet() should catch socket.gaierror. -- One example: http://www.python.org/dev/buildb

[issue8598] test/support: don't use localhost as IPv6 host name

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: I consider that the bug is in my /etc/hosts configuration, not in Python. So I close the issue as "invalid". -- resolution: -> invalid status: open -> closed ___ Python tracker _

[issue8833] tarfile: broken hardlink handling and testcase.

2010-05-27 Thread Lars Gustäbel
Changes by Lars Gustäbel : -- assignee: -> lars.gustaebel nosy: +lars.gustaebel ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue8834] Define order of Misc/ACKS entries

2010-05-27 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file17475/issue8834.diff ___ Python tracker ___ __

[issue8834] Define order of Misc/ACKS entries

2010-05-27 Thread Alexander Belopolsky
New submission from Alexander Belopolsky : This is a semi-serious feature request following a brief discussion on #python-dev IRC. Brett Cannon pointed out on python-checkins list [1] that the names should be alphabetized. However, given that the names are international, it is not obvious wh

[issue7171] Add inet_ntop and inet_pton support for Windows

2010-05-27 Thread Brian Curtin
Changes by Brian Curtin : -- components: +Windows versions: -Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced

2010-05-27 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > 'naive' and 'aware' are key datetime types - they need a proper > definition and anchor for crossrefences. The definition is given in the introductory section: """ There are two kinds of date and time objects: “naive” and “aware”. This distinction refe

[issue8822] datetime naive and aware types should have a well-defined definition that can be cross-referenced

2010-05-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +belopolsky stage: -> needs patch versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker ___ __

[issue8579] Add missing tests for FlushKey, LoadKey, and SaveKey in winreg

2010-05-27 Thread Brian Curtin
Brian Curtin added the comment: LoadKey and SaveKey require special privileges which need to manually acquired, likely via ctypes. #1578269 has some code which does this for os.symlink privileges and it's about to go into py3k, so I'll try to piggyback off of that. -- ___

[issue8833] tarfile: broken hardlink handling and testcase.

2010-05-27 Thread Justin Bronder
New submission from Justin Bronder : When adding hardlinks to an archive, tarfile does not set the size of each additional link to zero as specified by the tar format [1]. In addition, the current test case hardlinks is also broken. Instead of testing that the size of a hardlink to a non-empty f

[issue8405] Improve test_os._kill (failing on slow machines)

2010-05-27 Thread Brian Curtin
Brian Curtin added the comment: I just noticed the other day that a buildbot failed because of this issue. Attached is a patch which removes the unconditional 0.5 sleep, and increases the loop to run 100 times. It should cover the worst case of a super slow buildbot, but is still typically co

[issue8828] Atomic function to rename a file

2010-05-27 Thread Raghuram Devarakonda
Changes by Raghuram Devarakonda : -- nosy: +draghuram ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue8832] automate minidom.unlink() with a context manager

2010-05-27 Thread Kristján Valur Jónsson
New submission from Kristján Valur Jónsson : It is all to easy to forget to "unlink()" minidom documents resulting in huge memory usage. This patch allows to automate that process with a context manager, similar to how files can be closed in the same way: with xml.dom.minidom.parse() as dom:

[issue8828] Atomic function to rename a file

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: > Antoine Pitrou added the comment: > > Would you prefer to not define the function instead of writing a pseudo- > > atomic function? > > Your current implementation is useless, since it doesn't achieve anything > new. Besides, if the function isn't atomic, do

[issue8828] Atomic function to rename a file

2010-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Would you prefer to not define the function instead of writing a pseudo- > atomic function? Your current implementation is useless, since it doesn't achieve anything new. Besides, if the function isn't atomic, don't name it atomic_XXX. -- __

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: > This is in contrast with the standard C++/C behavior, where a close() > on a socket causes an asynchronous and immediate exception/return with > error on the functions that are using the socket at the same time (but > in another thread). Are you sure of that?

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Alessandro Roat
Alessandro Roat added the comment: This is an example, test it with netcat (nc -u localhost ) on linux (ubuntu 9.10). Lauch it with python , a prompt will appear. Type "start" to launch the server, test the server sending UDP packets with netcat, the lenght of packet will be correctly prin

[issue8828] Atomic function to rename a file

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: @pitrou: Yes, as I wrote: it's not possible to write an atomic function for all OS. The documentation must give a list of the OS on which the function is atomic. Would you prefer to not define the function instead of writing a pseudo-atomic function? -- Jav

[issue8828] Atomic function to rename a file

2010-05-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: It seems you are proposing to call "atomic" something which isn't atomic: def atomic_rename(src, dst): if os.path.exists(dst): old = _create_old_filename(dst) rename(dst, old) rename(src, dst) unlink(old) --

[issue8828] Atomic function to rename a file

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: We have to think about network file systems like NFS. Gnome (nautilus) had a bug on rename because NFS emitted a delete notification on a rename: http://linux-nfs.org/pipermail/nfsv4/2009-March/010134.html https://bugzilla.gnome.org/show_bug.cgi?id=575684 It l

[issue8828] Atomic function to rename a file

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: > This implementation is atomic on POSIX, ... Wrong :-) "On how rename is broken in Mac OS X" http://www.weirdnet.nl/apple/rename.html "Update January 8, 2010: ... the original bug (5398777) was resolved in Snow Leopard but the issue I reported was not fixe

[issue8828] Atomic function to rename a file

2010-05-27 Thread Trundle
Changes by Trundle : -- nosy: +Trundle ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/ma

[issue8828] Atomic function to rename a file

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: Begin by removing the dest file is maybe not the safer approach :-) Here is a new try: begin by renaming the dest file to a new file. -- # use maybe a PRNG instead of a dummy counter or tempfile def _create_old_filename(filename): old = filename + '.old

[issue8828] Atomic function to rename a file

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: See issue #8604: proposal of a new "with atomic_write(filename) as fp: ..." context manager. -- ___ Python tracker ___

[issue8828] Atomic function to rename a file

2010-05-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue8828] Atomic function to rename a file

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: A first implementation can be: if os.name in ('nt', 'ce'): def atomic_rename(a, b): if os.path.exists(b): unlink(b) rename(a, b) else: atomic_rename = os.rename This implementation is atomic on POSIX, and not atomic on Windows. Tell

[issue8828] Atomic function to rename a file

2010-05-27 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread STINNER Victor
STINNER Victor added the comment: And maybe also a short example? :) -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list maili

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Martin v . Löwis
Martin v. Löwis added the comment: Can you provide a patch? -- nosy: +loewis ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue7171] Add inet_ntop and inet_pton support for Windows

2010-05-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue8831] recv and recvfrom on UDP socket do not return/throw exception after a close()

2010-05-27 Thread Alessandro Roat
New submission from Alessandro Roat : A thread blocked on a recv or a recvfrom method on a UDP socket (waiting for a datagram) can not be unlocked calling a .close() from a different thread. This is in contrast with the standard C++/C behavior, where a close() on a socket causes an asynchronous

[issue7171] Add inet_ntop and inet_pton support for Windows

2010-05-27 Thread kookwekker
Changes by kookwekker : -- nosy: +kookwekker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue2844] int() lies about base parameter

2010-05-27 Thread Mark Dickinson
Mark Dickinson added the comment: For py3k, this was fixed in r81557. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-